EmbShell, a very small interactive command shell for (embedded or embedding in) Zig programs.
I looked at putting Linenoize on a microcontroller and decided that hacking out all of the termios and posix stuff wasn’t worth the bother. So, went back and revamped this old project.
The first version of this was pretty much my first Zig program. Knowing a tiny bit more now, I’ve gone back and improved things:
- Easy to use as a module
- Configured with command handlers at comptime at
@import()
- Very lightweight, it just needs a buffer for the incoming line of text (I suspect a smaller system is possible with parsing the commands on the fly according to a comptime generated parser), but this is good enough for me
- Removed the C code, very little use of
std
, no libc requirement and no allocator