-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
In response to w3ctag/design-reviews#532
function print(...args) {
for (let x of args) console.log(x + "\n")
}
let table = new Table({element: "anyfunc", minimum: 10});
let print_i32 = new WebAssembly.Function({parameters: ["i32"], results: []}, print);
table.set(0, print_i32);
let print_f64 = new WebAssembly.Function({parameters: ["f64"], results: []}, print);
table.set(1, print_f64);
let print_i32_i32 = new WebAssembly.Function({parameters: ["i32", "i32"], results: []}, print);
table.set(2, print_i32_i32);In the above example where you are exporting a JS function to Wasm, wouldn't it makes sense it I could supply meta data (in the WebAssembly.Function call) that would be given to the print method when run, so that I could change the formatting.
Metadata
Metadata
Assignees
Labels
No labels