A mimalloc static compiled Rust toolchain for amd64 and arm64.
2.5K
A mimalloc static compiled rust toolchain for amd64 and arm64.
| OS/ARCH | Description |
|---|---|
linux/amd64 | 64-bit x86 architecture for Linux operating systems |
linux/arm64 | 64-bit ARM architecture for Linux operating systems |
| Type | Container | Function |
|---|---|---|
| Environment | EUID | Optional Effective User ID |
| Environment | EGID | Optional Effective Group ID |
| Environment | UMASK | Optional Default permissions |
| Environment | SUGGEST | Optional Set suggestion messages |
| Volume | /mnt | Optional Bind mount volume |
Note
Rust statically links all but
glibc.
Based on kgrv/toolchain:clang
Available cargo targets:
aarch64-alpine-linux-muslx86_64-alpine-linux-muslmusl struggles with multi-threaded performance compared to glibcmimalloc patched libc.a to replace musl mallocEUID / EGID environment variablesmini:mini as defaultUMASK defaults to 0022SUGGEST defaults to trueapk permitted for mini with doascargorustfmtFROM kgrv/rust AS build
compile script is packaged to simplify build process. A script to compile static Rust binary.
USAGE: compile [OPTIONS] [CARGO_BUILD_ARGUMENTS]
EXAMPLES:
compile --release
compile --target-arch arm64 --release
OPTIONS:
ARCH comprises of 'amd64' and 'arm64'
defaults to build platform architecture
-b, --build-arch ARCH Build platform architecture
-t, --target-arch ARCH Target platform architecture
-m, --move APP Move APP binary to /tmp/
-d, --debug Enable debug mode
--version Display version
--help Display usage information
ENVIRONMENT:
Set environment variables to corresponding options
BUILDARCH [--build-arch] Build platform architecture
TARGETARCH [--target-arch] Target platform architecture
APP, MOVE [--move] Package binary name
Check out 'README.md' at https://hub.docker.com/r/kgrv/rust
build stage from kgrv/nreq:
FROM kgrv/rust AS build
ARG APP="nreq"
ARG BUILDARCH
ARG TARGETARCH
WORKDIR /tmp
COPY --link Cargo.toml .
COPY --link src/ src/
RUN --mount=type=cache,sharing=private,target=/tmp/target/ \
compile --features binary --bin "${APP}" --release --debug
docker run -it kgrv/rust
docker run -it -v $(pwd):/mnt kgrv/rust
Important
Argument
--useris not supported, please useEUID/EGID.
docker run -it -e EUID=$(id -u) -e EGID=$(id -g) kgrv/rust
docker run -it kgrv/rust --BECOME_ROOT
doas apk add PACKAGE
Content type
Image
Digest
sha256:8e260d3bd…
Size
262.6 MB
Last updated
17 days ago
docker pull kgrv/rust