TritonVM / tasm-lang

Writing tasm with Rust syntax
15 stars 2 forks source link

Make CLI interface #33

Open Sword-Smith opened 1 year ago

Sword-Smith commented 1 year ago

It should be possible to run the compiler from the command-line interface where you execute it. The syntax to compile rust source code into tasm should be tasm-lang <file_name.rs> and it then produces a <file_name.tasm> with the containing assembly code. This behavior mimics the way rustc behaves when compiling a single file with no dependencies, so it's a natural interface for us too, as we are also compiling from Rust code.

For now, it doesn't have to have a more advanced interface than that, I think. This solution should include a way of parsing input arguments such that we can use those going forward. In neptune-core we use the clap cargo create for command-line argument parsing, and I think we should do that here too. It should be possible to set if you want to use safe or unsafe lists through the CLI arguments..

Sword-Smith commented 1 year ago

@junkicide :)