0xMiden / 0xMiden/compiler

Obtain the `heap_base` from Rust

Aperta
#610 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
codegen linker
Lingua principale
Rust
Stelle
115
Fork
84
Merge medio
1g 8h
PR unite (30g)
15

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.