MCPcopy Create free account
hub / github.com/arcjet/gravity / new

Method new

cmd/gravity/src/codegen/bindings.rs:35–45  ·  view source on GitHub ↗

Creates a new bindings generator for the selected world.

(resolve: &'a Resolve, world: &'a World, sizes: &'a SizeAlign)

Source from the content-addressed store, hash-verified

33impl<'a> Bindings<'a> {
34 /// Creates a new bindings generator for the selected world.
35 pub fn new(resolve: &'a Resolve, world: &'a World, sizes: &'a SizeAlign) -> Self {
36 let world_name = &world.name;
37 let wasm_var = GoIdentifier::private(format!("wasm-file-{world_name}"));
38 Self {
39 resolve,
40 world,
41 out: Tokens::new(),
42 raw_wasm_var: wasm_var,
43 sizes,
44 }
45 }
46
47 /// Adds the given Wasm to the bindings.
48 pub fn include_wasm(&mut self, wasm: WasmData) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected