together with @famfo, we’re publishing the first version of ruszt to crates.io! It’s our “Rust FFI for Bash” project, which allows you to create bash loadable builtins in Rust!

We’ll be using this within #HTTPsh to add faster versions of some resource-intensive parts, like the templating engine. But that’s just the tip of the iceberg!

Disclaimer: it’s a bit hacky and we don’t have docs yet; We do have examples in the main repo! Contributions welcome <3

(is this a bit insane? we think so too!)

terminal screenshot. it shows two files: src/lib.rs, containing the rust code for the builtin, and then run.sh, loading a builtin with `enable -f` and then running it.

The builtin gets the output of one variable, and sets another variable. Both can be accessed from rust as well as bash.
0

If you have a fediverse account, you can quote this note from your own instance. Search https://donotsta.re/objects/afc49b3a-dc7b-479a-b6c8-7f3f2f6b41c7 on your instance and quote it. (Note that quoting is not supported in Mastodon.)