Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions execution_graph/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let program = Arc::new(builder.build_verified()?);

let mut graph = ExecutionGraph::new(NoHost, Limits::default());
let node = graph.add_node(program, entry, vec!["x".into()]);
graph.set_input_value(node, "x", Value::I64(41));
let node = graph.add_node(program, entry, vec!["x".into()])?;
graph.set_input_value(node, "x", Value::I64(41))?;

let summary = graph.run_all()?;
assert_eq!(summary.executed_nodes, 1);
Expand Down
10 changes: 10 additions & 0 deletions execution_graph/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,13 @@ mod tape_access;
pub use access::{Access, AccessLog, HostOpId, NodeId, ResourceKey};
pub use graph::{ExecutionGraph, GraphError, NodeOutputs};
pub use report::{NodeRunDetail, ReportDetailMask, RunDetailReport, RunSummary};

/// Compiles the `README.md` code blocks as doctests so the Quick Start cannot
/// drift out of sync with the API.
///
/// This item exists only under `cfg(doctest)` (set while `cargo test --doc`
/// extracts doctests), so it is never built into the crate and never appears in
/// the rendered documentation.
#[cfg(doctest)]
#[doc = include_str!("../README.md")]
struct ReadmeDoctests;
10 changes: 10 additions & 0 deletions execution_tape/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,13 @@ pub(crate) mod typed;
pub mod value;
pub mod verifier;
pub mod vm;

/// Compiles the `README.md` code blocks as doctests so the Quick Start cannot
/// drift out of sync with the API.
///
/// This item exists only under `cfg(doctest)` (set while `cargo test --doc`
/// extracts doctests), so it is never built into the crate and never appears in
/// the rendered documentation.
#[cfg(doctest)]
#[doc = include_str!("../README.md")]
struct ReadmeDoctests;
Loading