Skip to content

Commit

Permalink
Merge pull request #22 from yamt/global
Browse files Browse the repository at this point in the history
Mention an alternative approach for toolchains
  • Loading branch information
fitzgen authored Jun 11, 2024
2 parents da39cfc + dc25dd3 commit a05c4dc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions proposals/custom-page-sizes/Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,17 @@ This approach has the following benefits:

[imagine]: https://github.com/WebAssembly/custom-page-sizes/issues/3

Alternatively, the linker could inject an immutable global defining the page
size and relocate uses of the `__builtin_wasm_page_size()` to `global.get
$injected_page_size_global` instead of `i32.const $page_size`. This is mostly
equivalent, and should not fundamentally have any more or less potential for
optimization by the Wasm consumer, but may allow [dynamic linking] to either
assert an expected page size (to double check against dynamic linking errors at
runtime) or even for a shared library module to be compatibly linked with
modules using any page size.

[dynamic linking]: https://github.com/WebAssembly/tool-conventions/blob/main/DynamicLinking.md

### How This Proposal Satisfies the Motivating Use Cases

1. Does this proposal help Wasm better target resource-constrained environments,
Expand Down

0 comments on commit a05c4dc

Please sign in to comment.