docs: Create compiletime README

master
Sean McBride 3 years ago
parent 93a7ed0017
commit ded4717ed8

@ -0,0 +1,5 @@
A WebAssembly module instance is statically linked with the backing functions implementing the wasm32 ABI, yielding a *.so file that SLEdge can execute. This ensures that the instance is able to aggressively inline and optimize this code.
They are broken into instruction types as on https://webassembly.github.io/spec/core/exec/instructions.html. They depend on common headers for the WebAssembly types located in the WebAssembly instance struct. These are located in runtime/include/common.
The stubs correspond to awsm/src/codegen/runtime_stubs.rs

@ -1,11 +1,6 @@
#include "types.h"
/* This file contains the stub functions that the aWsm compiler expects
* This corresponds to awsm/src/codegen/runtime_stubs.rs
* This should be linked with the *.bc file generated by aWsm in order to compile a module as a *.so
*/
extern thread_local struct wasm_module_instance current_wasm_module_instance;
INLINE void
@ -24,13 +19,6 @@ add_function_to_table(uint32_t idx, uint32_t type_id, char *pointer)
};
}
/*
* Table handling functionality
* This was moved from compiletime in order to place the
* function in the callstack in GDB. It can be moved back
* to runtime/compiletime/memory/64bit_nix.c to remove the
* additional function call
*/
INLINE char *
get_function_from_table(uint32_t idx, uint32_t type_id)
{

Loading…
Cancel
Save