This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const source = fs.readFileSync("./await2.wasm"); | |
const typedArray = new Uint8Array(source); | |
;(async function () { | |
var callback, frame | |
var buffer = Buffer.from("hello world!!!\n") | |
var result = await WebAssembly.instantiate(typedArray, { | |
env: { | |
print: function (ptr, len) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
const mem = std.mem; | |
const Foo = struct { | |
string_bytes: std.ArrayListUnmanaged(u8), | |
/// Key is string_bytes index. | |
string_table: std.HashMapUnmanaged(u32, void, IndexContext, std.hash_map.default_max_load_percentage), | |
}; | |
const IndexContext = struct { |