Skip to content

tweag/rust-alpine-mimalloc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rust-alpine-mimalloc

This Docker image builds upon the alpine:latest image, provides cargo/rustc and replaces the default musl malloc implementation with mimalloc. If you build Rust or C/C++ static executables in this image, the resulting executables will automatically link with mimalloc without needing any special build flags.

Notice: we switched away from rust:alpine and now uses cargo/rust packaged by alpine. Statically linked executables will continue to link against mimalloc as intended, but you need extra command-line arguments to ensure they are indeed static:

$ RUSTFLAGS="-C target-feature=+crt-static" cargo install --target x86_64-alpine-linux-musl foo

The --target flag is required. The default target is either x86_64-alpine-linux-musl or aarch64-alpine-linux-musl, and can also be extracted from $(rustc -vV | sed -n "s|host: ||p").

Supported & tested archs: amd64 and arm64/v8.

For more details, see this blog post.

About

No description, website, or topics provided.

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published