All notable changes to this project will be documented in this file.
The format of this file is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Add ability to add
publish
to the generated Cargo.toml file (#208) - Fix generating publish value as a toml bool (#209)
- 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
.
- 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.RustPluginConfig
now needs to be initialized usingRustPluginConfig::builder()
. Struct initialization syntax will not work anymore.- 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.
- The TypeScript runtime now uses streaming instantiation for the WebAssembly module by default.
BindingsType::TsRuntimeWithExtendedConfig
has been renamed back toBindingsType::TsRuntime
(and the oldBindingsType::TsRuntime
, which was deprecated in 2.0.0, is now removed).- 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
- 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.
- Allow the
Runtime
to be cloned (to reuse compiled WASM modules) - Added support for generating cargo dependencies that inherit from the workspace dependencies
- Added support for configuring
default_features
in Cargo dependencies.
- Added the
serde-json-compat
feature for compatibility with theserde_json::Value
type.
- Use the Wasmer Singlepass compiler on all architectures (Cranelift was used previously because Singlepass did not yet support arm64 chips)
- Add support for arrays of primitives (#94).
- Added the
bytes-compat
feature for compatibility with thebytes
crate. - 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.
- Fix custom types in generic positions in export function signatures (#130).
- The
TypeIdent
struct has been altered. If you have customSerializable
implementations you likely need to update those.
- 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 ofBindingsType::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 representrmpv::Value
(#127). - Fix issue when TypeScript types conflicted with built-in JavaScript globals (#128).
- Fix custom types in generic positions (#126).