Skip to content

Releases: fiberplane/fp-bindgen

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

28 Apr 15:03
4e95816
Compare
Choose a tag to compare

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.

v3.0.0-beta.1: v3 is now in beta

14 Feb 14:23
0053fa8
Compare
Choose a tag to compare
Pre-release

A lot has changed for this release, so please give this beta a try.

Added

  • Add support for serde_json::Map
    (#163).
  • Added support for specifying custom Cargo registries with CargoDependency.
  • Added helpers for building CargoDependency with a git repository.

Changed

  • Added MIT as an option to the project licensing.
  • Replaced the rust_plugin_module and rust_wasmer_runtime_module annotations
    with a single rust_module annotation.
  • 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.
  • CargoDependency is now marked as non-exhaustive to prevent future breaking
    changes.

Fixed

  • Make sure cargo check doesn't complain about unused imports in the generated
    plugin bindings.

Removed

  • BindingsType::TsRuntime, which was deprecated in 2.0.0, is now removed.

v2.2.0: Minor feature release

31 Aug 15:12
a8cb504
Compare
Choose a tag to compare

fp-bindgen v2.2.0 is a minor feature release that adds type support for serde_json::Value and contains a change for the Wasmer backend used in the Rust runtime.

New features

  • Added the serde-json-compat feature for compatibility with the serde_json::Value type.

Other changes

  • The Rust runtime now uses the Wasmer Singlepass compiler on all architectures (Cranelift was used previously on arm64 because Singlepass did not yet support those chips).

v2.1.0: Minor feature release

15 Aug 15:07
8ec3b33
Compare
Choose a tag to compare

fp-bindgen v2.1.0 is a minor feature release that adds additional type support and contains an important bugfix if you use one of the Rust bytes types in your protocol in combination with the TypeScript runtime.

New features

  • Add support for arrays of primitives (#94).
  • Added the bytes-compat feature for compatibility with the bytes crate.

Bug fix

  • Fixed an issue where embedded Uint8Arrays that were returned to the
    TypeScript runtime from Bytes or ByteBuf types in the Rust plugin could
    end up being corrupted.

v2.0.1: Bugfix release

20 Jul 08:26
e732b88
Compare
Choose a tag to compare

What's Changed

  • Fix custom types in generic positions in export function signatures (#130).

v2.0.0: Maintenance release

18 Jul 14:17
a3330e3
Compare
Choose a tag to compare

Breaking changes

  • The TypeIdent struct has been altered. If you have custom Serializable
    implementations you likely need to update those.

Other changes

  • Added Deno support for the TypeScript runtime.
  • Reorganized examples and improved documentation.
  • Added end-to-end tests.
  • Fix #105: Correctly handle passing negative integers as primitives (outside
    MessagePack) between Rust and TypeScript.
  • Fix type of MessagePack-encoded 64-bit integers in TypeScript bindings.
  • Fix handling synchronous responses from async plugin functions in TypeScript
    runtime.
  • Fix #108: Serialization of types from the time crate now works between Rust
    and TypeScript.
  • Implemented warnings when types that rely on custom Serde (de)serializers are
    used in contexts where their annotations cannot be used.
  • Various smaller bugfixes.
  • Deprecation: BindingsType::TsRuntime is now deprecated in favor of
    BindingsType::TsRuntimeWithExtendedConfig.
  • Fix #88: Bounds are propagated correctly to generated types (with the
    exception of the compile-time only Serializable bound).
  • Fix #88: Deal with the Unit (()) type.
  • Use any type in TypeScript to represent rmpv::Value (#127).
  • Fix issue when TypeScript types conflicted with built-in JavaScript globals
    (#128).
  • Fix custom types in generic positions (#126).