Crate gasm

Source

Modules§

optimize

Structs§

WasmBuilder
WASM building tool.

Constants§

TARGET

Functions§

build
Shorthand function to be used in build.rs.
insert_stack_end_export
Insert ‘__gear_stack_end’ export in module if there is global ‘__stack_pointer’. By default rust compilation into wasm creates global ‘__stack_pointer’, which initialized by end of stack address. Unfortunately this global is not export. By default ‘__stack_pointer’ has number 0 in globals, so if there is ‘__stack_pointer’ in a name section, then we suppose that 0 global contains stack end addr, and insert an export for this global. This export can be used in runtime to identify end of stack memory and skip its uploading to storage.