Skip to content

WebVOWL/rust-alpine-mimalloc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 

Repository files navigation

rust-alpine-mimalloc

Helper script for use in an Alpine Docker image. Replaces the default musl malloc implementation with mimalloc. If you build Rust or C/C++ static executables in an image using this script, the resulting executables will automatically link with mimalloc without needing any special build flags.

Supported & tested archs: amd64.

Usage

build.sh VERSION [SECURE]

  • VERSION is your desired version of mimalloc.
  • SECURE (optional) if mimalloc should be built with full security migitations (~10% slower)

Example

RUN git clone "https://github.com/WebVOWL/rust-alpine-mimalloc"

WORKDIR /rust-alpine-mimalloc

# Build without secure mode
RUN /rust-alpine-mimalloc/build.sh 2.2.4

# Build with secure mode
# RUN /rust-alpine-mimalloc/build.sh 2.2.4 SECURE

# Set LD_PRELOAD to use mimalloc globally
ENV LD_PRELOAD=/usr/lib/libmimalloc.so

Documentation

The script patches libc.a.

For more details, see

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 99.5%
  • Shell 0.5%