https://github.com/mikewesthad/wasm-tests
Testing out a wasm workflow
https://github.com/mikewesthad/wasm-tests
Last synced: 2 months ago
JSON representation
Testing out a wasm workflow
- Host: GitHub
- URL: https://github.com/mikewesthad/wasm-tests
- Owner: mikewesthad
- Created: 2017-06-13T16:16:19.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-13T16:16:24.000Z (about 8 years ago)
- Last Synced: 2025-02-14T08:46:23.656Z (4 months ago)
- Language: JavaScript
- Size: 51.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WASM Tests
Repo for testing out wasm. Currently a hello world example.
## Dependencies
This project assumes that you have emscripten set up somewhere on your machine. Follow the [developers guide](http://webassembly.org/getting-started/developers-guide/) from webassembly.org. Currently, the config field in package.json controls the compilation.
```js
{
"config": {
// This should be the path to emsdk shell/bat script that sets up the right path variables for
// emcc to run. On windows, it should be a path to a bat file. On unix, it should be something
// like: "source path/to/emsdk_env.sh"
"emsdk_env": "E:/Github/emsdk/emsdk_env.bat",
// A file to use as a skeleton for the output. {{{SCRIPT}}} is where the wasm module is inserted
"html_template": "./template.html",
// The c file to compile to wasm
"in_file": "./src/hello.c",
// The output, specified as an html file
"out_file": "./public/index.html"
}
}
```## Commands
`npm run wasm` will compile the project using the config settings
`npm run serve` will use browser-sync to serve and watch the public folder