Stencila Schema for Rust
This crate provides Rust bindings for the Stencila Schema. It is primarily aimed at Rust developers wanting to programmatically generate or modify documents, particularly executable documents. For example, it is used in the Stencila Rust library.
Install
Use
This package exports a struct
for each type of document node in the Stencila Schema e.g. Article
, Paragraph
, CodeChunk
.
Note that all node properties e.g. familyNames
are made snake case e.g. family_names
for consistency with Rust conventions.
let article = Article ;
Develop
Get started by cloning this repository and using cargo
to run the tests,
Of course, you need to have Rust installed. If you want to re-generate src/types.rs
, you'll also need to have Node.js installed (to generate the Rust code from the schema's YAML files).