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
CargoDependency
with a git repository. - Added
description
,readme
andlicense
fields toRustPluginConfig
.
Changed
- BREAKING: The TypeScript runtime now uses streaming instantiation for the WebAssembly module by default.
- BREAKING:
BindingsType::TsRuntimeWithExtendedConfig
has been renamed back toBindingsType::TsRuntime
(and the oldBindingsType::TsRuntime
, which was deprecated in 2.0.0, is now removed). - BREAKING: Renamed the
RustWasmerRuntime
andRustWasmerWasiRuntime
toRustWasmer2Runtime
andRustWasmer2WasiRuntime
, 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
andrust_wasmer_runtime_module
annotations with a singlerust_module
annotation. - BREAKING:
RustPluginConfig
now needs to be initialized usingRustPluginConfig::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 towasmer2_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 toRustPluginConfigValue::Workspace
to indicate the value in the generatedCargo.toml
should 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
CargoDependency
with a git repository.
Changed
- Added MIT as an option to the project licensing.
- Replaced the
rust_plugin_module
andrust_wasmer_runtime_module
annotations
with a singlerust_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
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 theserde_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
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 thebytes
crate.
Bug fix
- Fixed an issue where embedded
Uint8Array
s that were returned to the
TypeScript runtime fromBytes
orByteBuf
types 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
TypeIdent
struct 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
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 onlySerializable
bound). - Fix #88: Deal with the Unit (
()
) type. - Use
any
type 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).