1
0
Fork
You've already forked rust
0
Docker image for building rust projects.
  • Shell 34.3%
  • Rust 29.5%
  • Just 20%
  • Dockerfile 16.2%
2026年07月04日 11:49:27 +00:00
.crow chore: bump version to 2026年6月1日 2026年06月03日 06:06:53 +00:00
scripts chore: add debug output to check-commit-time script 2026年02月27日 15:16:30 +00:00
src chore: bump version to 2026年6月3日 2026年06月18日 10:14:35 +00:00
.gitignore feat: enhance CI pipeline and development tooling 2026年01月04日 21:13:06 +00:00
cairn.toml chore: bump version to 2026年6月1日 2026年06月03日 06:06:53 +00:00
Cargo.toml chore: bump version to 2026年7月1日 2026年07月04日 11:49:27 +00:00
CHANGELOG.md chore: bump version to 2026年7月1日 2026年07月04日 11:49:27 +00:00
Dockerfile feat(docker): add trunk@0.21.14 and wasm-bindgen-cli@0.2.126 2026年07月04日 11:48:35 +00:00
justfile chore: bump version to 2026年6月1日 2026年06月03日 06:06:53 +00:00
LICENSE Initial commit 2024年05月16日 17:59:27 +01:00
mise.toml chore: use nextest in mise task 2025年10月02日 18:14:45 +00:00
README.md feat(docker): install binaryen (wasm-opt) in CI image 2026年04月13日 16:42:04 +00:00
renovate.json Add renovate.json 2024年08月02日 18:16:19 +00:00
rustfmt.toml feat(config): add rustfmt configuration 2026年01月03日 09:19:12 +00:00

docker-builder-rust

Docker image for building Rust projects with Cargo.

CI/CD

This project uses Crow CI for automated builds:

  • Branch builds: Pushes to the default branch trigger a build tagged as latest
  • Version builds: Creating a tag matching v*.*.* (e.g., v1.2.3) triggers a build tagged with that version

Creating a versioned release

# Create and push a version tag
jj git tag v1.2.3
jj git push --tag v1.2.3

This will automatically build and push the image as git.kemitix.net/kemitix/rust:v1.2.3.

Usage

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

on:[push]jobs:test:runs-on:dockercontainer:image:git.kemitix.net/kemitix/rust:lateststrategy:matrix:toolchain:- name:stable- name:nightlysteps:- name:Testrun:cargo +${{ matrix.toolchain.name }} test- name:Build (with stable as default)run:cargo build

Toolchains

The available toolchain in the image are:

  • nightly
  • stable

Contents

  • binaryen (wasm-opt)
  • nodejs
  • deno
  • rust
  • git
  • jujutsu
  • cargo
  • cargo-binstall
  • cargo-chef
  • cargo-hack
  • cargo-machete
  • cargo-nextest
  • cargo-readme
  • forgejo-todo-checker
  • just
  • wasm-pack
  • dbus-dev
  • perl

Rustup Targets

  • wasm32-unknown-unknown (stable and nightly)

Scripts

  • check-for-ignored
  • check-commit-time

check-for-ignored

Checks for files that are being tracked by Git but should be ignored according to the .gitignore file.

steps:- name:Check for Ignored Filesrun:check-for-ignored

check-commit-time

Validates commit timestamps against configurable blocked time windows. Useful for enforcing work-hour policies in CI.

Environment Variables:

  • BLOCKED_TIME_WINDOWS - Comma-separated time ranges (e.g., 08:00-12:00,13:00-16:00)
  • BLOCKED_DAYS - Comma-separated days using three-letter abbreviations (e.g., Mon,Tue,Wed,Thu,Fri)
  • BLOCKED_TIMEZONE - Timezone for evaluation (default: UTC)

Exit Codes:

  • 0 - Commit allowed (no config or outside blocked windows)
  • 1 - Commit blocked (falls within blocked window)
steps:- name:Check Commit Timeenv:BLOCKED_TIME_WINDOWS:"08:00-12:00,13:00-16:00"BLOCKED_DAYS:"Mon,Tue,Wed,Thu,Fri"BLOCKED_TIMEZONE:"America/New_York"run:check-commit-time

If BLOCKED_TIME_WINDOWS is not set, all commits are allowed. If BLOCKED_DAYS is not set, all days are checked against the time windows.

Limitation: Time windows must not span midnight (e.g., 22:00-06:00 is not supported). Use separate windows instead: 22:00-23:59,00:00-06:00.

Caveats

openssl

The alpine linux install doesn't build with this dependency. You can either compile native-tls with the vendored feature, or not use openssl.

If possible, use rustls instead.

vendoered native-tls

This crate must use the vendored feature in order to compile in the Alpine Linux image.

native-tls = { version = "0.2", features = ["vendored"] }

Don't use openssl

Check that none of your dependencies require openssl:

cargo tree --edges normal -i openssl

This will list the tree of dependencies that are bringing in openssl.

If you do need ssl/tls, try using rustls. e.g.

reqwest = { version = "0.12", default-features = false, features = [
 "json",
 "rustls-tls",
] }