You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
iceiix 080851353c
Update to Rust 1.55.0 (#618)
4 weeks ago
..
.gitignore www: remove npm package-lock.json for now (#556) 4 months ago
README.md www: bundle resources statically (#483) 9 months ago
bootstrap.js Add support for compiling WebAssembly wasm32-unknown-unknown target (#92) 3 years ago
index.html Add support for compiling WebAssembly wasm32-unknown-unknown target (#92) 3 years ago
index.js Use web-sys for web backend (#444) 10 months ago
package.json Use web-sys for web backend (#444) 10 months ago
webpack.config.js Add support for compiling WebAssembly wasm32-unknown-unknown target (#92) 3 years ago

README.md

stevenarella-web

Web app for running Stevenarella as WebAssembly

Status: very incomplete. It currently compiles but does not run, due to required modifications to adapt to the web, for progress see: 🕸️ Web support

Building

To build for wasm32-unknown-unknown, run in the top-level directory (not www):

rustup target add wasm32-unknown-unknown
cargo install wasm-bindgen-cli
cargo install wasm-pack
cp -vr resources-*/assets/minecraft/* resources/assets/minecraft && git checkout resources
wasm-pack build --dev

or:

cargo web start --target wasm32-unknown-unknown

Running

After building the Rust app, run the NodeJS web server as follows:

cd pkg
sudo npm link
cd ..
cd www
npm link stevenarella
npm install
npm start
open http://localhost:8080/

Credits

Based on rustwasm/create-wasm-app:

An npm init template for kick starting a project that uses NPM packages containing Rust-generated WebAssembly and bundles them with Webpack.