Charlie Tapping
07/11/2024, 7:11 PMfun validate(module: Module): ChasmResult<Module, ValidationError>
This will be more useful for those looking to verify modules downloaded from remote sources. If you’re embedding modules statically in your app you should probably run this at compile-time instead.
You can see the new release here:
https://github.com/CharlieTap/chasm/releases/tag/0.7.0
And finally as always a rough roadmap of the next few months for those interested:
• A better api for host functions
Host functions are the foundation of building a WASI layer, something thats going to be really important in allowing Chasm to run any program. The current host function api is not the best, it requires the implementor to understand the internals of wasms stack machine and linear memory implementation. I’m hoping with a bit of codegen we can create something more intuative and hide away those internals.
• Stabilisation of the api ahead of 1.0
Currently I leak a lot of types from the runtime into the api itself, this is mostly due to the current implementation of host functions. Once that’s cleaned up I should be put a layer of abstraction between chasm and its internals and thus better shield users from breaking changes.
• Refactoring...
With the testsuite in place I’m now in a position where I can be more confident in making large changes without causing regressions. When I started the project I had very little knowledge of wasm, its specification and frankly how to build such a large interpreter. Over the course of the past few months I’ve seen a bunch of patterns and shapes emerge which I should be able to build abstractions around, alongside cleaning up some of the low hanging fruit dotted around.Alexey Illarionov
07/12/2024, 10:07 AMCharlie Tapping
07/12/2024, 10:10 AMCharlie Tapping
07/13/2024, 11:36 AMAlexey Illarionov
07/13/2024, 12:38 PM