mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-29 13:06:06 +03:00
7.8 KiB
7.8 KiB
wasm-bindgen
Change Log
Unreleased
Released YYYY-MM-DD.
Added
- TODO (or remove section if none)
Changed
- TODO (or remove section if none)
Deprecated
- TODO (or remove section if none)
Removed
- TODO (or remove section if none)
Fixed
- TODO (or remove section if none)
Security
- TODO (or remove section if none)
0.2.21
Released 2018-09-07
Added
- Added many more bindings for
WebAssembly
in thejs-sys
crate.
Fixed
- The "names" section of the wasm binary is now correctly preserved by wasm-bindgen.
0.2.20
Released 2018-09-06
Added
- All of
wasm-bindgen
is configured to compile on stable Rust as of the upcoming 1.30.0 release, scheduled for October 25, 2018. - The underlying
JsValue
of aClosure<T>
type can now be extracted at any time. - Initial and experimental support was added for modules that have shared memory (use atomic instructions).
Removed
- The
--wasm2asm
flag ofwasm2es6js
was removed because thewasm2asm
tool has been removed from upstream Binaryen. This is replaced with the newwasm2js
tool from Binaryen.
Fixed
- The "schema" version for wasm-bindgen now changes on all publishes, meaning we can't forget to update it. This means that the crate version and CLI version must exactly match.
- The
wasm-bindgen
crate now has alinks
key which forbids multiple versions ofwasm-bindgen
from being linked into a dependency graph, fixing obscure linking errors with a more first-class error message. - Binary releases for Windows has been fixed.
0.2.19 (and 0.2.18)
Released 2018-08-27.
Added
- Added bindings to
js-sys
for someWebAssembly
types. - Added bindings to
js-sys
for someIntl
types. - Added bindings to
js-sys
for someString
methods. - Added an example of using the WebAudio APIs.
- Added an example of using the
fetch
API. - Added more
extends
annotations for types injs-sys
. - Experimental support for
WeakRef
was added to automatically deallocate Rust objects when gc'd. - Added support for executing
wasm-bindgen
over modules that import their memory. - Added a global
memory()
function in thewasm-bindgen
crate for accessing the JS object that represent wasm's own memory.
Removed
- Removed
AsMut
implementations for imported objects.
Fixed
- Fixed the
constructor
andcatch
attributes combined on imported types. - Fixed importing the same-named static in two modules.
0.2.17
Released 2018-08-16.
Added
- Greatly expanded documentation in the wasm-bindgen guide.
- Added bindings to
js-sys
forIntl.DateTimeFormat
- Added a number of
extends
attributes for types injs-sys
Fixed
- Fixed compile on latest nightly with latest
proc-macro2
- Fixed compilation in some scenarios on Windows with paths in
module
paths
0.2.16
Released 2018-08-13.
Added
- Added the
wasm_bindgen::JsCast
trait, as described in RFC #2. - Added the
#[wasm_bindgen(extends = ...)]
attribute to describe inheritance relationships, as described in RFC #2. - Added support for receiving
Option<&T>
parameters from JavaScript in exported Rust functions and methods. - Added support for receiving
Option<u32>
and other option-wrapped scalars. - Added reference documentation to the guide for every
#[wasm_bindgen]
attribute and how it affects the generated bindings. - Published the
wasm-bindgen-futures
crate for converting between JSPromise
s and RustFuture
s.
Changed
- Overhauled the guide's documentation on passing JS closures to Rust, and Rust closures to JS.
- Overhauled the guide's documentation on using serde to serialize complex data
to
JsValue
and deserializeJsValue
s back into complex data. - Static methods are now always bound to their JS class, as is required for
Promise
's static methods.
Removed
- Removed internal usage of
syn
'svisit-mut
cargo feature, which should result in faster build times.
Fixed
- Various usage errors for the
#[wasm_bindgen]
proc-macro are now properly reported with source span information, rather thanpanic!()
s inside the proc-macro. - Fixed a bug where taking a struct by reference and returning a slice resulted in lexical variable redeclaration errors in the generated JS glue. #662
- The
#[wasm_bindgen(js_class = "....")]
attribute for binding methods to renamed imported JS classes now properly works with constructors.
0.2.15
Released 2018-07-26.
Fixed
- Fixed
wasm-bindgen
CLI version mismatch checks that got broken in the last point release.
0.2.14
Released 2018-07-25.
Fixed
- Fixed compilation errors on targets that use Mach-O. #545
0.2.13
Released 2018-07-22.
Added
- Support the
#[wasm_bindgen(js_name = foo)]
attribute on exported functions and methods to allow renaming an export to JS. This allows JS to call it by one name and Rust to call it by another, for example usingcamelCase
in JS andsnake_case
in Rust
Fixed
- Compilation with the latest nightly compiler has been fixed (nightlies on and after 2018-07-21)
0.2.12
Released 2018-07-19.
This release is mostly internal refactorings and minor improvements to the
existing crates and functionality, but the bigs news is an upcoming js-sys
and
web-sys
set of crates. The js-sys
crate will expose all global JS
bindings and the web-sys
crate will be generated from WebIDL to
expose all APIs browsers have. More info on this soon!
Added
- Support for
Option<T>
was added whereT
can be a number of slices or imported types. - Comments in Rust are now preserved in generated JS bindings, as well as comments being generated to indicate the types of arguments/return values.
- The online documentation has been reorganized into a book.
- The generated JS is now formatted better by default for readability.
- A
--keep-debug
flag has been added to the CLI to retain debug sections by default. This happens by default when--debug
is passed.
Fixed
- Compilation with the latest nightly compiler has been fixed (nightlies on and after 2018-07-19)
- Declarations of an imported function in multiple crates have been fixed to not conflict.
- Compilation with
#![deny(missing_docs)]
has been fixed.
0.2.11
Released 2018-05-24.
0.2.10
Released 2018-05-17.
0.2.9
Released 2018-05-11.