First implementation
This commit is contained in:
parent
f73149ed75
commit
87fe665095
4 changed files with 92 additions and 2 deletions
52
README.md
52
README.md
|
@ -1,3 +1,51 @@
|
|||
# docker-builders
|
||||
# docker-builder-rust
|
||||
|
||||
Builder images for use by forgejo actions.
|
||||
Docker image for building Rust projects with Cargo.
|
||||
|
||||
## Usage
|
||||
|
||||
In a Forgejo action file, e.g. `.forgejo/workflows/test.yml`:
|
||||
|
||||
```yml
|
||||
on: [push]
|
||||
jobs:
|
||||
test:
|
||||
runs-on: docker
|
||||
steps:
|
||||
- uses: https://git.kemitix.net/kemitix/rust@main
|
||||
with:
|
||||
args: test
|
||||
- uses: https://git.kemitix.net/kemitix/rust@main
|
||||
with:
|
||||
args: build
|
||||
|
||||
```
|
||||
|
||||
## Contents
|
||||
|
||||
- nodejs
|
||||
- clang-16
|
||||
- mold
|
||||
- rust
|
||||
- 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.
|
||||
|
||||
```toml
|
||||
[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.
|
||||
|
||||
```toml
|
||||
[profile.dev]
|
||||
debug = 0
|
||||
strip = "debuginfo"
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue