MCPcopy Create free account
hub / github.com/ciphermodelabs/ciphercore / main

Function main

ciphercore-base/src/bin/ciphercore_visualize_context.rs:220–234  ·  view source on GitHub ↗

This binary generates a [Graphviz](https://graphviz.org/) DOT code on a given serialized context. To create images from this code, generate a graphviz file ```bash ./< this_binary > > .gv ``` and use one of the following commands to convert this file to other media types. ```bash dot -Tjpeg .gv -o sample_graph.jpeg ``` ```bash dot -Tpng .gv -o sam

()

Source from the content-addressed store, hash-verified

218///
219/// < this_binary > <input_path>
220fn main() {
221 // Initialize a logger that collects information about errors and panics within CipherCore.
222 // This information can be accessed via RUST_LOG.
223 env_logger::init();
224 // Execute CipherCore code such that all the internal errors are properly formatted and logged.
225 execute_main(|| -> Result<()> {
226 let args = Args::parse();
227 let serialized_context = fs::read_to_string(args.context_path)?;
228 let context: Context = serde_json::from_str::<Context>(&serialized_context)?;
229 let mut viz_code = String::from("");
230 generate_graphviz_context_code(context, &mut viz_code)?;
231 println!("{viz_code}");
232 Ok(())
233 });
234}

Callers

nothing calls this directly

Calls 2

execute_mainFunction · 0.85

Tested by

no test coverage detected