Allow to easily check the generated assembly
This commit is contained in:
parent
345914c97a
commit
6674696505
3 changed files with 7 additions and 1 deletions
|
|
@ -22,7 +22,7 @@
|
|||
inherit system;
|
||||
overlays = [ (import rust-overlay) ];
|
||||
};
|
||||
rust = pkgs.rust-bin.stable.latest.default;
|
||||
rust = pkgs.rust-bin.stable.latest.default.override { extensions = [ "rust-src" ]; };
|
||||
naersk' = pkgs.callPackage naersk {
|
||||
cargo = rust;
|
||||
rustc = rust;
|
||||
|
|
@ -38,6 +38,7 @@
|
|||
++ (with pkgs; [
|
||||
hyperfine
|
||||
cargo-flamegraph
|
||||
cargo-show-asm
|
||||
]);
|
||||
RUST_PATH = "${rust}";
|
||||
RUST_DOC_PATH = "${rust}/share/doc/rust/html/std/index.html";
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ fn rays<'a, T>(
|
|||
.map(|ray| ray.map(|(x, y)| &table[x][y]))
|
||||
}
|
||||
|
||||
#[inline(never)]
|
||||
pub fn part1(input: Parsed) {
|
||||
let expected = b"XMAS";
|
||||
let mut ray_count = 0;
|
||||
|
|
@ -60,6 +61,7 @@ pub fn part1(input: Parsed) {
|
|||
print_res!("Word count: {ray_count}");
|
||||
}
|
||||
|
||||
#[inline(never)]
|
||||
pub fn part2(input: Parsed) {
|
||||
let mut cross_count = 0;
|
||||
let expected = *b"MAS";
|
||||
|
|
|
|||
|
|
@ -5,14 +5,17 @@ use bstr::BString;
|
|||
|
||||
type Parsed = ();
|
||||
|
||||
#[inline(never)]
|
||||
pub fn parsing(input: &BString) -> color_eyre::Result<Parsed> {
|
||||
todo!("Parsing")
|
||||
}
|
||||
|
||||
#[inline(never)]
|
||||
pub fn part1(input: Parsed) {
|
||||
todo!("todo part1")
|
||||
}
|
||||
|
||||
#[inline(never)]
|
||||
pub fn part2(input: Parsed) {
|
||||
todo!("todo part2")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue