this post was submitted on 23 Jun 2024
4 points (100.0% liked)

Rust

5749 readers
7 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 1 year ago
MODERATORS
 

Is there a good general-ish purpose scripting language (something like Lua on the smaller end or Python on the bigger) that’s implemented in only Rust, ideally with a relatively low number of dependencies?

Have you used it yourself, if so for what and what was your experience?

Bonus points if it’s reasonably fast (ideally JITed, though I’m not sure if that’s been done at all in Rust).

top 9 comments
sorted by: hot top controversial new old
[–] erlend_sh@lemmy.world 1 points 2 months ago
[–] onlinepersona@programming.dev 0 points 2 months ago (2 children)
[–] BB_C@programming.dev 1 points 2 months ago

I don't know how I didn't register the existence of roc.
I'm reading through the tutorial, and it looks very interesting.

[–] KillTheMule@programming.dev 0 points 2 months ago (1 children)
[–] amanda@aggregatet.org 1 points 2 months ago

According to the readme, that’s Lua bindings and not the language itself, that’s probably why it’s not on the list since it wasn’t written in Rust.

[–] Kualk@lemm.ee 0 points 2 months ago (1 children)

With requirements like yours, just use RUST itself.

GO language can be used as scripting language on Linux.

I imagine the same approach can be used with RUST.

[–] 5C5C5C@programming.dev 0 points 2 months ago (1 children)

Disclaimer that I have no experience with writing compilers myself, but conceptually I don't see any obvious reason that someone couldn't create a JIT compiler for Rust so that it can be treated like a scripting language and do rapid iteration...

[–] amanda@aggregatet.org 0 points 2 months ago (1 children)

Sure you could JIT Rust, the question is if you can write a JIT compiler in rust since it needs to do some quite scary stuff to swap in compiled routines when evaluating code. I’m not even sure if unsafe is enough for that, you may need goto or arbitrary function pointers (which is kind of the same thing)