Skip to content

Commit

Permalink
feat: build-std for wasm bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbchron committed Mar 25, 2024
1 parent 707d41f commit 752ecc2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ env = "DEV"

bin-features = []
bin-default-features = false

lib-features = []
lib-default-features = false
lib-profile-release = "wasm-release"

lib-cargo-args = ["-Zbuild-std=std,panic_abort,core,alloc"]
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
# commands from the logs of `cargo leptos build --release -vvv`
buildPhaseCargoCommand = ''
# build the server dependencies
cargo build --package=site-server --no-default-features --release
cargo build --package=site-server --no-default-features --release -Zbuild-std=std,panic_abort,core,alloc
# build the frontend dependencies
cargo build --package=site-frontend --lib --target-dir=/build/source/target/front --target=wasm32-unknown-unknown --no-default-features --profile=wasm-release
'';
Expand Down

0 comments on commit 752ecc2

Please sign in to comment.