Sign inSign up

hustcer/rust-cross-freebsd

By hustcer

Updated 3 months ago

A docker image to cross compile Rust for FreeBSD, currently only x86_64 architecture is supported.

Image
Developer tools
0

1.5K

hustcer/rust-cross-freebsd repository overview

Docker Rust FreeBSD Target Docker Image Version (latest by date)

This Docker image is used to cross compile Rust for FreeBSD, currently only x86_64 architecture is supported. And the rust-toolchain.toml in your project directory will be respected to install the Rust version specified.

Usage

General Example

In the directory containing your project run:

    docker container run --rm --volume "$(pwd)":/src \
        --init --tty --user "$(id --user):$(id --group)" \
        "hustcer/rust-cross-freebsd:latest" \
        build --release --target x86_64-unknown-freebsd
GitHub Action Example

This example works out of the box in a run step with the ubuntu runner.

    docker container run --rm
        --volume ${{ github.workspace }}:/src
        --user $(id --user):$(id --group)
        hustcer/rust-cross-freebsd:latest build --release --target x86_64-unknown-freebsd
Using as a Base Image
FROM hustcer/rust-cross-freebsd:latest
USER root
RUN apt-get update \
    && apt-get install --no-install-recommends -y libssl-dev
USER rust
ENTRYPOINT ["/bin/sh", "-c"]

Docker Hub

Tag summary

Content type

Image

Digest

sha256:d43d1bfbb

Size

722.3 MB

Last updated

3 months ago

docker pull hustcer/rust-cross-freebsd