{"full_name":"wasm-bindgen/wasm-bindgen","owner":"wasm-bindgen","name":"wasm-bindgen","shard":"1","url":"https://github.com/wasm-bindgen/wasm-bindgen","description":"Facilitating high-level interactions between Wasm modules and JavaScript","homepage":"https://wasm-bindgen.github.io/wasm-bindgen/","topics":["wasm","javascript","rust","binding-generator","rust-wasm"],"tag_pages":["javascript","rust","wasm"],"language":"Rust","license":"Apache-2.0","avatar":"https://avatars.githubusercontent.com/u/220058222?v=4","created_at":"2017-12-18T20:38:44Z","pushed_at":"2026-11-13T21:58:25Z","metrics":{"stars":9228,"forks":1265,"watchers":93,"issues":2306,"prs":2946,"releases":133,"issues_open":466,"issues_closed":1840,"prs_open":90,"prs_closed":379,"prs_merged":2477,"discussions":198},"growth":{"day":{"stars":1,"forks":-1,"base_day":"2026-11-15"}},"history":{"dates":["2026-11-10","2026-11-11","2026-11-12","2026-11-13","2026-11-14","2026-11-15","2026-11-16"],"stars":[9224,9227,9228,9228,9227,9227,9228],"forks":[1264,1264,1265,1265,1266,1266,1265],"watchers":[null,93,93,93,93,93,93],"issues_open":[null,466,465,465,466,466,466],"prs_open":[null,98,91,91,89,90,90]},"boards":{},"same_owner":[],"issues":[{"number":3421,"title":"WASI support","comments":47,"created_at":"2023-05-11T15:41:49Z"},{"number":1818,"title":"Automatically camelify names","comments":32,"created_at":"2019-10-16T00:45:30Z"},{"number":2407,"title":"Support enum variants with values","comments":29,"created_at":"2020-12-29T09:15:38Z"},{"number":3939,"title":"Splitting into multiple lazily-loaded modules","comments":28,"created_at":"2024-04-27T20:08:28Z"},{"number":2200,"title":"memory import undefined","comments":22,"created_at":"2020-06-12T16:41:09Z"},{"number":1362,"title":"Return integers from `charCodeAt` and `codePointAt`","comments":21,"created_at":"2019-03-18T17:00:20Z"},{"number":122,"title":"Allow returning fixed-size tuples and arrays","comments":21,"created_at":"2018-04-12T22:06:23Z"},{"number":2231,"title":"Downcast a JsValue to an exported struct","comments":18,"created_at":"2020-07-09T02:30:27Z"}],"discussions":[{"number":5469,"title":"Setting priority on a web_sys Request","comments":1,"category":"Q&A","created_at":"2026-11-12T01:54:22Z"},{"number":5195,"title":"Proposal: emit `Uint8Array<ArrayBuffer>` in generated TypeScript for owned `Vec<u8>` returns (opt-in)","comments":2,"category":"Ideas","created_at":"2026-06-11T13:37:30Z"},{"number":5098,"title":"Use async js function in non async rust code","comments":1,"category":"Q&A","created_at":"2026-04-08T23:31:17Z"},{"number":5061,"title":"Documentation re:weak-ref and finalizers","comments":3,"category":"Q&A","created_at":"2026-03-26T15:55:49Z"},{"number":5017,"title":"Compilation/Generation Performance with wasm-bindgen-cli","comments":0,"category":"General","created_at":"2026-03-01T23:37:26Z"},{"number":4948,"title":"Full WASM process memory dumped to OPFS on iOS","comments":2,"category":"Q&A","created_at":"2026-02-10T13:59:55Z"},{"number":4895,"title":"Consolidating test output for headless browser capture mode","comments":0,"category":"Ideas","created_at":"2026-01-09T09:33:53Z"},{"number":4884,"title":"`Promise::then`'s `Closure` return type missing?","comments":1,"category":"General","created_at":"2025-12-30T05:45:10Z"}],"latest_release":{"name":"0.2.130","tag":"0.2.130","published_at":"2026-10-30T06:16:00Z","body":"### Added\n\n* A borrowed number, `bool`, `char` or borrowed string crosses by copy, so\n  `&f64`, `&Option<T>`, `&Nullable<T>`, `Option<&f64>` and\n  `Option<&Nullable<T>>` are argument types, and an\n  `experimental_generic_mono` import taking `&T` accepts `T = f64`,\n  `Option<f64>` or `Nullable<String>`, as std's `contains(&T)` does.\n  [#5436](https://github.com/wasm-bindgen/wasm-bindgen/pull/5436)\n\n* Added a rejection type parameter to `js_sys::Promise<T, E = JsValue>`,\n  mirrored on `JsFuture<T, E>`, `PromiseState<T, E>` and\n  `PromiseWithResolvers<T, E>`. Awaiting a `Promise<T, E>` yields\n  `Result<T, E>`, converting the rejection reason as an `E` the same unchecked\n  way the fulfilled value is converted as a `T`. Both parameters are covariant\n  under `Upcast`; `catch`, `then_with_reject` and the `withResolvers` reject\n  function receive an `E`; `all_tuple` / `all_settled_tuple` carry a shared `E`\n  through; and under `js_sys_unstable_apis`, `Promise::new`, `Promise::reject`\n  and `Promise::any` are typed on the rejection too, `any` as\n  `AggregateError`. The default keeps existing `Promise<T>` code unchanged.\n  `PromiseWithResolvers<T, E>` is invariant in both, since its `resolve` and\n  `reject` functions take them, and `JsFuture<T, E>` is `UnwindSafe` whenever\n  `T` and `E` are.\n  [#5426](https://github.com/wasm-bindgen/wasm-bindgen/pull/5426)\n\n* Added the `--js-string-builtins` CLI flag, importing `static_string`\n  constants as [JS String Builtins](https://github.com/WebAssembly/js-string-builtins)\n  string constants from `wasm:js/string-constants` instead of defining them in\n  the JS glue. With reference types, `static_string` constants now occupy\n  fixed `externref` table slots filled in when the module is instantiated, so\n  cloning and dropping them is free and never calls into JS.\n  [#5401](https://github.com/wasm-bindgen/wasm-bindgen/pull/5401)\n\n* Added `Nullable<T>`, re-exported as `js_sys::Nullable`, for a `T | null`\n  value at the JS boundary, as `Option<T>` is for `T | undefined`, with\n  `Option<Nullable<T>>` for `T | null | undefined`. Both are accepted wherever\n  `Option<T>` is, for every `T` and in every position: JS `null` is\n  `Nullable::Null` and is sent back as `null`, while `undefined` into a plain\n  `Nullable<T>` goes to `T`'s own conversion. A plain `Option<T>` still reads\n  both `undefined` and `null` as `None` and writes `None` as `undefined`; the\n  `Option` layer of `Option<Nullable<T>>` treats only `undefined` as `None`,\n  since `null` has to reach the `Nullable` layer. `Option<T>` converts from\n  and into `Nullable<T>`, and\n  `JsNullable<T>` converts from both and into `Option<Nullable<T>>` for\n  `T: JsGeneric`.\n  The API follows `Option`'s, including `ok_or`, `and_then`, `filter`,\n  `as_deref`, `take`, `replace` and `IntoIterator`, and\n  `--cfg wasm_bindgen_unstable_try_trait` enables `?` on nightly.\n  `NullableIntoWasmAbi` / `NullableFromWasmAbi` carry `Nullable<T>`'s `null`\n  for every `T`, and are supertraits of `JsStringLike` and the js-sys\n  primitive-union markers, so `Nullable<impl JsStringLike>` and\n  `Nullable<impl JsNumberOrStringLike>` work under `experimental_generic_mono`,\n  and `Nullable<T>` erases like `Option<T>` on a generic import.\n  [#5410](https://github.com/wasm-bindgen/wasm-bindgen/pull/5410)\n  [#5423](https://github.com/wasm-bindgen/wasm-bindgen/pull/5423)\n\n* `Nullable<T>` converts into `JsValue` with `From`, `Null` becoming `null`\n  as `None` becomes `undefined` for `Option<T>`, and `Option<T>`,\n  `Nullable<T>` and `Result<T, E>` are `Promising` for any `T: Promising`,\n  so a `Promise<Nullable<JsString>>` awaits to a `Nullable<JsString>`.\n  `String` and `&str` upcast to `JsValue`, and `String` to itself, so a\n  `Promise<String>` from an `experimental_generic_mono` import is `JsGeneric`\n  and upcasts to `Promise<JsValue>` as `Promise<bool>` does. Together these\n  make a `Promise<Nullable<JsString>>` or `Promise<String>` from a mono\n  import usable wherever a promise is expect","is_prerelease":false},"readme":true,"readme_zh":false,"news":[],"stale":false,"snapshot_at":"2026-11-16T09:23:14Z","history_start":"2026-09-06"}