Browse Source

Add `lib.rdynamic = true;`. Otherwise, symbols wont be exported to `result.instance.exports`

Daniel Sanchez 1 year ago
parent
commit
9ec00d9e73
1 changed files with 1 additions and 0 deletions
  1. 1 0
      build.zig

+ 1 - 0
build.zig

@@ -21,6 +21,7 @@ pub fn build(b: *std.build.Builder) void {
 
 
     // https://github.com/ziglang/zig/issues/8633
     // https://github.com/ziglang/zig/issues/8633
     lib.global_base = 6560;
     lib.global_base = 6560;
+    lib.rdynamic = true;
     lib.import_memory = true; // import linear memory from the environment
     lib.import_memory = true; // import linear memory from the environment
     lib.initial_memory = wasm_initial_memory; // initial size of the linear memory (1 page = 64kB)
     lib.initial_memory = wasm_initial_memory; // initial size of the linear memory (1 page = 64kB)
     lib.max_memory = wasm_initial_memory; // maximum size of the linear memory
     lib.max_memory = wasm_initial_memory; // maximum size of the linear memory