This is currently in typescript, also by way of bun.
All of the above can be easily changed based on your preferences. Worth noting that, once built and deployed, it all becomes basic js and can be used in any node project anyways. Bun is just a really convenient, fast, minimal-config way of developing it.
Development notes:
The lib implementation has some test usage hardcoded.
I get a seg fault while trying to actually load the ys file, but I lack experience debugging this sort of thing.
BTW: There's an alternate universe in which the ys compiler is written in cross platform cljc/cljs/clj, where the node bindings are really a cljs project that simply uses clojure code. Not sure how feasible that is, having not looked at the compiler implementation, or if you'd ever be interested in that, but some food for thought.
Hi. Nice meeting ya the other day!
Here's the starter PR for implementing a node binding for yamlscript.
Approach notes:
node
, as separate from the existing skeletonjs
/coffeescript
implementation dir.bun
, which has its own ffi implementation.bun
.All of the above can be easily changed based on your preferences. Worth noting that, once built and deployed, it all becomes basic js and can be used in any node project anyways. Bun is just a really convenient, fast, minimal-config way of developing it.
Development notes:
BTW: There's an alternate universe in which the ys compiler is written in cross platform cljc/cljs/clj, where the node bindings are really a cljs project that simply uses clojure code. Not sure how feasible that is, having not looked at the compiler implementation, or if you'd ever be interested in that, but some food for thought.