https://github.com/splurf/wlrs-wasm
https://github.com/splurf/wlrs-wasm
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/splurf/wlrs-wasm
- Owner: splurf
- Created: 2024-04-25T17:12:53.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-08-21T20:20:53.000Z (almost 2 years ago)
- Last Synced: 2025-01-25T08:25:25.191Z (over 1 year ago)
- Language: Rust
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# wlrs-wasm
## Build
```bash
trunk build --release
wasm-opt --strip-debug dist/*.wasm -o dist/*.wasm
wasm-opt dist/*.wasm -Oz -o dist/*.wasm
```
## Production
```bash
cp -r dist/* /var/www/wlrs
```
## NGINX Configuration
```nginx
# /etc/nginx/sites-enabled/default
# serve the home page
location = / {
rewrite ^ /index.html last;
}
# overwrite default type for WASM files
location ~* .*\.wasm$ {
default_type application/wasm;
}
```