Skip to content

Commit

Permalink
initial version on Mac OS X
Browse files Browse the repository at this point in the history
  • Loading branch information
evanj committed Jan 4, 2023
0 parents commit 9e4a99d
Show file tree
Hide file tree
Showing 5 changed files with 407 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
172 changes: 172 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[package]
name = "hugepagedemo"
version = "0.1.0"
edition = "2021"

[profile.release-nativecpu]
inherits = "release"
debug = true
# still unstable: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#profile-rustflags-option
# this is defined for make run_native
# TODO: Uncomment once stable
#rustflags = ["-C", "target-cpu=native"]

[dependencies]
humanunits = {git="https://github.com/evanj/humanunits"}
memory-stats = "1"
nix = {version="0", features=["mman"]}
rand = "0"
rand_xoshiro = "0"
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
all:
cargo fmt
cargo test
cargo check
# https://zhauniarovich.com/post/2021/2021-09-pedantic-clippy/#paranoid-clippy
# -D clippy::restriction is way too "safe"/careful
# -D clippy::pedantic is also probably too safe
cargo clippy --all-targets --all-features -- \
-D warnings \
-D clippy::nursery \
-D clippy::pedantic \
-A clippy::cast_precision_loss \
-A clippy::cast-sign-loss \
-A clippy::cast-possible-truncation

run_native:
RUSTFLAGS="-C target-cpu=native" cargo run --profile=release-nativecpu
Loading

0 comments on commit 9e4a99d

Please sign in to comment.