S-Juvix
Juvix
storage space on Anoma comes at a premium, thus having small binaries is important.
A typical rust WASM binary for VP's comes out to 100KB or less.
Thus if we want to be practical to the usecase of Anoma, we will have to have a small runtime.
Anoma uses wasmer which [1] seems to allocate A lot of vram. Normally when we start our memory image pool, we should allocate almost infinite vram to have a stable memory pool to keep allocating to. Further for VP, the runtime is expected to be quite fast, and thus contracts are short lived.
Due to these two points, we should implement the GC in such a way that when we generate out to WASM, we should replace the runtime GC functions with a naieve implementation that just mallocs to the pool without any GC triggering. We can do this by linking it against the naieve implementation rather than the real one when extracting out to VP WASM.
Ideally our implementation should take into account how we can best produce a small runtime and how to collapse a big binary into a tiny binary.
We should look at ECL and FACTOR. When factor was young it often dumped binaries that were under a MB. We should also look at ECL, as if you use compile to a linker instead of a binary program, you can make the actual deployed image quite small (though I have not investigated how big libECL is nor how big the linked binaries are)
[1] citation needed