MCPcopy Create free account
hub / github.com/WebAssembly/wasi-webgpu / package_version

Function package_version

generate/src/main.rs:67–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

65}
66
67fn package_version() -> semver::Version {
68 let version = fs::read_to_string("../wit/imports.wit")
69 .ok()
70 .and_then(|wit| {
71 wit.lines()
72 .find_map(|line| line.trim().strip_prefix("package wasi:webgpu@"))
73 .map(|rest| rest.trim_end_matches(';').trim().to_string())
74 })
75 .unwrap();
76 semver::Version::parse(&version).unwrap()
77}

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected