(exps, s)
| 65 | }; |
| 66 | |
| 67 | function encodeStr(exps, s) { |
| 68 | const bytes = TE.encode(s); |
| 69 | const ptr = exps.wasm_alloc(bytes.length); |
| 70 | new Uint8Array(exps.memory.buffer, ptr, bytes.length).set(bytes); |
| 71 | const h = exps.host_edge_encode(TAG_BYTES, ptr, bytes.length); |
| 72 | exps.wasm_free(ptr, bytes.length); |
| 73 | return h; |
| 74 | } |
| 75 | function encodeInt(exps, n) { |
| 76 | const buf = exps.wasm_alloc(16); |
| 77 | const view = new DataView(exps.memory.buffer); |