Imagine a JSON document with functions inside, scoped to just the document that contains them. Stof instantiates this doc as a small wasm env, and makes these functions safe to call. They can't access or manipulate anything but their own doc.
WebAssembly by itself is large in binary form, requires a lot of tooling, etc. Stof can be sent over the wire easily, is a superset of JSON for compatibility, and keeps the guarantees.
I created Stof not to replace a data format or anything, but to be a glue layer for data and distributed systems to work with one another. This includes I/O for interchange data like JSON, YAML, TOML, etc., but also complex data like PDFs, images, binaries, both structured and unstructured (good layer to turn one into the other).
The fact is, the layer of data and communication between apps tends to be a bit messy, and strict adapters compiled at build time tend to be insufficient for the dynamism of modern software.
This applies directly to AI-generated data and code, which is basically like calling into another untrusted service. With this, you can safely embed the execution, pick where things run, and combine harnesses like data. Works well as a "living" context, also with the JSON interop - just parse into or stringify sections of the Stof doc at runtime when needed, like agent tool defs.
The playground on the site runs entirely in your browser. Stof is written in Rust and has support for JS/TS and Python today.
I'd especially like feedback on whether the idea makes sense from the landing page, and where the docs need help.
GitHub: https://github.com/dev-formata-io/stof
Thank you!!
-CJ