Skip to content

Releases: tessi/wasmex

v0.14.0

16 Dec 10:05

Choose a tag to compare

Changed

  • Switch the concurrency model of the underlying Wasm calls to async rust via tokio. This essentially means that instead of spawning a new OS (native operating system) thread for every Wasm call, we have a pool of worker OS threads where each Wasm function call spawns a green thread to be handled by our worker pool eventually. This is much more friendly on system resources and speeds up wasmex considerably. For details see #837. Thanks @patrickdet
  • Updated dependencies - most importantly wasmtime from 35 to 39
  • Fixed outdated Wasm Component documentation about option-types to be up-to-date with the change introduced in 0.11.0

v0.13.0

06 Sep 12:53

Choose a tag to compare

Changed

  • map-keys/records for wasm components now automatically convert beween Wasms default dash-case and elixirs snake_case. With an option to disable it - fixes #852 (thanks @superchris)

Fixed

  • using the Wasm compontent macro is now possible with an empty imports list - fixes #760 (thanks @superchris)

v0.12.0

29 Jul 20:29
232d621

Choose a tag to compare

Added

  • Added support for calling Wasm Components functions by path. This allows e.g. exported interface functions to be called by using the fully qualified path {"wasmex:simple/[email protected]", "add"}.
  • Wasm Components: Variants can now be addressed using binaries (before it was only atoms)
  • Added precompilation support for apples iOS target

Changed

  • Updated dependencies, including wasmtime to 35.0.0
  • Changed error messages when converting between Wasm types and Elixir types to include the field name and path where the error occurred.
  • Fixed edge case for converting results from a call into an imported function from a wasm component when the type conversion needs to de-reference a wasmtime type. See: #810 - thanks @Lucky1313

v0.11.2

25 May 11:35
e47ba21

Choose a tag to compare

Added

  • Added support for compiling Wasm text format (WAT) to Wasm binaries -> Wasmex.Wat.to_wasm/1

v0.11.1

23 May 11:00
b702f82

Choose a tag to compare

Changed

  • Build precompiled binaries on older github runners to support a wider range of platforms. See #774

v0.11.0

12 May 11:43
fbf4302

Choose a tag to compare

Added

  • Added support for components to import namespaces. This allows, for example, to implement the default wasi implementation in Elixir.
  • Added more type conversions and better error messages for component function imports/exports
  • Better error messages when casting a component-model record type with missing fields (before we ran into a runtime error instead)
  • Added support for passing an Instance to Wasmex.start_link (allowing efficient pre-compilation of wasm modules) #765

Changed

  • Component model type conversion:
    • Options are now converted to/from Elixir with either :none or {:some, term()}. Previously, the nil value was used to represent :none.
    • Result types, when not having a value associated with its error or ok case, just returns the :error or :ok atom instead of a tuple.

v0.10.0

11 Mar 21:24
42712d4

Choose a tag to compare

Added

  • Support for Wasm Components - Huge thanks to @superchris for his amazing first contribution and continues effort to improve this feature. Read more about Wasm Component support in the Wasmex.Components module documentation.
  • wasmtime trap information is now available on function call errors, if available #620

Changed

  • Updated wasmtime to 30.0.2 (thanks to @mangas for the intermediate wasmtime update to 28.0.0 as his first contribution! #694)

v0.9.2

08 Nov 11:35

Choose a tag to compare

Added

Changed

  • Updated rustler to 0.35.0 and rustler_precompiled to 0.8 (thanks @DnOberon)
  • Updated wasmtime to 26.0.1

v0.9.1

08 Nov 11:40
4b41a93

Choose a tag to compare

Same as 0.9.1, but with correct checksum for precompiled binaries

Wasmtime rewrote their fuel-related API and simplified it. To remain consistent with Wasmtime, we follow this change in this release. A Wasmex `Store` now only implements `set_fuel/2` and `get_fuel/1`. All other methods are removed with this release.

The underlying implementation of the fuel system got rewritten as well. If you are using fuel in your app,
please check your fuel consumption values.

- official support for Elixir 1.15 and 1.16
- fuel-related API got rewritten, because the underlying Wasm library (wasmtime) changed their API and we want to be consistent. Added `Store.get_fuel/1` and `Store.set_fuel/2` which is a much simpler API than before.
- read and write a global’s value with `Instance.get_global_value/3` and `Instance.set_global_value/4` ([#540](https://github.com/tessi/wasmex/pull/540))
- ability to dynamically link wasm modules ([#596](https://github.com/tessi/wasmex/pull/596)) thanks @munjalpatel
- ability to use 128 bit unsigned integers (wasm type `V128`)
- added support for multi-value returns from WASM and elixir callbacks. This enables passing string return values safely by pointer and length, for example.

- removed support for Elixir 1.12
- with the fuel-related API changed, the existing methods on `Store` (`consume_fuel`, `fuel_remaining`, `add_fuel`) were removed. Please call `set_fuel/2` and `get_fuel/1` instead.

- Dependency updates (most notably wasmtime and rustler) - thanks @RoyalIcing and @scrogson
- removed dialyzer

v0.9.0

25 Jul 09:56
4bf8bfd

Choose a tag to compare

Wasmtime rewrote their fuel-related API and simplified it. To remain consistent with Wasmtime, we follow this change in this release. A Wasmex Store now only implements set_fuel/2 and get_fuel/1. All other methods are removed with this release.

The underlying implementation of the fuel system got rewritten as well. If you are using fuel in your app,
please check your fuel consumption values.

Added

  • official support for Elixir 1.15 and 1.16
  • fuel-related API got rewritten, because the underlying Wasm library (wasmtime) changed their API and we want to be consistent. Added Store.get_fuel/1 and Store.set_fuel/2 which is a much simpler API than before.
  • read and write a global’s value with Instance.get_global_value/3 and Instance.set_global_value/4 (#540)
  • ability to dynamically link wasm modules (#596) thanks @munjalpatel
  • ability to use 128 bit unsigned integers (wasm type V128)
  • added support for multi-value returns from WASM and elixir callbacks. This enables passing string return values safely by pointer and length, for example.

Removed

  • removed support for Elixir 1.12
  • with the fuel-related API changed, the existing methods on Store (consume_fuel, fuel_remaining, add_fuel) were removed. Please call set_fuel/2 and get_fuel/1 instead.

Changed

  • Dependency updates (most notably wasmtime and rustler) - thanks @RoyalIcing and @scrogson
  • removed dialyzer