You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been planning to add some config options for the initial stack sizes when initializing stores that hopefully should mostly solve this in the short term.
The main reason for this Struct of Arrays pattern for the stack is to allow for using native rust number/simd types for the stack values instead of having to hope the rust compiler turns the byte conversions into transmutes. This also depends on the alignment so probably wouldn't be very efficient if everything shared the same stack without adding a lot of memory usage by padding everything (which was the previous solution i used). I'd be also open for other ideas, it's not super ergonomic/efficient to have to pass around 4 different stack pointers everywhere.
Currently, tinywasm uses multiple vectors to store the stack values for each type size supported (
tinywasm/crates/tinywasm/src/interpreter/stack/value_stack.rs
Line 13 in c00031a
This increases the default stack size by a lot, which makes it difficult to use tinywasm on restrained devices (ex: MCUs).
Is it something desired for the stacks to be consolidated into a single one?
I can think of some ways to do it, but a deeper discussion should be done.
The text was updated successfully, but these errors were encountered: