Skip to main content
Glama
main.rs920 B
use std::{ env, fs::File, io::Read as _, }; use dal::WorkspaceSnapshotGraph; use si_layer_cache::db::serialize; use tokio::time::Instant; type Result<T> = std::result::Result<T, Box<dyn std::error::Error + 'static>>; #[tokio::main] async fn main() -> Result<()> { let mut args = env::args(); let snap_path = args.nth(1).expect("usage: program <SNAPSHOT_FILE_PATH>"); let mut snap_file = File::open(snap_path)?; let mut snap_bytes = vec![]; snap_file.read_to_end(&mut snap_bytes)?; println!("snap bytes compressed: {}", snap_bytes.len()); let decompressed = serialize::decompress_to_vec(&snap_bytes)?; println!("decompressed: {}", decompressed.len()); let now = Instant::now(); let graph: WorkspaceSnapshotGraph = serialize::from_bytes(&snap_bytes)?; println!("deserialization took: {:?}", now.elapsed()); let _inner_graph = graph.graph(); 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