Skip to content

Commit 2cb756b

Browse files
committed
actions: use toolchain.toml
1 parent dc09518 commit 2cb756b

File tree

4 files changed

+38
-14
lines changed

4 files changed

+38
-14
lines changed

.cargo/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ CXXFLAGS = "-O2"
44

55
[build]
66
rustc-wrapper = "sccache"
7-
rustflags = ["Z", "threads=16"]
7+
rustflags = ["-Z", "threads=16"]
88

99
[target.x86_64-unknown-linux-gnu]
1010
linker = "clang"

.github/workflows/web.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ jobs:
2828

2929
- name: Set up Rust
3030
uses: actions-rs/toolchain@v1
31-
with:
32-
toolchain: nightly-2024-11-22
33-
default: true
34-
override: true
3531

3632
- name: Install wasm-pack via apt
3733
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

flake.nix

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,50 @@
77
flake-utils.url = "github:numtide/flake-utils";
88
};
99

10-
outputs = { self, nixpkgs, rust-overlay, flake-utils }:
11-
flake-utils.lib.eachDefaultSystem (system:
10+
outputs =
11+
{
12+
self,
13+
nixpkgs,
14+
rust-overlay,
15+
flake-utils,
16+
}:
17+
flake-utils.lib.eachDefaultSystem (
18+
system:
1219
let
1320
overlays = [ (import rust-overlay) ];
1421
pkgs = import nixpkgs { inherit system overlays; };
1522

16-
rustToolchain =
17-
pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
23+
rustToolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
1824

19-
libraries = with pkgs; [ wayland libxkbcommon libGL vulkan-loader vulkan-headers gcc.cc.lib ];
20-
in {
25+
libraries = with pkgs; [
26+
wayland
27+
libxkbcommon
28+
libGL
29+
vulkan-loader
30+
vulkan-headers
31+
gcc.cc.lib
32+
pkgsCross.mingwW64.windows.pthreads
33+
];
34+
in
35+
{
2136
devShells.default = pkgs.mkShell {
22-
buildInputs = with pkgs;
23-
[ rustToolchain pkg-config sccache mold clang ] ++ libraries;
37+
buildInputs =
38+
with pkgs;
39+
[
40+
rustToolchain
41+
pkg-config
42+
sccache
43+
mold
44+
clang
45+
nil
46+
pkgsCross.mingwW64.stdenv.cc
47+
nixd
48+
]
49+
++ libraries;
2450
RUST_SRC_PATH = "${rustToolchain}/lib/rustlib/src/rust/library";
2551
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath libraries;
2652
PKG_CONFIG_PATH = pkgs.lib.makeSearchPath "lib/pkgconfig" libraries;
2753
};
28-
});
54+
}
55+
);
2956
}

rust-toolchain.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
[toolchain]
22
channel = "nightly-2025-06-30"
33
components = ["rust-src", "rustc-dev", "llvm-tools", "rustc-codegen-cranelift-preview"]
4+
targets = ["x86_64-pc-windows-gnu"]

0 commit comments

Comments
 (0)