MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / main

Function main

crates/test-programs/src/bin/p1_path_link.rs:186–207  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

184}
185
186fn main() {
187 let mut args = env::args();
188 let prog = args.next().unwrap();
189 let arg = if let Some(arg) = args.next() {
190 arg
191 } else {
192 eprintln!("usage: {prog} <scratch directory>");
193 process::exit(1);
194 };
195
196 // Open scratch directory
197 let dir_fd = match open_scratch_directory(&arg) {
198 Ok(dir_fd) => dir_fd,
199 Err(err) => {
200 eprintln!("{err}");
201 process::exit(1)
202 }
203 };
204
205 // Run the tests.
206 unsafe { test_path_link(dir_fd) }
207}

Callers

nothing calls this directly

Calls 4

open_scratch_directoryFunction · 0.85
test_path_linkFunction · 0.85
unwrapMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected