cargo wasm-bindgen 0.2.107

latest releases: 0.2.130, 0.2.129, 0.2.128...
10 months ago

0.2.107

Added

  • Support catching panics, and raising JS Exceptions for them, when building
    with panic=unwind on nightly, with the std feature.
    #4790

  • Added support for passing &[JsValue] slices from Rust to JavaScript functions.
    #4872

  • Added private attribute on exported types to allow generating
    exports and structs as implicit internal exported types for function
    arguments and returns, without exporting them on the public interface.
    #4788

  • Added iter_custom and iter_custom_future for bench to do custom measurements.
    #4841

  • Added Window Management API.
    #4843

Changed

  • Changed WASM import namespace from wbg to ./{name}_bg.js for web and no-modules targets,
    aligning with bundler and experimental-nodejs-module to enable cross-target WASM sharing.
    #4850

  • Replace WASM_BINDGEN_UNSTABLE_TEST_PROFRAW_OUT and WASM_BINDGEN_UNSTABLE_TEST_PROFRAW_PREFIX with parsing LLVM_PROFILE_FILE analogous to Rust test coverage.
    #4367

  • Typescript custom sections sorted alphabetically across codegen-units.
    #4738

  • Optimized demangling performance by removing redundant string formatting
    #4867

  • Changed WASM import namespace from __wbindgen_placeholder__ to ./{name}_bg.js for node targets, aligning with bundler and experimental-nodejs-module to enable cross-target WASM sharing.
    #4869

  • Changed WASM import namespace from __wbindgen_placeholder__ to ./{name}_bg.js for deno and module targets, aligning with node, bundler and experimental-nodejs-module to enable cross-target WASM sharing.
    #4871

  • Consolidate JavaScript glue generation
    Move target-specific JS emission into a single finalize phase, reducing
    branching and making the generated output more consistent across targets.

    • Centralize JS output assembly in a single finalize phase (exports/imports/wasm loading).
    • Make --target experimental-nodejs-module emit one JS entrypoint (no separate _bg.js).
    • Ensure Node (CJS/ESM) and bundler entrypoints only expose public exports (no internal import shims).
    • Add /* @ts-self-types="./<name>.d.ts" */ to JS entrypoints for JSR/Deno resolution.
    • Refresh reference test fixtures.
      #4879
  • Forward worker errors to test output in the test runner.
    #4855

Fixed

  • Fix: Include doc comments in TypeScript definitions for classes
    #4858

  • Interpreter: support try_table blocks
    #4862

  • Interpreter: Stop interpretting descriptor after __wbindgen_describe_cast
    #4862

Don't miss a new wasm-bindgen release

NewReleases is sending notifications on new releases.