On 22 October 2012 20:28, Chad Retz <[email protected]> wrote:
> I am very new to Rust, but I have a little project where I'd like to compile
> something else into Rust code. I have seen the macro syntax which doesn't
> operate on pure strings (from what I see) and I have seen projects like
> rust-repl that parse and inject at runtime. Which approach should I take if
> I want to be able to transpile both to a string to save into a file and to
> use it at runtime depending on what the user wants? (I have done this in D,
> yet the mixins there work with strings natively so there is no real decision
> to make).

Rust's macro system won't let you implement a DSL that is very
different from rust itself.
You could express the language as function calls, which you could do
at runtime or from a macro.
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to