#wasm #webassembly #woz #pwa

app woz

Woz is a WebAssembly progressive web app (PWA) toolchain for deploying performant mobile apps distributed for free with a hyperlink

12 stable releases

✓ Uses Rust 2018 edition

1.3.0 Aug 10, 2019
1.2.8 Apr 23, 2019
0.2.0 Mar 31, 2019

#86 in WebAssembly

Download history 41/week @ 2019-10-31 18/week @ 2019-11-07 30/week @ 2019-11-14 28/week @ 2019-11-21 29/week @ 2019-11-28 15/week @ 2019-12-05 98/week @ 2019-12-12 1/week @ 2019-12-19 17/week @ 2019-12-26 2/week @ 2020-01-02 14/week @ 2020-01-09 15/week @ 2020-01-16 1/week @ 2020-01-30 15/week @ 2020-02-06

123 downloads per month

EPL-1.0 license

74KB
1.5K SLoC

Build Status

What is Woz?

Woz is a progressive WebAssembly app (PWAA) generator for Rust.

Docs

See https://woz.sh for the latest docs.

Quickstart

Before we begin you must have a recent version of Rust installed as well as wasm-bindgen.

Install wasm-bindgen

Woz uses wasm-bindgen to generate the interop calls between WebAssembly and JavaScript. This allows you to write the entire application in Rust—including rendering to the dom.

cargo install -f wasm-bindgen-cli

Install wasm compiler target

rustup target add wasm32-unknown-unknown

Install Woz

Install a pre-built binary.

For macOS (64 bit only):

curl -LSfs https://woz.sh/bin/install.sh | sh -s -- --target x86_64-apple-darwin

For linux (via musl):

curl -LSfs https://woz.sh/bin/install.sh | sh -s -- --target x86_64-unknown-linux-musl

For bsd:

curl -LSfs https://woz.sh/bin/install.sh | sh -s -- --target x86_64-unknown-freebsd
curl -LSfs https://woz.sh/bin/install.sh | sh -s -- --target x86_64-unknown-netbsd

Updating

To update to the latest version of woz run the following command.

curl -LSfs https://woz.sh/bin/install.sh | sh -s -- -f --target <NAME OF TARGET>

Setup and deploy

# Follow prompts to create your free Woz account
woz signup
# Create a new app
woz new myapp && cd myapp
# Deploy it
woz deploy

Examples

The 'Seed' example app uses the seed framework and clocks in at ~600kb (including ~300kb for an icon and splashscreen), works offline, and can be installed to your homescreen on iOS or Android devices. You can try it out here

Self-hosting

You can self-host by using woz to build your app locally and upload the files to your static file hosting service such as AWS S3.

Build the app locally:

cd myapp/
woz build

Follow the cli output to get the location of the generated app files on disk. It will look something like:

App package directory can be found at /Users/myusername/.woz/myapp/pkg

The app directory contains an index.html file that will be the entry point for running the app in a browser.

Note: the security requirements for PWAs and WebAssembly means you will need to serve the files over https. Browsing the files directly in the browser (e.g. file://) will result in security-related errors. Use a static file server and install an SSL certificate to be able to install the app to your home screen.

You can also build Woz so that it can use your AWS account and allow multiple users to securely deploy apps to a shared S3 bucket. See https://woz.sh for the latest docs.

License

Eclipse Public License 1.0 (EPL-1.0)

Dependencies

~23MB
~537K SLoC