-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
35 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
# Before running this script, you'll need to: | ||
# - add the WebAssembly target in the rust compiler: | ||
# rustup target add wasm32-unknown-unknown | ||
# - install wasm-pack to use wasm-bindgen | ||
# cargo install wasm-pack | ||
# - install the local web server: | ||
# cargo install basic-http-server | ||
# see the readme.md for more info | ||
|
||
./recompile_web.sh | ||
|
||
# you can also do `basic-http-server export_html/` for faster iteration time if you are | ||
# just changing the html/js, but you will need to copy the built_html/pkg to export_html for the | ||
# webassembly artifact to work | ||
basic-http-server bioengineer_html/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
# Don't run this manually, run local_build_and_run.sh instead to run the project locally. | ||
# This script exists just to make sure the CI and the local building does the same. | ||
|
||
# for this script to work, you need to do `rustup target add wasm32-unknown-unknown` | ||
|
||
cargo build --release --target wasm32-unknown-unknown --bin bioengineer | ||
mkdir -p bioengineer_html | ||
# the folder export_html contains the html wrapper so that the wasm can be used | ||
cp -r export_html/* bioengineer_html/ | ||
cp -r target/wasm32-unknown-unknown/release/*.wasm bioengineer_html/ | ||
cp -r assets/ bioengineer_html/ | ||
|