Being able to allow custom behaviour via JS/TS in Rust is definitely something that I wanted to explore too.
If you haven’t already you should check out these two articles from the Deno blog website which go a bit further:
> Being able to allow custom behaviour via JS/TS in Rust
I understanding wanting to call out to Rust from JS/TS, but I don't think I understand wanting the reverse. Isn't a major goal of Rust not to have "custom behavior" that is invisible to the compiler?
quentinadam|2 years ago
https://deno.com/blog/roll-your-own-javascript-runtime
https://deno.com/blog/roll-your-own-javascript-runtime-pt2
dcdunkan|2 years ago
https://deno.com/blog/roll-your-own-javascript-runtime-pt3
smt88|2 years ago
I understanding wanting to call out to Rust from JS/TS, but I don't think I understand wanting the reverse. Isn't a major goal of Rust not to have "custom behavior" that is invisible to the compiler?
JLCarveth|2 years ago
rubenfiszel|2 years ago
That is ... exactly what windmill is https://github.com/windmill-labs/windmill
The orchestrator is built from scratch in rust using postgresql to store the state. The steps when in typescript are run in deno: https://github.com/windmill-labs/windmill/blob/main/backend/... and the transforms between the steps (piping outputs of any node to the input of any node) are actually javascript expressions run by deno JsRuntimes: https://github.com/windmill-labs/windmill/blob/f3ec9ca09dc37...
Narew|2 years ago
brabel|2 years ago
OMG. That's ridiculous.
Write the code in C or Zig, and use Lua for scripting, and you're down to under 1MB for the final binary.