lafkpages / wasm-bindgen-error-repro

rustwasm/wasm-bindgen#3560

Home Page:https://github.com/rustwasm/wasm-bindgen/issues/3560

Repository from Github https://github.comlafkpages/wasm-bindgen-error-reproRepository from Github https://github.comlafkpages/wasm-bindgen-error-repro

SvelteKit + Rust + WebAssembly template

This is a template for using Rust and WebAssembly in a SvelteKit project.

Usage

You'll need Node.js, PNPM, Rust, and all of the other tools listed in the Rust Wasm book.

Then, setup the project and install dependencies:

pnpm run setup

Then, run the dev server:

pnpm dev

Once you've run the dev server once and the Wasm files are generated, you can also optionally generate the types for the Wasm library ($lib/wasm):

pnpm build:types

Building

To build for production, run:

pnpm build

This will use the @sveltejs/adapter-node if building on Replit, otherwise it will use @sveltejs/adapter-auto. To force it to use the Node adapter, run:

ADAPTER=node pnpm build

About

rustwasm/wasm-bindgen#3560

https://github.com/rustwasm/wasm-bindgen/issues/3560


Languages

Language:JavaScript 71.0%Language:Rust 9.0%Language:TypeScript 7.3%Language:Dockerfile 6.3%Language:HTML 4.7%Language:Svelte 1.7%