Type-safe bindings for Node.js with Rust and WebAssembly
watch on portal.gitnation.org ↗https://portal.gitnation.org/contents/type-safe-bindings-for-nodejs-with-rust-and-webassemblysummary
Shows how to build TypeScript bindings for Node.js using Rust compiled to WebAssembly, specifically using wasm-bindgen to define and import Rust functions and tspy to integrate those functions into TypeScript apps. Covers practical issues like converting strings between Rust and JavaScript and limits of exposing Rust data types to JS, and recommends using TSFI for generating type-safe bindings, demonstrated with a TypeScript full-text search engine using WebAssembly.
AI-written summary · about
related talks
30mRust in the Browser for Javascripters:New Frontiers,New Possibilities
29mNo free lunch: Limits of WASM as a bridge from Rust to JS
20mUsing Rust and WASM
30mRust and the Web Platform: A Rookie’s Guide
29mRust & JavaScript Interoperability
28mPowering Up NodeJS Performance by Rust and WebAssembly
06mMaking the Web Work Natively
28mPutting WebAssembly in your web app today!