https://github.com/repcomm/wasm-template
A WebAssembly template with minimalism in mind. You know, so I don't have to rip my hair out again.
https://github.com/repcomm/wasm-template
es6-module minimal minimialistic template webassembly
Last synced: 10 months ago
JSON representation
A WebAssembly template with minimalism in mind. You know, so I don't have to rip my hair out again.
- Host: GitHub
- URL: https://github.com/repcomm/wasm-template
- Owner: RepComm
- Created: 2019-12-24T06:14:52.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-24T06:18:39.000Z (about 6 years ago)
- Last Synced: 2025-01-28T08:52:25.714Z (12 months ago)
- Topics: es6-module, minimal, minimialistic, template, webassembly
- Language: JavaScript
- Size: 36.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: ReadMe.md
Awesome Lists containing this project
README
# Wasm Template
Written because I finally got the result I wanted:
Minimalistic boilerplate.
## Structure:
`template.html` loads index.js as a module
`index.js` imports `./wasm/template.mjs`
`index.js` instantiates the module it imported.
`main` is auto-called from `template.c`
Boom, done, goodnight.
Compilation is up to you.
`build.sh` runs `env.sh`, which calls `emsdk_env.sh` (sets up environment variables temporarily) from my setup of emsdk.
## Notes
`env.sh` won't work for you unless you point it at your copy of `emsdk_env.sh` from emscripten sdk.
Also, `source` is used to say "run in this bash context" and not a separate child shell. Otherwise the environment is flushed away when `env.sh` is finished.