Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interactive REPL #261

Closed
1 of 3 tasks
data-pup opened this issue Mar 7, 2019 · 3 comments
Closed
1 of 3 tasks

Interactive REPL #261

data-pup opened this issue Mar 7, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@data-pup
Copy link
Member

data-pup commented Mar 7, 2019

💡 Feature Description

It would be nice if there was an interactive REPL that would allow you to quickly run a number of analyses on a program. Currently, the workflow for analyzing a wasm binary in depth is running a series of somewhat verbose commands, i.e. twiggy dominators -n [..] -d [..] /path/to/my/binary.

I'd love the ability to enter some sort of very basic REPL, potentially offering shorter aliases to commands, so that I can do something like:

This could potentially function as a stepping stone to #9?

💻 Example Usage

Something like this would be great

$ twiggy --interactive /path/to/my/binary
> top -n 5
[Output here]
> dominators -d 2
[and so on]

The ability to load a different program without leaving the REPL might be a nice feature, as would writing the output of a command to a file with one of our CSV, JSON, etc. emission modes.

🙌 Are you interested in implementing this feature?

Add an "X" to one of the following:

  • Yes
  • Yes if I had a mentor to help me
  • No

Other Notes:

A part of me is slightly concerned that this should be implemented in another crate altogether. I can already imagine that some of the tools in wabt would be great into incorporate into a REPL of this sort, which makes me wonder if this is out-of-scope for twiggy. On some level, I think there might be a very similar question when eventually tackling #9.

Feedback would be greatly appreciated, and this might be worth breaking apart into separate issues depending on what we believe makes sense. 👍

@fitzgen
Copy link
Member

fitzgen commented Mar 7, 2019

I think maybe something like https://crates.io/crates/tui could also be good here, rather than a REPL, but I haven't considered the idea of a REPL enough yet.

@data-pup
Copy link
Member Author

The tui crate looks really useful! Maybe it would be possible to use some of those visualisations without jumping in a draw loop? I'll poke about and see what that could look like

@AlexEne AlexEne added the enhancement New feature or request label Aug 6, 2021
@AlexEne
Copy link
Collaborator

AlexEne commented Aug 6, 2021

As I'm doing a cleanup pass on the issues, I've added this: #581 for the tui-rs integration. We can add visualization functionality & other features once the building blocks are in place.

@AlexEne AlexEne closed this as completed Aug 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants