Skip to content

Commit

Permalink
CD/CI, cargo plugins, compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
john-cd committed Dec 25, 2023
1 parent a3a499f commit 372b85c
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/tools/cargo_plugins.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Cargo Plugins

[Cargo-hack]( https://github.com/taiki-e/cargo-hack )

[cargo-machete]( https://github.com/bnjbvr/cargo-machete )

[cargo-make]( https://github.com/sagiegurari/cargo-make )
17 changes: 17 additions & 0 deletions src/tools/cd_ci.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Continuous Deployment / Continuous Integration

[Continuous Integration (cargo book)]( https://doc.rust-lang.org/cargo/guide/continuous-integration.html )

## GitHub Actions

[install-action]( https://github.com/taiki-e/install-action ) is a GitHub Action for installing development tools (mainly from GitHub Releases).

```yaml
- uses: taiki-e/install-action@v2
with:
tool: cargo-binstall,just,mdbook,mdbook-lintcheck
```
## See also
[Optimizing CI/CD pipelines in your Rust projects]( https://blog.logrocket.com/optimizing-ci-cd-pipelines-rust-projects/ )
31 changes: 31 additions & 0 deletions src/tools/improve_speed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Reduce compilation duration

Rust compile times can be long.

## Measuring build times

```sh
time cargo build
```

```sh
cargo build --timings
```

## Dynamic linking

```sh
cargo install cargo-add-dynamic
cargo add-dynamic polars --features csv-file,lazy,list,describe,rows,fmt,strings,temporal
cargo build
```

[Speeding up incremental Rust compilation with dylibs]( https://robert.kra.hn/posts/2022-09-09-speeding-up-incremental-rust-compilation-with-dylibs/ )

## Incremental Compilation

From-scratch builds with incremental compilation enabled adds about 15–20% overhead compared to disabled. The initial build needs to write out more intermediate state in order for later incremental builds to take advantage of it.

## Reference

[8 Solutions for Troubleshooting Your Rust Build Times]( https://jondot.medium.com/8-steps-for-troubleshooting-your-rust-build-times-2ffc965fd13e )

0 comments on commit 372b85c

Please sign in to comment.