File tree Expand file tree Collapse file tree 5 files changed +113
-14
lines changed Expand file tree Collapse file tree 5 files changed +113
-14
lines changed Original file line number Diff line number Diff line change 1+ use flake
Original file line number Diff line number Diff line change 1- name : Rust
1+ name : CI
2+ permissions :
3+ contents : read
24
35on :
46 pull_request :
@@ -14,20 +16,13 @@ jobs:
1416 steps :
1517 - uses : actions/checkout@v4
1618
17- - name : Install Rust toolchain
18- uses : dtolnay/rust-toolchain@v1
19+ # Install Nix
20+ - uses : cachix/install-nix-action@v27
1921 with :
20- toolchain : stable
21- targets : wasm32-unknown-unknown
22- components : clippy, rustfmt
22+ github_access_token : ${{ secrets.GITHUB_TOKEN }}
2323
24- # Install Just to run CI scripts
25- - uses : extractions/setup-just@v3
26-
27- # Cargo binstall is used to install tools faster than compiling them from source.
28- - uses : cargo-bins/cargo-binstall@main
29- - run : just setup-tools
24+ # Set RUSTFLAGS
25+ - run : echo "RUSTFLAGS=--cfg=web_sys_unstable_apis" >> $GITHUB_ENV
3026
3127 # Make sure u guys don't write bad code
32- - run : just check
33- - run : just test
28+ - run : nix develop --command just check
Original file line number Diff line number Diff line change 11target
22Cargo.lock
3+ .direnv /
Original file line number Diff line number Diff line change 1+ {
2+ description = "Web Transport development environment" ;
3+
4+ inputs = {
5+ nixpkgs . url = "github:NixOS/nixpkgs/nixpkgs-unstable" ;
6+ flake-utils . url = "github:numtide/flake-utils" ;
7+ } ;
8+
9+ outputs =
10+ {
11+ self ,
12+ nixpkgs ,
13+ flake-utils ,
14+ } :
15+ flake-utils . lib . eachDefaultSystem (
16+ system :
17+ let
18+ pkgs = import nixpkgs { inherit system ; } ;
19+
20+ tools = [
21+ pkgs . rustc
22+ pkgs . cargo
23+ pkgs . rustfmt
24+ pkgs . clippy
25+ pkgs . cargo-shear
26+ pkgs . cargo-sort
27+ pkgs . cargo-edit
28+ pkgs . cargo-hack
29+ pkgs . just
30+ pkgs . pkg-config
31+ pkgs . glib
32+ pkgs . gtk3
33+ ] ;
34+ in
35+ {
36+ devShells . default = pkgs . mkShell {
37+ packages = tools ;
38+ } ;
39+ }
40+ ) ;
41+ }
You can’t perform that action at this time.
0 commit comments