Browse Source

add cargo commands

master
Jonathan Strong 1 year ago
parent
commit
636b7ba3bf
1 changed files with 43 additions and 1 deletions
  1. +43
    -1
      justfile

+ 43
- 1
justfile View File

@@ -1,2 +1,44 @@
flush-cache:
export MAKEFLAGS := "-j8"
export RUSTFLAGS := "-C link-arg=-fuse-ld=lld -C target-cpu=native"

cargo +args='':
cargo {{args}}

check +args='':
@just cargo check {{args}}

debug-build binary_name='binary-serialization' +args='':
@just cargo build --bin {{binary_name}} {{args}}

release-build binary_name='polar' +args='':
@just cargo build --bin {{binary_name}} --release {{args}}

example name +args='':
@just cargo build --example {{name}} {{args}}

test +args='':
@just cargo test {{args}}

doc +args='':
@just cargo doc --open {{args}}

doc-priv +args='':
@just cargo doc --open --document-private-items {{args}}

show-build-env:
@ env | rg RUST
@ env | rg '^MAKEFLAGS' | sort

bench +args='':
@just cargo bench {{args}}

update +args='':
@just cargo update {{args}}

rebuild:
just cargo clean
just update
just test

flush-disk-cache:
sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'

Loading…
Cancel
Save