Scripts to build, test, clean and more, for a simple Rust(lang) project; useful for both local dev'ing and CI.
By default, these scripts build using MUSL. That means, that the resulting binary is usable on any 64bit Linux system. It also means, that we need some more tooling installed, and that projects to be built have to be configured to be MUSL buildable; the later mainly means, choosing the right dependencies and disabling features of deps. and sub-deps.
Alternatively you may also use Cargo directly, to make a simple, local-system dependent build:
cargo build --release
In your Rust(lang) project, either:
-
include this repo as a submodule:
git submodule add https://github.com/hoijui/rust-project-scripts.git run
-
or as an untracked, ignored dir (recommended):
git clone https://github.com/hoijui/rust-project-scripts.git run if ! grep -q -r "^/run/\$" .git/info/exclude; then echo '/run/' >> .git/info/exclude; fi
From then on, you can use the scripts like this:
run/build
or
run/test
Projects using these scripts:
projvar
- A tool that ensures that certain specific, project and build related environment variables are set.repvar
- A tiny CLI tool that replaces variables of the style${KEY}
in text with their respective value. It can also be used as a rust library.kicad-text-injector
- A tool that allows to post-process your KiCad PCB files, by replacing variables of the type${KEY}
in your text elements.