Forgejo action for building rust projects.
Find a file
Renovate Bot 2c02c6fdaf
Some checks are pending
/ test (push) Waiting to run
chore(deps): update docker.io/rust docker tag to v1.80.1
2024-08-08 20:46:58 +00:00
.forgejo/workflows chore(deps): update kemitix/rust action to v1 2024-08-02 18:46:25 +00:00
src Add sample app to build and test 2024-05-16 19:46:05 +01:00
.gitignore Add sample app to build and test 2024-05-16 19:46:05 +01:00
Cargo.toml Add sample app to build and test 2024-05-16 19:46:05 +01:00
Dockerfile chore(deps): update docker.io/rust docker tag to v1.80.1 2024-08-08 20:46:58 +00:00
entrypoint.sh feat!: can run commands other than cargo 2024-08-04 15:03:35 +01:00
LICENSE Initial commit 2024-05-16 17:59:27 +01:00
README.md docs: update example to use rust version 2024-08-02 19:41:41 +01:00
renovate.json Add renovate.json 2024-08-02 18:16:19 +00:00

docker-builder-rust

Docker image for building Rust projects with Cargo.

Usage

In a Forgejo action file, e.g. .forgejo/workflows/test.yml:

on: [push]
jobs:
  test:
    runs-on: docker
    steps:
      - uses: https://git.kemitix.net/kemitix/rust@v1.80.0
        with:
          args: test
      - uses: https://git.kemitix.net/kemitix/rust@v1.80.0
        with:
          args: build

Contents

  • nodejs
  • clang-16
  • mold
  • rust
  • git
  • cargo
  • cargo-binstall

Linking

To take advantage of the clang and mold packages, add the following to the .cargo/config.toml file in your project.

[target.x86_64-unknown-linux-gnu]
linker = "/usr/bin/clang-16"
rustflags = ["-C", "link-arg=--ld-path=/usr/bin/mold"]

Binary size

To reduce the size of the debug binary, add the following to the .cargo/config.toml file in you project.

[profile.dev]
debug = 0
strip = "debuginfo"