Compare commits
No commits in common. "dbe6a60417774dc93d5b6df9dcdef1ef753ed913" and "de4785cc294e240d236b5cd72caac5dbfe4a70ee" have entirely different histories.
dbe6a60417
...
de4785cc29
3 changed files with 18 additions and 55 deletions
|
@ -13,6 +13,8 @@ RUN apt-get update \
|
||||||
--no-install-recommends \
|
--no-install-recommends \
|
||||||
nodejs=18.19.0+dfsg-6~deb12u2 \
|
nodejs=18.19.0+dfsg-6~deb12u2 \
|
||||||
curl=7.88.1-10+deb12u7 \
|
curl=7.88.1-10+deb12u7 \
|
||||||
|
clang-16=1:16.0.6-15~deb12u1 \
|
||||||
|
mold=1.10.1+dfsg-1 \
|
||||||
pkg-config=1.8.1-1 \
|
pkg-config=1.8.1-1 \
|
||||||
libssl-dev=3.0.14-1~deb12u2 \
|
libssl-dev=3.0.14-1~deb12u2 \
|
||||||
libdbus-1-dev=1.14.10-1~deb12u1 \
|
libdbus-1-dev=1.14.10-1~deb12u1 \
|
||||||
|
|
26
README.md
26
README.md
|
@ -14,30 +14,32 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: https://git.kemitix.net/kemitix/rust@v1.80.0
|
- uses: https://git.kemitix.net/kemitix/rust@v1.80.0
|
||||||
with:
|
with:
|
||||||
args: nightly cargo test
|
args: test
|
||||||
- uses: https://git.kemitix.net/kemitix/rust@v1.80.0
|
- uses: https://git.kemitix.net/kemitix/rust@v1.80.0
|
||||||
with:
|
with:
|
||||||
args: v1.79.0 cargo build
|
args: build
|
||||||
```
|
```
|
||||||
|
|
||||||
The `args` is one of the following:
|
|
||||||
|
|
||||||
- <COMMAND>
|
|
||||||
- [ [nightly | stable | v1.xx.x] ] <COMMAND>
|
|
||||||
|
|
||||||
`COMMAND` is the command you want to run. The optional prefix is the Rust toolchain, or version. Allowed values are `nightly`, `stable` or a Rust version.
|
|
||||||
|
|
||||||
Where the optional prefix is not given, the `stable` toolchain will be used.
|
|
||||||
|
|
||||||
|
|
||||||
## Contents
|
## Contents
|
||||||
|
|
||||||
- nodejs
|
- nodejs
|
||||||
|
- clang-16
|
||||||
|
- mold
|
||||||
- rust
|
- rust
|
||||||
- git
|
- git
|
||||||
- cargo
|
- cargo
|
||||||
- cargo-binstall
|
- cargo-binstall
|
||||||
|
|
||||||
|
## Linking
|
||||||
|
|
||||||
|
To take advantage of the clang and mold packages, add the following to the `.cargo/config.toml` file in your project.
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[target.x86_64-unknown-linux-gnu]
|
||||||
|
linker = "/usr/bin/clang-16"
|
||||||
|
rustflags = ["-C", "link-arg=--ld-path=/usr/bin/mold"]
|
||||||
|
```
|
||||||
|
|
||||||
## Binary size
|
## Binary size
|
||||||
|
|
||||||
To reduce the size of the debug binary, add the following to the `.cargo/config.toml` file in you project.
|
To reduce the size of the debug binary, add the following to the `.cargo/config.toml` file in you project.
|
||||||
|
|
|
@ -2,46 +2,5 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
echo "INPUT_ARGS: ${INPUT_ARGS}"
|
rustup update
|
||||||
|
${INPUT_ARGS}
|
||||||
# split input into an array
|
|
||||||
read -ra ARGS <<<"${INPUT_ARGS}"
|
|
||||||
|
|
||||||
# default toolchain
|
|
||||||
TOOLCHAIN="stable"
|
|
||||||
echo "Default toolchain: ${TOOLCHAIN}"
|
|
||||||
|
|
||||||
# if first parameter is 'nightly'...
|
|
||||||
if test "${ARGS[0]}" == "nightly"; then
|
|
||||||
TOOLCHAIN="nightly"
|
|
||||||
ARGS=("${ARGS[@]:1}")
|
|
||||||
fi
|
|
||||||
if test "${ARGS[0]}" == "stable"; then
|
|
||||||
TOOLCHAIN="stable" # redundant as this is the default
|
|
||||||
ARGS=("${ARGS[@]:1}")
|
|
||||||
fi
|
|
||||||
if [[ "${ARGS[0]}" == v1* ]]; then
|
|
||||||
TOOLCHAIN="${ARGS[0]:1}"
|
|
||||||
ARGS=("${ARGS[@]:1}")
|
|
||||||
fi
|
|
||||||
echo "Selected toolchain: ${TOOLCHAIN}"
|
|
||||||
|
|
||||||
rustup update "${TOOLCHAIN}"
|
|
||||||
|
|
||||||
if test "${ARGS[0]}" == "cargo";then
|
|
||||||
PRE_COMMAND="cargo +${TOOLCHAIN} "
|
|
||||||
else
|
|
||||||
PRE_COMMAND="${ARGS[0]}"
|
|
||||||
fi
|
|
||||||
ARGS=("${ARGS[@]:1}")
|
|
||||||
|
|
||||||
# ensure toolchain is up-to-date
|
|
||||||
# recombine remaining arguments
|
|
||||||
COMMAND=$(
|
|
||||||
IFS=" "
|
|
||||||
echo "${ARGS[*]}"
|
|
||||||
)
|
|
||||||
|
|
||||||
# execute command
|
|
||||||
echo "${PRE_COMMAND} ${COMMAND}"
|
|
||||||
${PRE_COMMAND} ${COMMAND}
|
|
||||||
|
|
Loading…
Reference in a new issue