Skip to content

docs: document the Wide Arithmetic proposal - #326

Merged
hydai merged 1 commit into
WasmEdge:mainfrom
Lewis-panda:docs/wide-arithmetic
Nov 16, 2026
Merged

hydai merged 1 commit into
WasmEdge:mainfrom
Lewis-panda:docs/wide-arithmetic

Conversation

@Lewis-panda

Copy link
Copy Markdown
Contributor

Explanation

This adds documentation for the Wide Arithmetic proposal, which WasmEdge now supports in the interpreter, JIT and AOT modes. Users can enable it with the new --enable-wide-arithmetic flag (WasmEdge/WasmEdge#5550), but the docs do not mention the proposal or the flag yet.

Related issue

Related to WasmEdge/WasmEdge#5331.

What type of PR is this

/kind documentation

Proposed Changes

  • cli.md, parse.md, validate.md, instantiate.md, aot.md: add --enable-wide-arithmetic after --enable-threads. This follows the order in include/driver/options.h.
  • proposals.md: add Wide Arithmetic to the proposals table after Threads.
  • wide-arithmetic.md: add a guide page with CLI, AOT and C API examples, following the structure of the Garbage Collection page.

I assumed the next release is 0.19.0 for the "since" version. Please let me know if it should be different.

Validation with WasmEdge built from merged commit d49cd393961ddce8ebb61d6ffdc13d11fa241eb3 (Linux x86_64) and wasm-tools 1.258.0, using the wide.wat example from the new page:

Command Result
wasmedge --enable-wide-arithmetic --reactor wide.wasm add128 -1 0 1 0 prints 0 and 1
wasmedge --enable-wide-arithmetic --reactor wide.wasm mul_wide_u -1 2 prints -2 and 1
wasmedge --reactor wide.wasm add128 -1 0 1 0 loading failed: illegal opcode
wasmedge --enable-all --reactor wide.wasm add128 -1 0 1 0 prints 0 and 1
wasmedge compile --enable-wide-arithmetic wide.wasm wide_aot.wasm, then run with --run-mode=aot prints 0 and 1
wasmedge parse, validate, instantiate exit 0 with the flag, exit 1 without it

docusaurus build completes for all locales with no broken links.

This contribution was developed with assistance from Claude (Anthropic) and OpenAI Codex.

List the --enable-wide-arithmetic flag on the wasmedge, parse,
validate, instantiate and compile CLI pages, after --enable-threads to
match the order in include/driver/options.h.

Add the proposal to the WebAssembly proposals table and add a guide
page with CLI, AOT and C API examples.

Assisted-by: Claude (Anthropic)
Assisted-by: OpenAI Codex
Signed-off-by: YE-YU LIN <khjhs102109@gmail.com>
@Lewis-panda
Lewis-panda marked this pull request as ready for review November 16, 2026 09:59
@hydai
hydai merged commit f81cc43 into WasmEdge:main Nov 16, 2026
6 checks passed
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