How to make a REPL-based DSL using rust

Is there any guide, tutorial or other resource that helps in making a REPL-based DSL using rust

5 points · 1 comments · view on lemmy.world

1 Comments

Ephera@lemmy.ml · 1 pts · 94d

Clap has an entry in their cookbook for a REPL:

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.