Skip to content

Static d4tools binary #110

Description

@oyvinev

I think d4tools would gain a lot more traction if it was available as a static binary.

I have very little experience with rust, but was able to generate a static binary like this:

static-binary.sh:

#!/bin/bash

apt update
apt install -y musl-tools
rustup target add x86_64-unknown-linux-musl
cargo build --target=x86_64-unknown-linux-musl --profile release

Executed from the d4-format root directory like:

docker run -it -v $(pwd):$(pwd) --workdir $(pwd) rust:1.84-bookworm ./static-binary.sh

Thoughts?

Edit: Ok, the binary is 129MB 😅

Edit2:

$ ldd ./target/x86_64-unknown-linux-musl/release/d4tools
	statically linked

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions