I'm making a #livecoding modular synth in Rust, scripted in Rhai and JIT-compiled with Cranelift!
Still missing state persistence across hot-reloads, and feedback loops, but it's already pretty fun to play with :)
#algorave #rust #rhai #cranelift
I've added several new template kinds because of method declarations and implementations, as well as a changed `AActor.rhai` script. Most of the logic is now out of #rustlang and lives in #rhai and text templates! That makes me SO happy!

Okay, say I went full yolo and actually decided to ditch all our #TypeScript and rewrite everything in #Rust, as one does.

I still need to provide some scripting layer for normal sane people I would be forcing to use this (of which there might end up being many).

Any suggestions? Boosts appreciated 

- #Rhai seems pretty popular, but some decisions are weird, to say the least (e.g. https://rhai.rs/book/ref/fn-closure.html#admonition-beware-captured-variables-are-truly-shared). Kinda evokes PHP memories.
- #Gluon is proper static, which is probably really good for performance, less certain about experience.
- #Rune and #Dyon both look nice and simple. But also looks like there's no way to declare any useful type information for the dev tools.
- #Boa would let us actually keep TypeScript, which is nice, because its type system is just the best ever. But I'm not sure it's stable or fast enough yet.
- Embedding or building around #Deno is always an option, but having to spin up #V8 whenever any script needs to be run kinda defeats the purpose of moving to something more performant in the first place.

Idk. Would love to hear literally any thoughts on this. Please talk to me 

The use case is mostly "business logic", e.g. ORM/CRUD stuff, web/API handlers. Simple code written fast, by people of varying experience.

Closures - Rhai - Embedded Scripting for Rust

Tutorial and reference on the Rhai scripting engine and language.

I've been using #Knitfile for a while and it's pretty good.
https://zyedidia.github.io/blog/posts/3-knit-better-make/

But now I get annoyed with Lua `require()` which doesn't allow arbitrary path. I think replacing Lua with #Rhai script should solve the problem. Unlike gopher-lua, rhai provide a way to customize the syntax. However, the whole project (:knit) need to be rewritten in Rust 😅

Knit: making a better Make | Zachary Yedidia's blog

#Rhai is a scripting language for #Rust.

Rhai is a configurable, embeddable scripting language for use in Rust programs. Rhai scripts can easily be loaded and executed from a Rust program, even for no-std or #WebAssembly targets. Rhai supports closures, OOP, dynamic typing, and a simplified Rust-like syntax. Functions and operators can easily be added to Rhai, as well as entirely new syntax.

Website 🔗️: https://rhai.rs/

#free #opensource #foss #fossmendations #programming #WASM

Rhai – Embedded Scripting for Rust

Embedded scripting language and engine for Rust. A small, fast, easy-to-use scripting language and evaluation engine that integrates tightly with Rust. Builds for most common targets including no-std and WASM.

Can we drag-n-drop (Rust-like) #Rhai Scripts ... And run them on #BL602 and BL604? Let's find out!

https://lupyuen.github.io/articles/rhai

Rust on RISC-V BL602: Rhai Scripting

Can we drag-and-drop Rhai Scripts... And run them on WebAssembly and BL602 RISC-V SoC?

Rust on RISC-V BL602: Rhai Scripting

Can we drag-and-drop Rhai Scripts... And run them on WebAssembly and BL602 RISC-V SoC?

Rust on RISC-V BL602: Rhai Scripting

Can we drag-and-drop Rhai Scripts... And run them on WebAssembly and BL602 RISC-V SoC?

#Rhai Maintainers are watching our work on #BL602 and BL604 yay! 🎉

https://github.com/lupyuen2/blockly-bl602/issues/1

Transcode Rhai to S-Expressions · Issue #1 · lupyuen2/blockly-bl602

Hi, maintainer of Rhai here. I see that you're transcoding Rhai into an S-expression syntax. Wonder how you're doing that and whether there is anything we can do to help.

Rust on RISC-V BL602: Rhai Scripting

Can we drag-and-drop Rhai Scripts... And run them on WebAssembly and BL602 RISC-V SoC?