# crossbind > crossbind compiles C++ and Rust into WebAssembly, native iOS and Android libraries and WASI commands, then exposes them to JavaScript through bindings generated from the header you already own. One import runs in the browser, Node.js, Cloudflare Workers, React Native and as a WASI command. Current release: crossbind 2.0.0-beta.56 (beta, npm dist-tag `beta`), published 2026-09-09 from commit 0c20e017f479e6f82bb5b635ddf0158403d14a99. Install commands carry `@beta`. ## Why - Target-aware distribution: a package family carries WebAssembly, iOS, Android and WASI variants, and each build consumes only the artifact valid for its platform, architecture, runtime and build type. - Native dependency resolution: package manifests and crossbind configs carry the transitive native graph, so prerequisites are built and linked in the right order. - A reproducible package contract: port recipes record upstream versions, source integrity, licences, dependencies and target-specific artifacts. - No hand-written binding glue: public functions, classes, methods, enums, containers and the supported standard-library types are generated from the header you already own. - C++ and Rust: import local native sources, a `cargo:` crate or a reusable native package through the same project. - First-party integrations and ports: bundler plugins give incremental builds, and version-pinned ports make GDAL, SQLite, OpenSSL, GEOS, PROJ and more available without rebuilding upstream. ## Limits - Browser OPFS persistence requires `useWorker: true`; the OPFS API only exists in worker scope. - Browser multithread builds (`runtime: 'mt'`) need COOP/COEP headers in production, and the pthread pool is capped at two workers. - Edge runtimes such as Cloudflare Workers run single-threaded with an in-memory filesystem: no workers, no OPFS. - Android builds link whole archives; dead-code elimination is not implemented there. - iOS builds need a local Xcode and CocoaPods, Rust bindings need a local cargo, and WASI commands need wasmtime on PATH. - There is no performance claim: a hand-written loop in JIT JavaScript can match the same algorithm in Wasm. The value is the libraries you would otherwise rewrite. - The 2.0 line is a beta; prereleases carry no compatibility guarantee until the first stable train. ## Docs - [Guide](https://crossbind.dev/guide/): Every guide page, grouped by what you are trying to do. - [Introduction](https://crossbind.dev/guide/introduction/): What crossbind does, what one import buys you, and where the output runs. - [Quick start](https://crossbind.dev/guide/quick-start/): Prerequisites, a new project or an existing one, and your first call into C++. - [Bundlers](https://crossbind.dev/guide/bundlers/): Vite, Webpack, Rspack, Rollup, Metro - and the escape hatch when you have none. - [Runtimes](https://crossbind.dev/guide/runtimes/): Browser, Node, Cloudflare Workers, React Native and WASI - what each one supports. - [Architecture](https://crossbind.dev/guide/architecture/): What runs when you build: targets, bridges, the toolchain boundary, and the cache. - [C++ bindings](https://crossbind.dev/guide/bindings/): The subset of C++ that binds automatically, the type table, and how to wrap the rest. - [Rust](https://crossbind.dev/guide/rust/): Import a crates.io crate or a local .rs file with the same one-line import. - [Libraries](https://crossbind.dev/guide/libraries/): Use a prebuilt C++ library from npm, or publish your own the same way. - [Filesystem](https://crossbind.dev/guide/filesystem/): Where files live per runtime: OPFS, in-memory, the host disk - and how to mount user files. - [Threading and workers](https://crossbind.dev/guide/threading/): st versus mt, useWorker, and the COOP/COEP headers production needs. - [Assets and data files](https://crossbind.dev/guide/assets/): Ship the data files a native library needs, and point it at them on every platform. - [WASI commands](https://crossbind.dev/guide/wasi/): Compile to a single wasm command, or run the prebuilt CLI tools straight from npm. - [Configuration](https://crossbind.dev/guide/configuration/): Everything crossbind.config.js can declare, and how its paths resolve. - [Troubleshooting](https://crossbind.dev/guide/troubleshooting/): The errors people actually hit, and the standard fix for each. - [Migrating from cpp.js 1.x](https://crossbind.dev/guide/migration/): What changed between cpp.js 1.0.4 and crossbind 2.0: names, packages, config, CLI and runtime API, with the steps to move a project. - [API reference](https://crossbind.dev/api/): the runtime and build-time surfaces, the CLI and the canonical reference documents. - [Libraries](https://crossbind.dev/ports/): prebuilt C++ libraries and WASI command tools. - [Agent setup](https://crossbind.dev/agent/): install the crossbind skill into a coding agent. - [Changelog](https://crossbind.dev/changelog/): every release on one page; the current release is at https://crossbind.dev/changelog/#2.0.0-beta.56 ## Platforms - Browser: WebAssembly with a JavaScript loader; OPFS persistence needs a worker. - Node.js: WebAssembly with host filesystem access. - Cloudflare Workers and similar edge runtimes: WebAssembly, single-threaded, in-memory filesystem. - iOS and Android through React Native: native machine code over JSI, no Wasm. - WASI (wasm32-wasip3): one .wasm command run with wasmtime, no JavaScript host. ## Libraries (npm `beta`) - [cURL 8.21.0 (Networking, curl) - HTTP, HTTPS and file-transfer client library - @crossbind/port-curl: Web and Node.js, WASI library, Android, iOS - 1 WASI commands via @crossbind/port-curl-bin-wasi](https://crossbind.dev/ports/curl/) - [Expat 2.8.3 (Text, MIT) - Streaming XML parser - @crossbind/port-expat: Web and Node.js, WASI library, Android, iOS - 1 WASI commands via @crossbind/port-expat-bin-wasi](https://crossbind.dev/ports/expat/) - [GDAL 3.13.3 (Geospatial, MIT) - Raster and vector geospatial data processing - @crossbind/port-gdal: Web and Node.js, WASI library, Android, iOS - 29 WASI commands via @crossbind/port-gdal-bin-wasi](https://crossbind.dev/ports/gdal/) - [GEOS 3.14.1 (Geospatial, LGPL-2.1-or-later) - Geometry predicates and spatial operations - @crossbind/port-geos: Web and Node.js, WASI library, Android, iOS - 1 WASI commands via @crossbind/port-geos-bin-wasi](https://crossbind.dev/ports/geos/) - [GeoTIFF 1.7.4 (Geospatial, MIT) - GeoTIFF metadata and coordinate-system support - @crossbind/port-geotiff: Web and Node.js, WASI library, Android, iOS - 3 WASI commands via @crossbind/port-geotiff-bin-wasi](https://crossbind.dev/ports/geotiff/) - [iconv 1.19 (Text, LGPL-2.1-or-later) - Character-set conversion - @crossbind/port-iconv: Web and Node.js, WASI library, Android, iOS](https://crossbind.dev/ports/iconv/) - [LERC 4.2.0 (Imaging, Apache-2.0) - Limited-error raster compression - @crossbind/port-lerc: Web and Node.js, WASI library, Android, iOS](https://crossbind.dev/ports/lerc/) - [libjpeg-turbo 3.2.0 (Imaging, (IJG AND BSD-3-Clause AND Zlib)) - High-performance JPEG codec - @crossbind/port-jpegturbo: Web and Node.js, WASI library, Android, iOS - 3 WASI commands via @crossbind/port-jpegturbo-bin-wasi](https://crossbind.dev/ports/jpegturbo/) - [libTIFF 4.7.2 (Imaging, libtiff) - TIFF image reader and writer - @crossbind/port-tiff: Web and Node.js, WASI library, Android, iOS - 18 WASI commands via @crossbind/port-tiff-bin-wasi](https://crossbind.dev/ports/tiff/) - [OpenSSL 4.0.2 (Crypto and TLS, Apache-2.0) - TLS and cryptographic primitives - @crossbind/port-openssl: Web and Node.js, WASI library, Android, iOS - 1 WASI commands via @crossbind/port-openssl-bin-wasi](https://crossbind.dev/ports/openssl/) - [PROJ 9.8.1 (Geospatial, MIT) - Coordinate reference-system transformations - @crossbind/port-proj: Web and Node.js, WASI library, Android, iOS - 6 WASI commands via @crossbind/port-proj-bin-wasi](https://crossbind.dev/ports/proj/) - [SpatiaLite 5.1.0 (Database, MPL-1.1 OR GPL-2.0-or-later OR LGPL-2.1-or-later) - Spatial SQL extension for SQLite - @crossbind/port-spatialite: Web and Node.js, WASI library, Android, iOS](https://crossbind.dev/ports/spatialite/) - [SQLite 3.53.4 (Database, blessing) - Embedded relational database - @crossbind/port-sqlite3: Web and Node.js, WASI library, Android, iOS - 1 WASI commands via @crossbind/port-sqlite3-bin-wasi](https://crossbind.dev/ports/sqlite3/) - [WebP 1.6.0 (Imaging, BSD-3-Clause) - WebP image codec - @crossbind/port-webp: Web and Node.js, WASI library, Android, iOS - 3 WASI commands via @crossbind/port-webp-bin-wasi](https://crossbind.dev/ports/webp/) - [zlib 1.3.2 (Compression, Zlib) - DEFLATE compression - @crossbind/port-zlib: Web and Node.js, WASI library, Android, iOS](https://crossbind.dev/ports/zlib/) - [Zstandard 1.5.7 (Compression, BSD-3-Clause) - Zstandard compression - @crossbind/port-zstd: Web and Node.js, WASI library, Android, iOS - 1 WASI commands via @crossbind/port-zstd-bin-wasi](https://crossbind.dev/ports/zstd/) ## Examples Run from the published packages on 2026-09-11 against crossbind 2.0.0-beta.56: [https://crossbind.dev/examples/](https://crossbind.dev/examples/) - Web · React · Vite: `npm create crossbind@beta -- my-app Web React Vite`, running at https://crossbind.dev/examples/web-react-vite/ - Web · Vue · Vite: `npm create crossbind@beta -- my-app Web Vue Vite`, running at https://crossbind.dev/examples/web-vue-vite/ - Web · Svelte · Vite: `npm create crossbind@beta -- my-app Web Svelte Vite`, running at https://crossbind.dev/examples/web-svelte-vite/ - Web · React · Rspack: `npm create crossbind@beta -- my-app Web React Rspack`, running at https://crossbind.dev/examples/web-react-rspack/ - Web · Vanilla: `npm create crossbind@beta -- my-app Web Vanilla`, running at https://crossbind.dev/examples/web-vanilla/ - Node.js: `npm create crossbind@beta -- my-node Backend Node.js WebAssembly` - Cloudflare Worker: `npm create crossbind@beta -- my-worker Cloud "Cloudflare Worker"` - React Native (Expo) · iOS: `npm create crossbind@beta -- my-app Mobile "React Native" Expo` - React Native (Expo) · Android: `npm create crossbind@beta -- my-app Mobile "React Native" Expo` - WASI tools: `npm install --global @crossbind/port-gdal-bin-wasi@beta` ## Source - [GitHub](https://github.com/crossbind/crossbind), [Discussions](https://github.com/crossbind/crossbind/discussions), [MIT licence](https://github.com/crossbind/crossbind/blob/main/LICENSE) - Sitemap: https://crossbind.dev/sitemap.xml