Skip to main content

Crate tsurara_plugin

Crate tsurara_plugin 

Source
Expand description

Write tsurara plugins in Rust. A plugin is a binary that calls run with its stages; tsurara runs it once per run (for example runtime: [cargo, run, --quiet, --manifest-path] with the plugin’s Cargo.toml as the module) and calls the stages it declares over the session protocol (tsurara_backend::session, design.md 11.2). The inputs use the real types of the model and the manifest. Embedders of tsurara as a library implement tsurara_backend::plugin::Plugin instead.

Structs§

ExtendInput
What the extend stage receives, owned.
Manifest
Model
OutputFile
Plugin
A plugin: a name and any of the stages. transform_document and transform_model work on JSON values, so that nothing a newer tsurara adds is lost.

Functions§

run
Serves the plugin on stdin and stdout until stdin closes.
serve
Serves the plugin on input and output until input ends.