You appear to be generally confused.
If you’re using the multi-threaded work-stealing tokio runtime (the default), you are “talking threads”. And if you aren’t, Arc
and Mutex
would be useless, irregardless of whether you’re doing it right or wrong.
Another meme answer:
nu
.I never actually used
nu
for anything. But I’ve been thinking (unironically) thatnu
with its built-infrom_json
andto_json
can be interesting.The use-case I had in mind is not games or anything like that, but some system or dev tools that traditionally utilized shell scripts, but are moving towards better languages like python. So I thought a single binary that embeds
nu
, but also has a lot of sub-commands that implement a lot of sub-tasks in Rust directly, and with JSON used as an exchange format, the combination can be interesting.Now that I think about it more, this can work in both directions, with main execution being in nu (what I had in mind), or in Rust.
nu
even has an lsp server, so the development experience should theoretically be good.