Skip to content

Max opt level for wamrc and --xip to prevent .text section modification#25

Merged
marcinbugaj merged 2 commits intomasterfrom
mmbugaj/zisk-runner-stripped
Mar 3, 2026
Merged

Max opt level for wamrc and --xip to prevent .text section modification#25
marcinbugaj merged 2 commits intomasterfrom
mmbugaj/zisk-runner-stripped

Conversation

@marcinbugaj
Copy link
Collaborator

@marcinbugaj marcinbugaj commented Feb 28, 2026

That PR is an intermediate step in an attempt to run WAMR application in Zisk.

--xip mode is used to prevent .text section modification
--mllvm=-riscv-disable-using-constant-pool-for-large-ints is to prevent LLVM emitting relocations that would imply .text patching by WAMR runtime

That's needed if WAMR application is to be run on Zisk. In general, patching .text at runtime on zkVMs is not possible because zkVMs are much closer to Harvard architectures than to von Neumann architectures.

See the .md file for detailed information.

These changes are applied to QEMU for now. The work for Zisk version is ongoing.

@marcinbugaj marcinbugaj marked this pull request as draft February 28, 2026 20:08
@github-actions
Copy link

github-actions bot commented Mar 1, 2026

Benchmark Results (38f3b1d)

Language native w2c2-O0 w2c2-O3 wamr wasmer wasmtime
stateless 234581615 6025861923 N/A 2324683355 950465308 867140662
reva-client-eth 387746949 4471418835 1375615326 1944993051 N/A 1027893786

@psilva261
Copy link
Collaborator

Wow nice. Maybe this also simplifies debugging other issues related to this patch bytecodealliance/wasm-micro-runtime#4777. At least with some tweaking it also works on TinyGo which seems to need fewer relocations anyway but for Go I haven't had any luck yet.

@marcinbugaj marcinbugaj marked this pull request as ready for review March 2, 2026 14:49
@github-actions
Copy link

github-actions bot commented Mar 2, 2026

Benchmark Results (c6be91c)

Language native w2c2-O0 w2c2-O3 wamr wasmer wasmtime
stateless 234551280 6025861918 N/A 2324683355 950937268 866725428
reva-client-eth 387791662 4471418834 1375615326 1944993041 N/A 1028179858

@marcinbugaj marcinbugaj merged commit 37aee65 into master Mar 3, 2026
1 check passed
@marcinbugaj marcinbugaj deleted the mmbugaj/zisk-runner-stripped branch March 3, 2026 12:54
psilva261 added a commit that referenced this pull request Mar 3, 2026
* Add wasm-opt to image as optional tool (in general it wont add performance to clang/gcc optimized code though)
* use .aot ending for wamrc output files so aot-analyzer can be used
* update README with results from Pull request #25 max opt level for wamrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants