awesome-repositories.com
博客
awesome-repositories.com

通过 AI 驱动的搜索,发现最优秀的开源仓库。

探索精选搜索开源替代品自托管软件博客网站地图
项目关于排名机制媒体报道MCP 服务器
法律隐私政策服务条款
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
wasm-bindgen avatar

wasm-bindgen/wasm-bindgen

0
View on GitHub↗

Wasm Bindgen

wasm-bindgen is a glue code generator and interoperability tool that facilitates high-level communication and data exchange between compiled Rust modules and JavaScript environments. It functions as a memory bridge and type definition generator, allowing the exchange of complex data types and the calling of functions across execution boundaries.

The project distinguishes itself by automating the conversion of data types and function signatures using attribute-based bindings. It generates the necessary JavaScript and WebAssembly wrappers to manage linear memory mapping and creates automatic TypeScript type bindings to provide static checking and autocomplete.

The framework covers several capability areas, including host interaction for invoking web APIs and DOM manipulation, as well as asynchronous coordination between promises and futures. It also provides mechanisms for multi-threaded execution coordination across web workers and the translation of exceptions between the guest module and the host.

Tooling is included for executing test suites within headless browser environments.

AI 搜索

探索更多 awesome 仓库

用简单的语言描述您的需求 —— AI 将根据相关性为您从数千个精选开源项目中进行排序。

Start searching with AI
wasm-bindgen.github.io/wasm-bindgen
↗

Features

  • JavaScript Interop - Exposes internal Rust functions as callable modules for execution within JavaScript environments.
  • WebAssembly Glue Code Generators - Automatically generates the necessary JavaScript and WebAssembly glue code to facilitate high-level communication between Rust and the browser.
  • Complex Data Type Exchange - Enables the exchange of complex objects, strings, and classes beyond simple numeric types.
  • Type-Safe Binding Generators - Generates static TypeScript type definitions to ensure data consistency and provide autocomplete when calling modules from JavaScript.
  • Linear Memory Managers - Reads and writes data to a shared contiguous buffer to exchange strings and objects between the host and module.
  • Foreign Function Bindings - Invokes native functions and web APIs from within Rust source code by defining external bindings.
  • Host Function Exposure - Allows compiled modules to call external JavaScript logic and system APIs for tasks such as DOM manipulation.
  • JavaScript Interoperability - Facilitates high-level communication and data exchange between compiled Rust modules and the host JavaScript environment.
  • Module Interface Exports - Exposes functions and classes from a compiled WebAssembly module so they can be called by the host environment.
  • Language Interoperability Automation - Automates the conversion of data types and function calls between Rust and JavaScript.
  • WebAssembly Bridges - Provides a high-level bridge for exporting functions and exchanging complex data types between WebAssembly and JavaScript.
  • Cross-Language Type Export - Generates JavaScript classes and type definitions from internal Rust structures to maintain consistency.
  • Type Conversion and Casting - Transforms data between JavaScript values and Rust types, including primitives, strings, and vectors.
  • Type Definition Generators - Automatically synthesizes static TypeScript type definitions from compiled Rust structures for use in external environments.
  • Host Environment Integration - Embeds functions and objects from the host environment into Rust source code for use within compiled modules.
  • Shared Memory Buffers - Provides shared memory buffers and atomic operations to coordinate execution across multiple web worker threads.
  • Async Runtime Bridges - Translates asynchronous handles between the host event loop and the guest runtime to allow cross-environment awaiting.
  • Asynchronous Promise Interfaces - Provides mechanisms to bridge JavaScript promises and Rust futures for cross-environment asynchronous operations.
  • Cross-Language Prototype Mapping - Creates prototype chains between exported structures to support method dispatch and instance checks in JavaScript.
  • ES Module Integrations - Provides a compatibility layer to import and use compiled WebAssembly modules as standard ECMAScript modules.
  • JavaScript Multi-Threading - Synchronizes memory and atomics between web workers and browser threads to enable multi-threaded execution.
  • Attribute-Based Mappings - Uses source-level metadata attributes to automate the generation of function signatures and type mappings.
  • Runtime Exception Handling - Wraps exported functions to catch JavaScript exceptions and translate them into native Rust error types.
  • Cross-Runtime Closure Wrapping - Wraps internal Rust closures for use in the host environment with options for ownership transfer.
  • Cross-Runtime Exception Translation - Intercepts native Wasm traps and JavaScript errors to translate them into language-specific error types across the boundary.
  • TypeScript Type Definitions - Creates automatic TypeScript type bindings to provide autocomplete and static checking for compiled modules.
  • Foreign Function Interface - Facilitates interaction between Wasm and JavaScript.
9,042 星标·1,218 分支·Rust·Apache-2.0·6 次浏览

Star 历史

wasm-bindgen/wasm-bindgen 的 Star 历史图表wasm-bindgen/wasm-bindgen 的 Star 历史图表

Wasm Bindgen 的开源替代方案

相似的开源项目,按与 Wasm Bindgen 的功能重合度排序。
  • rescript-lang/rescriptrescript-lang 的头像

    rescript-lang/rescript

    7,396在 GitHub 上查看↗

    ReScript is a statically typed programming language and compiler designed to transform type-safe source code into efficient, human-readable JavaScript. It functions as a transpiler that enforces data consistency and prevents runtime errors through static type analysis for both web and server applications. The project distinguishes itself as an incremental build system that analyzes dependency graphs to recompile only modified files and their dependents. It includes a JSX compatible compiler for building user interfaces and provides a framework for bridging type-safe code with existing JavaScr

    ReScriptaltjscompilerjavascript
    在 GitHub 上查看↗7,396
  • wasm-bindgen/wasm-packwasm-bindgen 的头像

    wasm-bindgen/wasm-pack

    7,207在 GitHub 上查看↗

    wasm-pack is a build tool and workflow orchestrator for compiling Rust code to WebAssembly. It coordinates the compilation process and generates the JavaScript glue code required to execute Rust logic within web browsers and server-side runtimes. The tool manages binary optimization to reduce file sizes and improve execution speed. It also functions as a package manager, bundling compiled WebAssembly modules into archives compatible with JavaScript registries and bundlers. The project covers language interoperability through the automatic generation of TypeScript type definitions. It further

    Rust
    在 GitHub 上查看↗7,207
  • neon-bindings/neonneon-bindings 的头像

    neon-bindings/neon

    8,410在 GitHub 上查看↗

    Neon is a framework for writing high-performance native Node.js modules using the Rust programming language. It serves as a foreign function interface bridge and a toolchain for bootstrapping, compiling, and managing Rust-based extensions. The project provides a cross-language memory manager that handles buffers and object borrowing to ensure safe memory access between Rust and JavaScript. It enables the mapping of data types and function calls across the language boundary, allowing Rust functions to be exported to the script environment and JavaScript functions to be called from Rust. The f

    Rust
    在 GitHub 上查看↗8,410
  • rustwasm/wasm-bindgenrustwasm 的头像

    rustwasm/wasm-bindgen

    9,057在 GitHub 上查看↗

    wasm-bindgen is a bindings generator and interop layer designed to map data types and functions across the boundary between WebAssembly and JavaScript. It functions as a foreign function interface that synthesizes the necessary boilerplate to enable bidirectional communication between Rust and the browser runtime. The project generates glue code and wrappers that automate the conversion of complex types, allowing Rust functions to be exported as JavaScript modules and browser APIs to be imported into Rust. It uses procedural macros to define these interfaces and synthesizes bindings based on

    Rust
    在 GitHub 上查看↗9,057
查看 Wasm Bindgen 的所有 30 个替代方案→

常见问题解答

wasm-bindgen/wasm-bindgen 是做什么的?

wasm-bindgen is a glue code generator and interoperability tool that facilitates high-level communication and data exchange between compiled Rust modules and JavaScript environments. It functions as a memory bridge and type definition generator, allowing the exchange of complex data types and the calling of functions across execution boundaries.

wasm-bindgen/wasm-bindgen 的主要功能有哪些?

wasm-bindgen/wasm-bindgen 的主要功能包括:JavaScript Interop, WebAssembly Glue Code Generators, Complex Data Type Exchange, Type-Safe Binding Generators, Linear Memory Managers, Foreign Function Bindings, Host Function Exposure, JavaScript Interoperability。

wasm-bindgen/wasm-bindgen 有哪些开源替代品?

wasm-bindgen/wasm-bindgen 的开源替代品包括: rescript-lang/rescript — ReScript is a statically typed programming language and compiler designed to transform type-safe source code into… wasm-bindgen/wasm-pack — wasm-pack is a build tool and workflow orchestrator for compiling Rust code to WebAssembly. It coordinates the… neon-bindings/neon — Neon is a framework for writing high-performance native Node.js modules using the Rust programming language. It serves… rustwasm/wasm-bindgen — wasm-bindgen is a bindings generator and interop layer designed to map data types and functions across the boundary… scala-js/scala-js — Scala.js is a compiler and cross-platform language toolchain that transforms Scala source code into JavaScript or… rhaiscript/rhai — Rhai is an embedded scripting engine and dynamically typed language designed for integration into Rust applications.…