docs.rs failed to build rustviz-lib-2.0.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
rustviz-lib
The Rust API for RustViz. Renders a single Rust source file through the RustViz rustc plugin and returns the resulting code-panel + timeline-panel SVGs.
use Rustviz;
let code = r#"
fn main() {
let s = String::from("hello");
let t = s;
println!("{}", t);
}
"#;
let rv = new.expect;
write?;
write?;
The plugin runs out-of-process. By default the lib shells out to
cargo rv-plugin against a generated tempdir crate (the local
backend), which means it needs the matching nightly toolchain + the
plugin installed:
For a sandboxed backend appropriate for untrusted input (e.g. a public
web playground), set RV_RUNNER=docker and ensure the
rustviz/rustviz-runner image is on the host. See
playground/SECURITY.md
for the full sandboxing contract.
If you just want a CLI rather than a programmatic API, install
rustviz-cli and use
rustviz svg / rustviz html.