File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ crate-type = ["cdylib"]
1111anyhow = " 1.0"
1212bytes = " 1.5.0"
1313candid = " 0.10"
14- colorgrad = " 0.6"
1514ic-cdk = " 0.20"
1615ic-stable-structures = " 0.7"
1716ic-wasi-polyfill = " 0.13"
Original file line number Diff line number Diff line change @@ -4,17 +4,25 @@ canisters:
44 steps :
55 - type : script
66 commands :
7+ # wasi2ic and wasm-opt are installed on first run if not present.
78 - which wasi2ic || cargo install wasi2ic
89 - which wasm-opt || cargo install wasm-opt
10+ # Enable Wasm SIMD instructions for faster Tract inference.
911 - export RUSTFLAGS="${RUSTFLAGS} -C target-feature=+simd128"
12+ # Compile to wasm32-wasip1 (WASI) so Tract can use POSIX file I/O.
1013 - cargo build --package backend --target wasm32-wasip1 --release
14+ # wasi2ic rewrites WASI syscalls to IC system API calls.
1115 - wasi2ic ./target/wasm32-wasip1/release/backend.wasm "$ICP_WASM_OUTPUT_PATH"
16+ # Optimise the WASM binary size and enable SIMD + bulk-memory proposals.
1217 - wasm-opt -Os --enable-simd --enable-bulk-memory -o "$ICP_WASM_OUTPUT_PATH" "$ICP_WASM_OUTPUT_PATH"
18+ # Embed the Candid interface as public WASM metadata.
1319 - ic-wasm "$ICP_WASM_OUTPUT_PATH" -o "$ICP_WASM_OUTPUT_PATH" metadata candid:service -f backend/backend.did -v public --keep-name-section
1420 sync :
1521 steps :
1622 - type : script
1723 commands :
24+ # Downloads/generates ONNX models and uploads them to the canister.
25+ # Skipped automatically if models are already loaded (e.g. on redeployment).
1826 - bash upload-models-to-canister.sh
1927
2028 - name : frontend
You can’t perform that action at this time.
0 commit comments