39 lines
659 B
Markdown
39 lines
659 B
Markdown
# docker-builder-rust
|
|
|
|
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@v1.80.0
|
|
with:
|
|
args: cargo test
|
|
- uses: https://git.kemitix.net/kemitix/rust@v1.80.0
|
|
with:
|
|
args: cargo build
|
|
```
|
|
|
|
## Contents
|
|
|
|
- nodejs
|
|
- rust
|
|
- git
|
|
- cargo
|
|
- cargo-binstall
|
|
|
|
## 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"
|
|
```
|