Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .claude/settings.local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"permissions": {
"allow": [
"Bash(treefmt:*)",
"Bash(nix flake check:*)"
]
}
}
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
38 changes: 38 additions & 0 deletions .github/workflows/cargo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Cargo

on:
workflow_call:
inputs:
nightly:
type: boolean
components:
type: string
title:
type: string
required: true
run:
type: string
required: true

env:
RUSTFLAGS: -D warnings
RUSTDOCFLAGS: -D warnings

jobs:
cargo-run:
name: Run

runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Cache dependencies
uses: Swatinem/rust-cache@v2

- name: ${{ inputs.title }}
run: cargo ${{ inputs.run }}
102 changes: 89 additions & 13 deletions .github/workflows/ci.yaml → .github/workflows/ci-cd.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Continuous Integration
name: CI/CD

on:
- push
Expand All @@ -17,6 +17,17 @@ jobs:

runs-on: ubuntu-latest

strategy:
matrix:
features:
- name: No Default Features
flag: ""
- name: Default Features
flag: --features default
- name: All Features
flag: --all-features
fail-fast: false

steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -28,13 +39,24 @@ jobs:
uses: Swatinem/rust-cache@v2

- name: Run tests
run: cargo test --all-features
run: cargo test --tests --no-default-features ${{ matrix.features.flag }}

miri:
name: Miri

runs-on: ubuntu-latest

strategy:
matrix:
features:
- name: No Default Features
flag: ""
- name: Default Features
flag: --features default
- name: All Features
flag: --all-features
fail-fast: false

steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -51,13 +73,24 @@ jobs:
run: cargo miri setup

- name: Run Miri
run: cargo miri test --all-features
run: cargo miri test --tests --no-default-features ${{ matrix.features.flag }}

check:
name: Check
clippy:
name: Clippy

runs-on: ubuntu-latest

strategy:
matrix:
features:
- name: No Default Features
flag: ""
- name: Default Features
flag: --features default
- name: All Features
flag: --all-features
fail-fast: false

steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -70,11 +103,50 @@ jobs:
- name: Cache dependencies
uses: Swatinem/rust-cache@v2

- name: Check code
run: cargo clippy --all-features
- name: Run Clippy
run: cargo clippy --no-default-features ${{ matrix.features.flag }}

test-docs:
name: Test Documentation

runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Cache dependencies
uses: Swatinem/rust-cache@v2

- name: Run documentation tests
run: cargo test --doc --all-features

check-docs:
name: Check Documentation

runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@nightly

- name: Cache dependencies
uses: Swatinem/rust-cache@v2

- name: Install `cargo-docs-rs`
uses: dtolnay/install@cargo-docs-rs

- name: Check documentation
run: cargo docs-rs

format:
name: Format
check-format:
name: Check Formatting

runs-on: ubuntu-latest

Expand Down Expand Up @@ -104,8 +176,10 @@ jobs:
needs:
- test
- miri
- check
- format
- clippy
- test-docs
- check-docs
- check-format

if: github.event_name == 'push' && github.ref == 'refs/heads/main'

Expand Down Expand Up @@ -138,8 +212,10 @@ jobs:
needs:
- test
- miri
- check
- format
- clippy
- test-docs
- check-docs
- check-format

if: github.event_name == 'push' && github.ref == 'refs/heads/main'

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/security-audit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
push:
paths:
- "**/Cargo.toml"
- "**/Cargo.lock"
- "**/deny.toml"

pull_request:
Expand Down
52 changes: 21 additions & 31 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
# File created using '.gitignore Generator' for Visual Studio Code: https://bit.ly/vscode-gig
# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,macos,rust
# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,macos,rust

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon
Icon[
]

# Thumbnails
._*
Expand All @@ -30,46 +24,42 @@ Network Trash Folder
Temporary Items
.apdisk

### macOS Patch ###
# iCloud generated files
*.icloud

### Rust ###
# Generated by Cargo
# will have compiled files and executables
debug/
target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
# Cargo.lock
debug
target

# These are backup files generated by rustfmt
**/*.rs.bk

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

### VisualStudioCode ###
# Generated by cargo mutants
# Contains mutation testing data
**/mutants.out*/

# RustRover
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets

# Local History for Visual Studio Code
.history/
!*.code-workspace

# Built Visual Studio Code Extensions
*.vsix

### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide

# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,macos,rust
# Ignore build outputs from performing a nix-build or `nix build` command
result
result-*

# Custom rules (everything added below won't be overriden by 'Generate .gitignore File' if you use 'Update' option)
tmp/
# Ignore automatically generated direnv output
.direnv
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"rust-analyzer.server.path": "rust-analyzer",
"claudeCode.selectedModel": "sonnet"
}
Loading
Loading