Skip to content
15 changes: 15 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Objective

Describe the single problem or maintenance goal this PR addresses.

## Changes

Describe the smallest set of changes made to achieve the objective.

## Verification

- [ ] `cargo fmt --all --check`
- [ ] `cargo clippy --workspace --all-targets --all-features -- -D warnings`
- [ ] `cargo test --workspace --all-features`
- [ ] New or changed detection behavior includes positive and negative tests
- [ ] I reviewed the diff for unrelated refactoring or duplicated binding logic
18 changes: 18 additions & 0 deletions .github/workflows/rust-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Rust quality

on:
push:
pull_request:

jobs:
quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.88.0
components: rustfmt, clippy
- run: cargo fmt --all --check
- run: cargo clippy --workspace --all-targets --all-features -- -D warnings
- run: cargo test --workspace --all-features
1 change: 1 addition & 0 deletions .github/workflows/wasm-binding.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.88.0
targets: wasm32-unknown-unknown
- uses: actions/setup-node@v4
with:
Expand Down
27 changes: 27 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# DataFog Core repository rules

## Correctness

- Detection changes require positive and negative tests that prove the changed behavior.
- Do not silently discard fallible results.
- Avoid panic paths for user-controlled input.
- Preserve documented entity offset semantics across the Rust core and all bindings.

## Structure

- Add files only for distinct logical components.
- Do not introduce abstractions without a demonstrated need in the current codebase.
- Keep bindings thin: PII detection semantics belong in `crates/core`.
- Do not duplicate detector logic in Python, Node, or WASM bindings.
- Do not perform unrelated refactoring while implementing a scoped change.

## Code

- Comments document public behavior or explain non-obvious reasoning; do not narrate syntax.
- Prefer descriptive names over abbreviations.
- New third-party dependencies require a concrete need that cannot be met reasonably with the standard library or existing dependencies.

## Changes

- Keep each pull request focused on one behavior or maintenance goal.
- Run `cargo fmt --all --check`, `cargo clippy --workspace --all-targets --all-features -- -D warnings`, and `cargo test --workspace --all-features` before merging Rust changes.
1 change: 1 addition & 0 deletions bindings/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "datafog-node"
version = "0.1.0"
edition = "2024"
rust-version = "1.88"
description = "Node.js bindings for datafog-core"
license = "MIT"
repository = "https://github.com/DataFog/datafog-core"
Expand Down
1 change: 1 addition & 0 deletions bindings/python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "datafog-core-python"
version = "0.1.0"
edition = "2024"
rust-version = "1.88"
description = "Python bindings for datafog-core"
license = "MIT"
repository = "https://github.com/DataFog/datafog-core"
Expand Down
1 change: 1 addition & 0 deletions bindings/wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "datafog-wasm"
version = "0.1.0"
edition = "2024"
rust-version = "1.88"
description = "WebAssembly bindings for datafog-core"
license = "MIT"
repository = "https://github.com/DataFog/datafog-core"
Expand Down
2 changes: 1 addition & 1 deletion crates/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "datafog-core"
version = "0.1.0"
edition = "2024"
rust-version = "1.85"
rust-version = "1.88"
description = "Fast structured PII detection library"
license = "MIT"
homepage = "https://datafog.ai"
Expand Down
4 changes: 4 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[toolchain]
channel = "1.88.0"
profile = "minimal"
components = ["rustfmt", "clippy"]
2 changes: 2 additions & 0 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
edition = "2024"
style_edition = "2024"
Loading