mirror of
https://github.com/zaphar/kitchen.git
synced 2025-07-26 20:19:47 -04:00
Compare commits
4 Commits
4230eabcae
...
5be85e7b6b
Author | SHA1 | Date | |
---|---|---|---|
5be85e7b6b | |||
24f045e757 | |||
e048767773 | |||
b52fdedb58 |
28
flake.lock
generated
28
flake.lock
generated
@ -31,21 +31,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1659877975,
|
|
||||||
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"gitignore": {
|
"gitignore": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
@ -96,11 +81,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1679174867,
|
"lastModified": 1719152388,
|
||||||
"narHash": "sha256-fFxb8wN3bjOMvHPr63Iyzo3cuHhQzWW03UkckfTeBWU=",
|
"narHash": "sha256-pHg0nzAa2ZM+zFamfsY7ZvVaB19pMr5wl4G5nO0J7eU=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "f5ec87b82832736f1624874fd34eb60c0b68bdd6",
|
"rev": "be54c7d931a68ba6a79f097ce979288e90a74288",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -121,17 +106,16 @@
|
|||||||
},
|
},
|
||||||
"rust-overlay": {
|
"rust-overlay": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_2",
|
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1678397831,
|
"lastModified": 1718681902,
|
||||||
"narHash": "sha256-7xbxSoiht8G+Zgz55R0ILPsTdbnksILCDMIxeg8Buns=",
|
"narHash": "sha256-E/T7Ge6ayEQe7FVKMJqDBoHyLhRhjc6u9CmU8MyYfy0=",
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
"repo": "rust-overlay",
|
"repo": "rust-overlay",
|
||||||
"rev": "bdf08e2f43488283eeb25b4a7e7ecba9147a955c",
|
"rev": "16c8ad83297c278eebe740dea5491c1708960dd1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
let
|
let
|
||||||
overlays = [ rust-overlay.overlays.default ];
|
overlays = [ rust-overlay.overlays.default ];
|
||||||
pkgs = import nixpkgs { inherit system overlays; };
|
pkgs = import nixpkgs { inherit system overlays; };
|
||||||
rust-wasm = pkgs.rust-bin.stable."1.68.0".default.override {
|
rust-wasm = pkgs.rust-bin.stable."1.77.0".default.override {
|
||||||
extensions = [ "rust-src" ];
|
extensions = [ "rust-src" ];
|
||||||
# Add wasm32 as an extra target besides the native target.
|
# Add wasm32 as an extra target besides the native target.
|
||||||
targets = [ "wasm32-unknown-unknown" ];
|
targets = [ "wasm32-unknown-unknown" ];
|
||||||
|
@ -34,12 +34,20 @@ stdenv.mkDerivation {
|
|||||||
'';
|
'';
|
||||||
# TODO(jwall): Build this from the root rather than the src.
|
# TODO(jwall): Build this from the root rather than the src.
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
|
set -x
|
||||||
echo building with wasm-pack
|
echo building with wasm-pack
|
||||||
|
wasm-pack --version
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
cd web
|
cd web
|
||||||
cp -r static $out
|
cp -r static $out
|
||||||
RUST_LOG=info wasm-pack build --mode no-install --release --target web --out-dir $out ${features};
|
cargo build --lib --release --target wasm32-unknown-unknown --target-dir $out --offline
|
||||||
|
wasm-bindgen $out/wasm32-unknown-unknown/release/kitchen_wasm.wasm --out-dir $out --typescript --target web
|
||||||
|
wasm-opt $out/kitchen_wasm_bg.wasm -o $out/kitchen_wasm_bg-opt.wasm -O
|
||||||
|
rm -f $out/kitchen_wasm_bg.wasm
|
||||||
|
mv $out/kitchen_wasm_bg-opt.wasm $out/kitchen_wasm_bg.wasm
|
||||||
cp -r index.html $out
|
cp -r index.html $out
|
||||||
cp -r favicon.ico $out
|
cp -r favicon.ico $out
|
||||||
|
rm -rf $out/release
|
||||||
|
rm -rf $out/wasm32-unknown-unknown
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user