2 ms·
Tangential: I wanted to embed a sane sandboxed scripting language in a node app and found… nothing. Only options were a completely broken node sub vm, half-brok
by baq 3y ago
Tangential: I wanted to embed a sane sandboxed scripting language in a node app and found… nothing. Only options were a completely broken node sub vm, half-broken js sandbox which isn’t maintained and slightly less half broken js sandbox?
Does everyone roll their own when they need to embed logic expressions in their yamls?
- crabmusket 3y agoI've wondered the same. There's https://jsonlogic.com/ https://jsonlogic.com/ but that seems like a data interchange format for logic, not something an end user or developer would write themselves.
- Nihilartikel 3y agoThe SCI/babashka clojure interpreter might be a good fit, if you're ok with a lisp. It's mature and fully sandboxed. https://github.com/babashka/nbb https://github.com/babashka/nbb
- 0cf8612b2e1e 3y agoLua is usually the embedded language of choice. If you are focused on security, you could check out the Roblox fork, Luau (https://github.com/Roblox/luau https://github.com/Roblox/luau) where the creators took extra care to lock down the language on what scripts could do.
- dmux 3y agoIf Scheme is something you enjoy, BiwaScheme's interpreter can be instantiated from within Javascript and can be used to evaluate Scheme code. https://www.biwascheme.org/ https://www.biwascheme.org/