-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update Rust nightly version to 2024-11-20 (1.84) (#148)
* chore: update flake deps and bump rust nightly version * refactor: add explicit lifetime names * refactor: replace removed `CARGO_RUSTC_CURRENT_DIR` ref: rust-lang/cargo#3946 * refactor: switch naked fns to `naked_asm!` Switch to the newly required `naked_asm!` macro in all naked functions. ref: rust-lang/rust#90957 * fix: update custom target manifest files to avoid ICE apparently Rust doesn't like it when the custom target manifest file is missing the `llvm-abiname` field * silence warning about mutable static * refactor: elide lifetimes * fmt * refactor: apply `clippy::manual_div_ceil` suggestion * fix: use explicit `ptr.wrapping_byte_add` for conversions from physmem to virtmem references We previously relied on UB actually doing the wrapping behaviour, but well, that's not ideal is it
- Loading branch information
1 parent
27a200c
commit a3e1859
Showing
39 changed files
with
289 additions
and
276 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,48 @@ | ||
# forked from https://github.com/tosc-rs/mnemos/blob/main/flake.nix | ||
{ | ||
description = "Flake providing a development shell for k23"; | ||
description = "Flake providing a development shell for k23"; | ||
|
||
inputs = { | ||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
rust-overlay = { | ||
url = "github:oxalica/rust-overlay"; | ||
inputs = { | ||
nixpkgs.follows = "nixpkgs"; | ||
}; | ||
inputs = { | ||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
rust-overlay = { | ||
url = "github:oxalica/rust-overlay"; | ||
inputs = { | ||
nixpkgs.follows = "nixpkgs"; | ||
}; | ||
}; | ||
}; | ||
|
||
outputs = { nixpkgs, flake-utils, rust-overlay, ... }: | ||
flake-utils.lib.eachDefaultSystem (system: | ||
let | ||
overlays = [ (import rust-overlay) ]; | ||
pkgs = import nixpkgs { inherit system overlays; }; | ||
# use the Rust toolchain specified in the project's rust-toolchain.toml | ||
rustToolchain = pkgs.pkgsBuildHost.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml; | ||
in | ||
{ | ||
devShell = with pkgs; mkShell rec { | ||
name = "k23-dev"; | ||
nativeBuildInputs = [ | ||
# compilers | ||
rustToolchain | ||
clang | ||
outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }: | ||
flake-utils.lib.eachDefaultSystem (system: | ||
let | ||
overlays = [ (import rust-overlay) ]; | ||
pkgs = import nixpkgs { | ||
inherit system overlays; | ||
}; | ||
rustToolchain = with pkgs; rust-bin.fromRustupToolchainFile ./rust-toolchain.toml; | ||
in | ||
{ | ||
devShells.default = with pkgs; mkShell rec { | ||
name = "k23-dev"; | ||
buildInputs = [ | ||
# compilers | ||
rustToolchain | ||
clang | ||
|
||
# devtools | ||
just | ||
mdbook | ||
socat | ||
wabt | ||
# devtools | ||
just | ||
mdbook | ||
socat | ||
wabt | ||
dtc | ||
|
||
# for testing the kernel | ||
qemu | ||
]; | ||
buildInputs = []; | ||
# for testing the kernel | ||
qemu | ||
]; | ||
|
||
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib"; | ||
LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}"; | ||
}; | ||
} | ||
); | ||
} | ||
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib"; | ||
LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}"; | ||
}; | ||
} | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.