Is there any guide, tutorial or other resource that helps in making a REPL-based DSL using rust
You must log in or # to comment.
Clap has an entry in their cookbook for a REPL:
- Derive-API: https://docs.rs/clap/latest/clap/_cookbook/repl_derive/index.html
- Builder-API: https://docs.rs/clap/latest/clap/_cookbook/repl/index.html
Of course, this works best for simple stuff, where you just have individual commands to parse.
For a Python-style REPL with a full-fledged language attached, I would not use that approach.
There’s probably some REPL languages implemented in Rust already out there, where you can look at their approach.

