Created
November 26, 2021 10:07
-
-
Save rygo6/c1e20c9ce879a5a5e0bde885a0f20230 to your computer and use it in GitHub Desktop.
Rust WasmTime Problem.
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
struct Atype | |
{ | |
table: Table, | |
linker: Linker, | |
} | |
impl Atype | |
{ | |
pub fn new() -> Self | |
{ | |
linker = Linker::load(); | |
linker.add_func_cal( | x | { | |
// somehow need to access table from here. But all add_func_call | |
// on linker must be done before generating the resulting table from linker. | |
let entry = table.get(x); | |
} ); | |
linker.add_func_cal( | x, y | { | |
// will also need to access table from multiples of these closures | |
let entry = table.get(y); | |
} ); | |
table = linker.create_table(); | |
Self{ table: Table, linker: Linker} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment