feat: rebuild runtime memory layout #20
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently each node holds its own memory. This means that the output of each module is moved into "js land" and then into the next node. This is very inefficient. The idea is to rebuild the entire thing so there exists only one big memory, like this:
The downside is that this makes it a lot harder to cache the outputs of each node.
My Idea is to split this up into several steps:
1. Rewrite Macros so the wasm functions accept variadic arguments.
I want the execute functions inside the rust code to look like:
Then the macro should also check if the number of arguments matches the number of arguments inside the
definition.Then we can update the runtime to pass each argument as a single one.
2. Implement the Arena Allocator
Then we need to update the Nodes so that we have one global memory. And each node receives in addition to its arguments a address where it should start to write its output.
...