Stream: git-wasmtime

Topic: wasmtime / issue #13817 .cwasm requires 64KB alignment fo...


view this post on Zulip Wasmtime GitHub notifications bot (Jul 04 2026 at 18:10):

Destructor17 opened issue #13817:

Steps to Reproduce

Expected Results

Alignment requirement is 4KB

Actual Results

Alignment requirement is 65536 (64KB)

Versions and Environment

Tested on https://github.com/bytecodealliance/wasmtime/commit/11350e99f753c3c6c26bce41d5211cf8e5761df6, the most recent main at the time of wwriting

Operating system: Ubuntu (but Windows target)

Architecture: x86_64 (but AArch64 target)

Extra Info

It looks like this function determines alignment requirement

https://github.com/bytecodealliance/wasmtime/blob/11350e99f753c3c6c26bce41d5211cf8e5761df6/crates/environ/src/compile/mod.rs#L370

This blogpost says that Windows always uses 4KB pages (with exception of Alpha AXP and Itanium). And page_size_align returns 4KB for Windows in all cases but Arm64.

I'm trying to put .cwasm right into my embedder's .exe by wrapping it with COFF and linking it, and turns out COFF supports alignment requirement only up to 8KB.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 04 2026 at 18:10):

Destructor17 added the bug label to Issue #13817.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 04 2026 at 18:11):

Destructor17 edited issue #13817:

Steps to Reproduce

Expected Results

Alignment requirement is 4KB

Actual Results

Alignment requirement is 65536 (64KB)

Versions and Environment

Tested on https://github.com/bytecodealliance/wasmtime/commit/11350e99f753c3c6c26bce41d5211cf8e5761df6, the most recent main at the time of wwriting

Operating system: Ubuntu (but Windows target)

Architecture: x86_64 (but AArch64 target)

Extra Info

It looks like this function determines alignment requirement

https://github.com/bytecodealliance/wasmtime/blob/11350e99f753c3c6c26bce41d5211cf8e5761df6/crates/environ/src/compile/mod.rs#L370

This blogpost says that Windows always uses 4KB pages (with exception of Alpha AXP and Itanium). And page_size_align returns 4KB for Windows in all cases but Arm64.

I'm trying to put .cwasm right into my embedder's .exe by wrapping it with COFF and linking it, and turns out COFF supports alignment requirement only up to 8KB.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 06 2026 at 16:45):

fitzgen closed issue #13817:

Steps to Reproduce

Expected Results

Alignment requirement is 4KB

Actual Results

Alignment requirement is 65536 (64KB)

Versions and Environment

Tested on https://github.com/bytecodealliance/wasmtime/commit/11350e99f753c3c6c26bce41d5211cf8e5761df6, the most recent main at the time of wwriting

Operating system: Ubuntu (but Windows target)

Architecture: x86_64 (but AArch64 target)

Extra Info

It looks like this function determines alignment requirement

https://github.com/bytecodealliance/wasmtime/blob/11350e99f753c3c6c26bce41d5211cf8e5761df6/crates/environ/src/compile/mod.rs#L370

This blogpost says that Windows always uses 4KB pages (with exception of Alpha AXP and Itanium). And page_size_align returns 4KB for Windows in all cases but Arm64.

I'm trying to put .cwasm right into my embedder's .exe by wrapping it with COFF and linking it, and turns out COFF supports alignment requirement only up to 8KB.


Last updated: Jul 29 2026 at 05:03 UTC