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

Function encodeBool

runtime/src/rt.js:86–92  ·  view source on GitHub ↗
(exps, b)

Source from the content-addressed store, hash-verified

84 return h;
85}
86function encodeBool(exps, b) {
87 const buf = exps.wasm_alloc(1);
88 new Uint8Array(exps.memory.buffer, buf, 1)[0] = b ? 1 : 0;
89 const h = exps.host_edge_encode(TAG_BOOL, buf, 1);
90 exps.wasm_free(buf, 1);
91 return h;
92}
93function encodeFloat(exps, f) {
94 const buf = exps.wasm_alloc(8);
95 new DataView(exps.memory.buffer).setFloat64(buf, f, true);

Callers 2

makeRtFunction · 0.85
encodeAnyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected