MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / with_native

Method with_native

compiler/tests/common.rs:53–61  ·  view source on GitHub ↗
(self, spec: &str, bindings: Vec<NativeBinding>)

Source from the content-addressed store, hash-verified

51 }
52
53 pub fn with_native(self, spec: &str, bindings: Vec<NativeBinding>) -> Self {
54 // Partition by export-name convention, mirroring the real WASM host resolver.
55 let (bindings, classes, consts) = partition_bindings(bindings);
56 self.state.borrow_mut().modules.insert(
57 spec.to_string(),
58 Resolved::Native { bindings, classes, consts, canonical: spec.to_string() },
59 );
60 self
61 }
62
63 pub fn with_code(self, spec: &str, src: &str) -> Self {
64 self.state.borrow_mut().modules.insert(

Callers 1

build_resolverFunction · 0.80

Calls 2

partition_bindingsFunction · 0.85
insertMethod · 0.80

Tested by

no test coverage detected