Rust
Embedding Stof in Rust.
Because Stof is written in Rust, there is a lot of support for using Stof with Rust.
Take a look at our GitHub repository to see how Stof is implemented.
To add Stof to your Rust project, use cargo:
The main interfaces to Stof are the document (SDoc) and graph (SGraph). If you're working primarily with the Stof language interface (like in the rest of these documents), you won't need to interact with the graph. However, if you need deeper control, the graph organizes and stores the data.
Make sure to check out the introduction and design of Stof. This will help you get started with deep programmatic control over your Stof data in Rust.
Hello, World!
The classic first program. A document can be constructed from a string, file, or binary (Vec<u8>) (each with a format specifier). In this case, we are constructing a document from a Stof string.
The Stof "language" is just a format that gets parsed, just like any other in Stof. As such, it can be parsed into the document at any time, just like JSON or any other format.
Last updated
Was this helpful?