MCPcopy Create free account
hub / github.com/bytecodealliance/wit-bindgen / remote_pkg

Function remote_pkg

crates/go/src/lib.rs:37–45  ·  view source on GitHub ↗

Adds the shared package repository prefix to a package name.

(name: &str)

Source from the content-addressed store, hash-verified

35
36/// Adds the shared package repository prefix to a package name.
37fn remote_pkg(name: &str) -> String {
38 let prefix = match name {
39 "types" => "witTypes",
40 "async" => "witAsync",
41 "runtime" => "witRuntime",
42 _ => unimplemented!(),
43 };
44 format!(r#"{prefix} "go.bytecodealliance.org/pkg/wit/{name}""#)
45}
46
47/// The version of github.com/bytecodealliance/go-pkg that's being used
48const REMOTE_PKG_VERSION: &str = "v0.2.1";

Callers 11

type_nameMethod · 0.85
future_or_streamMethod · 0.85
preprocessMethod · 0.85
importMethod · 0.85
exportMethod · 0.85
return_pointerMethod · 0.85
emitMethod · 0.85
type_resourceMethod · 0.85
type_tupleMethod · 0.85
type_optionMethod · 0.85
type_resultMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected