Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
The REPL logic is pretty straight forward, basically we will need an infinite loop that prints a prompt, gets an input line, validates and then processes that line. I decided to go with the crate rustyline, which is already pretty mature, memory efficient and already solved a lot of the issues we would have to deal with, even from the user experience side, for example, providing hints and auto-completion in real time, which is a great feature.
I assume that if you are trying to follow this and writing some code along with me you can manage to create an empty Rust project on your own. Just to be clear this is what I did to start: cargo new rust_sqlite --bin . But again, you can find all the code on Github.
Related posts
- [Release v0.2.0] promkit: A toolkit for building interactive command-line tools in Rust
- Ghee 0.4 - The tastiest way to work with Linux extended attributes (xattrs)
- After years of bash, I actually found a shortcut I never heard about.
- Is there an equivalent Rust crate?
- I wrote a scheme in Rust called Marwood