I read in the Csharp bindings that export bindings can be statically allocated for the return area while there is no option for imports because they use the stack. I was wondering if someone can elaborate on this! What makes exports a good candidate for this versus imports?
This is generally a per-language decision and per-bindings-generator decision. It largely boils down to runtime requirements and such. Rust doesn't use statically allocated areas for imports to work in cases like the WASIp1-to-WASIp2 adapter which has very strict requirements on what memory can be used where. I don't think there's an issue otherwise in using statically allocated areas for imports
Alex Crichton said:
This is generally a per-language decision and per-bindings-generator decision. It largely boils down to runtime requirements and such. Rust doesn't use statically allocated areas for imports to work in cases like the WASIp1-to-WASIp2 adapter which has very strict requirements on what memory can be used where. I don't think there's an issue otherwise in using statically allocated areas for imports
Awesome thank you!
Last updated: Nov 22 2024 at 16:03 UTC