Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sericaia/wasm-test
Working example using WebAssembly
https://github.com/sericaia/wasm-test
js wasm webassembly
Last synced: 1 day ago
JSON representation
Working example using WebAssembly
- Host: GitHub
- URL: https://github.com/sericaia/wasm-test
- Owner: sericaia
- Created: 2017-06-16T15:07:33.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-06-18T10:26:57.000Z (over 7 years ago)
- Last Synced: 2024-12-18T06:18:50.160Z (about 1 month ago)
- Topics: js, wasm, webassembly
- Language: JavaScript
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#### This is just a working example using WebAssembly
### How to run
1. Compile C to WASM
```emcc wasm/counter.c -O1 -o wasm/counter.wasm -s WASM=1 -s SIDE_MODULE=1```2. Run `npm install`
3. Run `webpack` to build your code (inside `index.js`) and wasm file, using `wasm-loader`. See [webpack.config.js](https://github.com/sericaia/wasm-test/blob/master/webpack.config.js) for details.
3. Open `index.html` in browser and play around
##### Useful links
- [WebAssembly wiki](https://github.com/kripken/emscripten/wiki/WebAssembly)
- [WebAssembly-Standalone wiki](https://github.com/kripken/emscripten/wiki/WebAssembly-Standalone)
- [wasm-loader](https://github.com/ballercat/wasm-loader)
- [Blogpost - WebAssembly first steps](http://blog.openbloc.fr/webassembly-first-steps/)
- [Blogpost - How to get a performance boost using WebAssembly](https://hackernoon.com/how-to-get-a-performance-boost-using-webassembly-8844ec6dd665)
- [awesome-wasm](https://github.com/mbasso/awesome-wasm)