Skip to content

Commit

Permalink
export_native_api.md: Relax the "ground rule" (bytecodealliance#1577)
Browse files Browse the repository at this point in the history
Nothing wrong with passing structures and function pointers
as far as the native code is aware of and careful about the
ABI used in the wasm module.
  • Loading branch information
yamt authored Oct 12, 2022
1 parent aaea27c commit 1c89a37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/export_native_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ void foo2(wasm_exec_env_t exec_env,
The runtime builder should ensure not broking the memory sandbox when exporting the native function to WASM.
A few key ground rules:
A few recommendations:
- Never pass any structure/class object pointer to native (do data serialization instead)
- Do the pointer address conversion in the native API if "$\*" is not used for the pointer in the function signature
Expand Down

0 comments on commit 1c89a37

Please sign in to comment.