rust/README.md

40 lines
659 B
Markdown
Raw Normal View History

2024-05-16 18:52:20 +01:00
# docker-builder-rust
2024-05-16 17:59:27 +01:00
2024-05-16 18:52:20 +01:00
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
2024-05-16 18:52:20 +01:00
with:
2024-09-16 16:16:53 +01:00
args: cargo test
- uses: https://git.kemitix.net/kemitix/rust@v1.80.0
2024-05-16 18:52:20 +01:00
with:
2024-09-16 16:16:53 +01:00
args: cargo build
2024-05-16 18:52:20 +01:00
```
## Contents
- nodejs
- rust
- git
2024-05-16 18:52:20 +01:00
- 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
2024-05-17 06:56:50 +01:00
[profile.dev]
debug = 0
2024-05-16 18:52:20 +01:00
strip = "debuginfo"
```