Skip to content
No description, website, or topics provided.
JavaScript C
Branch: master
Clone or download
Latest commit cacce54 Aug 9, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
src init Jul 31, 2019
.gitignore init Jul 31, 2019
.gitmodules init Jul 31, 2019
LICENSE_APACHE init Jul 31, 2019
LICENSE_MIT init Jul 31, 2019 shoutout Jul 31, 2019
build.js init Jul 31, 2019
cargo-generate.toml add cargo-generate.toml Aug 8, 2019
index.js init Jul 31, 2019
package.json init Jul 31, 2019
pre.js init Jul 31, 2019
webpack.config.js init Jul 31, 2019

👷 worker-emscripten-template

A template for kick starting a Cloudflare worker project with emscripten

index.js is the content of the Workers script.
main.c is the c source code that calls into the stb image resizer library.
build.js holds the command we use to call emscripten.
webpack.config.js holds the webpack config we use to bundle the emscripten output together with your script.

This template requires docker for providing the emscripten build environment. While we believe this provides the best developer experience, if you wish to not use docker you can delete the check for docker and the docker parts of the build command in build.js. Note this means you must have emscripten installed on your machine.


This template requires the ^1.1.0 version of wrangler

wrangler generate myapp

To demo

wrangler preview

then change the url to

Shoutout to Surma for his webpack-emscripten-wasm gist that was instrumental in getting this working!

You can’t perform that action at this time.