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

Function writeBytes

runtime/worker/engine.js:118–122  ·  view source on GitHub ↗
(bytes)

Source from the content-addressed store, hash-verified

116 }
117
118 const writeBytes = (bytes) => {
119 const ptr = exports.wasm_alloc(Math.max(1, bytes.length));
120 new Uint8Array(exports.memory.buffer, ptr, bytes.length).set(bytes);
121 return ptr;
122 };
123
124 /* Register a main-thread module at `mt:<name>`: push a stub per export (the real call defers to the page) and tell the compiler its export names. */
125 const registerHost = (name, exportNames) => {

Callers 1

registerHostFunction · 0.70

Calls 1

setMethod · 0.80

Tested by

no test coverage detected