Releases: fiberplane/fp-bindgen
v3.0.0: Many minor features and preparing for Wasmer 3
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
CargoDependencywith a git repository. - Added
description,readmeandlicensefields toRustPluginConfig.
Changed
- BREAKING: The TypeScript runtime now uses streaming instantiation for the WebAssembly module by default.
- BREAKING:
BindingsType::TsRuntimeWithExtendedConfighas been renamed back toBindingsType::TsRuntime(and the oldBindingsType::TsRuntime, which was deprecated in 2.0.0, is now removed). - BREAKING: Renamed the
RustWasmerRuntimeandRustWasmerWasiRuntimetoRustWasmer2RuntimeandRustWasmer2WasiRuntime, respectively. This is in anticipation for supporting Wasmer 3 in an upcoming release. For more information, please see: #185 - BREAKING: Replaced the
rust_plugin_moduleandrust_wasmer_runtime_moduleannotations with a singlerust_moduleannotation. - BREAKING:
RustPluginConfignow needs to be initialized usingRustPluginConfig::builder(). Struct initialization syntax will not work anymore. - BREAKING:
CargoDependencyis now marked as non-exhaustive to prevent future breaking changes. - BREAKING: Renamed the
hostfeature towasmer2_host. - Added MIT as an option to the project licensing.
- Struct fields annotated with
skip_serializing_ifare treated as optional by the TypeScript binding generator. - Struct fields generated by
fp-bindgenwill not automatically add any Serde annotations that were not there in the original protocol definition. - Every field in the
RustPluginConfigbuilder can be set toRustPluginConfigValue::Workspaceto indicate the value in the generatedCargo.tomlshould come from the workspace instead. - Changed primitive tests in example to call imported functions from the plugin.
Fixed
v3.0.0-beta.1: v3 is now in beta
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
CargoDependencywith a git repository.
Changed
- Added MIT as an option to the project licensing.
- Replaced the
rust_plugin_moduleandrust_wasmer_runtime_moduleannotations
with a singlerust_moduleannotation. - Struct fields annotated with
skip_serializing_ifare treated as optional by
the TypeScript binding generator. - Struct fields generated by
fp-bindgenwill not automatically add any Serde
annotations that were not there in the original protocol definition. CargoDependencyis now marked as non-exhaustive to prevent future breaking
changes.
Fixed
- Make sure
cargo checkdoesn'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
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-compatfeature for compatibility with theserde_json::Valuetype.
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
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-compatfeature for compatibility with thebytescrate.
Bug fix
- Fixed an issue where embedded
Uint8Arrays that were returned to the
TypeScript runtime fromBytesorByteBuftypes in the Rust plugin could
end up being corrupted.
v2.0.1: Bugfix release
What's Changed
- Fix custom types in generic positions in export function signatures (#130).
v2.0.0: Maintenance release
Breaking changes
- The
TypeIdentstruct has been altered. If you have customSerializable
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
timecrate 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::TsRuntimeis now deprecated in favor of
BindingsType::TsRuntimeWithExtendedConfig. - Fix #88: Bounds are propagated correctly to generated types (with the
exception of the compile-time onlySerializablebound). - Fix #88: Deal with the Unit (
()) type. - Use
anytype in TypeScript to representrmpv::Value(#127). - Fix issue when TypeScript types conflicted with built-in JavaScript globals
(#128). - Fix custom types in generic positions (#126).