Skip to content

v3.0.0: Many minor features and preparing for Wasmer 3

Latest
Compare
Choose a tag to compare
@arendjr arendjr released this 28 Apr 15:03
· 11 commits to main since this release
4e95816

fp-bindgen v3.0.0 packs a lot of goodies. While we had to postpone the migration to Wasmer 3 itself, we did make all the preparations so that introducing Wasmer 3 support should be feasible without another breaking change. The main things to look out for are that some symbols, including the "host" feature, have been renamed to refer to wasmer2 explicitly.

Other nice feaures are support for JSON maps, better ways to specify Cargo fields and dependencies, and streaming instantiation support for the TypeScript runtime (which is also enabled by default).

Added

  • Added support for serde_json::Map (#163).
  • Added support for specifying custom Cargo registries with CargoDependency.
  • Added helpers for building CargoDependency with a git repository.
  • Added description, readme and license fields to RustPluginConfig.

Changed

  • BREAKING: The TypeScript runtime now uses streaming instantiation for the WebAssembly module by default.
  • BREAKING: BindingsType::TsRuntimeWithExtendedConfig has been renamed back to BindingsType::TsRuntime (and the old BindingsType::TsRuntime, which was deprecated in 2.0.0, is now removed).
  • BREAKING: Renamed the RustWasmerRuntime and RustWasmerWasiRuntime to RustWasmer2Runtime and RustWasmer2WasiRuntime, respectively. This is in anticipation for supporting Wasmer 3 in an upcoming release. For more information, please see: #185
  • BREAKING: Replaced the rust_plugin_module and rust_wasmer_runtime_module annotations with a single rust_module annotation.
  • BREAKING: RustPluginConfig now needs to be initialized using RustPluginConfig::builder(). Struct initialization syntax will not work anymore.
  • BREAKING: CargoDependency is now marked as non-exhaustive to prevent future breaking changes.
  • BREAKING: Renamed the host feature to wasmer2_host.
  • Added MIT as an option to the project licensing.
  • Struct fields annotated with skip_serializing_if are treated as optional by the TypeScript binding generator.
  • Struct fields generated by fp-bindgen will not automatically add any Serde annotations that were not there in the original protocol definition.
  • Every field in the RustPluginConfig builder can be set to RustPluginConfigValue::Workspace to indicate the value in the generated Cargo.toml should come from the workspace instead.
  • Changed primitive tests in example to call imported functions from the plugin.

Fixed

  • Made sure cargo check doesn't complain about unused imports in the generated plugin bindings.
  • Added workaround for imported functions with float arguments for wasmer2 in example, see #180.
  • Fixed async functions returning primitive values, including void async functions, see #178.