Skip to main content
Glama
main.rs623 B
use std::env::args; use petgraph::dot::{ Config, Dot, }; use si_pkg::SiPkg; use tokio::fs; #[tokio::main] async fn main() -> Result<(), Box<dyn std::error::Error>> { let mut args = args(); let path = args.nth(1).expect("usage: program <DIR>"); println!("--- Reading object tree from dir: {path}"); let buf = fs::read(&path).await?; let pkg = SiPkg::load_from_bytes(&buf)?; let (graph, _root_idx) = pkg.as_petgraph(); println!( "\n---- snip ----\n{:?}\n---- snip ----\n", Dot::with_config(graph, &[Config::EdgeNoLabel]) ); println!("--- Done."); Ok(()) }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/systeminit/si'

If you have feedback or need assistance with the MCP directory API, please join our Discord server