cargo wasm-bindgen 0.2.129

latest release: 0.2.130
one month ago

Added

  • Added the WebGL extension interface EXT_polygon_offset_clamp.
    #5336

  • Added the texture-compression-unaligned variant to GpuFeatureName,
    matching the WebGPU specification.
    #5335

  • Added an Emscripten Target page to the guide covering the
    wasm32-unknown-emscripten build flow, including the experimental
    #[wasm_bindgen(experimental_tokio)] attribute for driving an exported
    async function on a Tokio event-loop runtime there, gated behind
    --cfg wasm_bindgen_unstable_tokio.
    #5334

  • Added experimental JSPI support on the wasm32-unknown-emscripten target,
    gated behind --cfg wasm_bindgen_unstable_jspi: #[wasm_bindgen(jspi)],
    #[wasm_bindgen(suspending)], jspi_block_on_promise and the JSPI context
    inheritance of spawn_local work when linking with -sJSPI and
    -sJSPI_HOOKS (or -sREENTRANT_JSPI). The fibers belong to Emscripten's
    JSPI runtime, which wasm-bindgen integrates with through its lifecycle hook
    exports instead of its own shadow stack management. jspi combines with
    experimental_tokio into a parked runtime: the export is a promising
    activation running its future with block_on on a Tokio runtime whose
    waits are JSPI suspensions, so invocations interleave at every wait.
    #5333

Changed

  • Library MSRV bumped from 1.77 to 1.81, per the 2-year MSRV policy.
    #5257

Fixed

  • The wasm_bindgen, wasm_bindgen_futures and js_sys crate-path options
    on a #[wasm_bindgen] impl block now apply to its methods; previously they
    were ignored there.
    #5333

  • Struct field getters no longer trigger the unsafe_op_in_unsafe_fn lint
    (warn by default in edition 2024) when the field name comes from a
    macro_rules! body, for example through paste!.
    #4465

  • The headless test runner now keeps the path of a remote WebDriver URL set
    with variables like CHROMEDRIVER_REMOTE. A driver at
    http://host/wd/hub/ now gets http://host/wd/hub/session instead of
    http://host/session.
    #2841

  • The bundler entry module no longer re-exports #[wasm_bindgen(private)]
    items from *_bg.js, which does not export them.
    #5343

  • web-sys: WebGL extension interfaces declared with LegacyNoInterfaceObject
    (OVR_multiview2, WEBGL_multi_draw, EXT_polygon_offset_clamp) now
    generate is_type_of = |_| false like their NoInterfaceObject counterparts.
    #5336

  • The blanket From<E: Error> for JsError impl is now available without the
    std feature, using core::error::Error, so ? works in no_std crates.
    #5029

  • Emscripten output no longer emits the instance reinit machinery, which
    Emscripten's JS compiler rejected (unescaped multi-line __postset, and
    var reinit_scheduled = let ...): schedule_reinit() is a no-op there since
    Emscripten owns instantiation. The closure finalization __postset is now
    emitted as an escaped string literal.
    #5332

  • Updated walrus to 0.27.2, fixing --keep-debug output that wasm-opt -g
    could not process: .debug_loc entries for removed code were unparseable
    (debug_loc error), and DW_AT_high_pc was re-encoded as variable-width
    udata (compile unit size was incorrect).
    #5328

  • The headless test runner no longer hangs on a WebDriver that never answers, or on
    a browser holding the driver's stdio pipes open.
    #5338

  • The CLI's schema version mismatch error now names the input Wasm file and
    the path of the running wasm-bindgen binary.
    #4430

  • #[wasm_bindgen(inspectable)] on a tuple struct no longer generates invalid
    JavaScript. The generated toJSON now reads the 0, 1, ... fields as
    this["0"] instead of this.0.
    #2573

Don't miss a new wasm-bindgen release

NewReleases is sending notifications on new releases.