Loading doc/languages-frameworks/rust.section.md +29 −0 Original line number Diff line number Diff line Loading @@ -736,6 +736,35 @@ stdenv.mkDerivation (finalAttrs: { }) ``` ### Compiling `wasm32-wasip1` package {#compiling-wasm32-wasip1-package} ```nix pkgsCross.wasi32.callPackage ( { fetchFromGitHub, rustPlatform, lld, }: rustPlatform.buildRustPackage (finalAttrs: { pname = "zellij-harpoon"; version = "0.3.0"; src = fetchFromGitHub { owner = "Nacho114"; repo = "harpoon"; tag = "v${finalAttrs.version}"; hash = "sha256-JmYcbzxIF6qZs2/RKuspHqNpyDibGp9CVQJj47y/BOQ="; }; cargoHash = "sha256-lsv5Wssakni18jif++fPo3Z5WyBtvPsGpWwG3abR7jQ="; # these two lines are currently required env.RUSTFLAGS = "-C linker=wasm-ld"; nativeBuildInputs = [ lld ]; }) ) { } ``` ## `buildRustCrate`: Compiling Rust crates using Nix instead of Cargo {#compiling-rust-crates-using-nix-instead-of-cargo} ### Simple operation {#simple-operation} Loading doc/redirects.json +3 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,9 @@ "cmake-ctest-variables": [ "index.html#cmake-ctest-variables" ], "compiling-wasm32-wasip1-package": [ "index.html#compiling-wasm32-wasip1-package" ], "coq-withPackages": [ "index.html#coq-withPackages" ], Loading Loading
doc/languages-frameworks/rust.section.md +29 −0 Original line number Diff line number Diff line Loading @@ -736,6 +736,35 @@ stdenv.mkDerivation (finalAttrs: { }) ``` ### Compiling `wasm32-wasip1` package {#compiling-wasm32-wasip1-package} ```nix pkgsCross.wasi32.callPackage ( { fetchFromGitHub, rustPlatform, lld, }: rustPlatform.buildRustPackage (finalAttrs: { pname = "zellij-harpoon"; version = "0.3.0"; src = fetchFromGitHub { owner = "Nacho114"; repo = "harpoon"; tag = "v${finalAttrs.version}"; hash = "sha256-JmYcbzxIF6qZs2/RKuspHqNpyDibGp9CVQJj47y/BOQ="; }; cargoHash = "sha256-lsv5Wssakni18jif++fPo3Z5WyBtvPsGpWwG3abR7jQ="; # these two lines are currently required env.RUSTFLAGS = "-C linker=wasm-ld"; nativeBuildInputs = [ lld ]; }) ) { } ``` ## `buildRustCrate`: Compiling Rust crates using Nix instead of Cargo {#compiling-rust-crates-using-nix-instead-of-cargo} ### Simple operation {#simple-operation} Loading
doc/redirects.json +3 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,9 @@ "cmake-ctest-variables": [ "index.html#cmake-ctest-variables" ], "compiling-wasm32-wasip1-package": [ "index.html#compiling-wasm32-wasip1-package" ], "coq-withPackages": [ "index.html#coq-withPackages" ], Loading