Compilation
View SourcePre-compilation
Pre-compiled binaries are available for the following targets, so you don't need to have Rust installed to compile and use this library:
aarch64-apple-darwinaarch64-unknown-linux-gnuaarch64-unknown-linux-muslarm-unknown-linux-gnueabihfriscv64gc-unknown-linux-gnux86_64-apple-darwinx86_64-pc-windows-gnux86_64-pc-windows-msvcx86_64-unknown-freebsdx86_64-unknown-linux-gnux86_64-unknown-linux-musl
Note: The pre-compiled binaries for Linux are compiled using Ubuntu 22 on libc 2.35, which requires minimum Ubuntu 22, Debian Bookworm or a system with a compatible libc version. For older Linux systems, you'll need to compile manually.
Compile manually
But in case you need or want to compile it yourself, you can do the following:
Install a C compiler or build packages
It depends on your OS, for example in Ubuntu you can install the build-essential package.
- Run:
export MDEX_BUILD=1
mix deps.get
mix compile
Legacy CPUs
Modern CPU features are enabled by default but if your environment has an older CPU,
you can use legacy artifacts by adding the following configuration to your config.exs:
config :mdex, use_legacy_artifacts: true