Skip to content

Commit

Permalink
wasm-opt --enable-bulk-memory Update cart.nimble
Browse files Browse the repository at this point in the history
The build with wasm-opt failed with the error:
[wasm-validator error in function 1] unexpected false: Bulk memory operations require bulk memory [--enable-bulk-memory]

Added --enable-bulk-memory flag to the template.
  • Loading branch information
0riginaln0 authored Jul 21, 2024
1 parent 17ad80f commit d3dab3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cli/assets/templates/nim/cart.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ task rel, "Build the cartridge with all optimizations":
after rel:
let exe = findExe("wasm-opt")
if exe != "":
exec(&"wasm-opt -Oz --zero-filled-memory --strip-producers {outFile} -o {outFile}")
exec(&"wasm-opt --enable-bulk-memory -Oz --zero-filled-memory --strip-producers {outFile} -o {outFile}")
else:
echo "Tip: wasm-opt was not found. Install it from binaryen for smaller builds!"

0 comments on commit d3dab3d

Please sign in to comment.