Obtain the `heap_base` from Rust
Offen
codegen
linker
- Vorherrschende Sprache
- Rust
- Sterne
- 115
- Forks
- 84
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 15
Beschreibung
Discussed in https://github.com/0xMiden/compiler/pull/604#issuecomment-3089661935
The `wasm_ld` exports `__heap_base` that holds the address for the start of the heap.
https://surma.dev/things/c-to-webassembly/
https://stackoverflow.com/questions/69994454/accessing-heap-base-when-building-a-wasm-binary-with-rust
Here are some allocators that use `__heap_base` for blockchains that use Wasm - https://github.com/search?q=static+__heap_base%3A+language%3ARust&type=code&l=Rust
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.