-
Notifications
You must be signed in to change notification settings - Fork 14
Introduce CLAUDE.md #1375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Introduce CLAUDE.md #1375
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| # Design Goals | ||
|
|
||
| Lading is a performance tool. It's behavior has consequences on the development | ||
| practices of large number of engineers and so lading must be: | ||
|
|
||
| * strictly 'faster' than targets, users must not wonder if their target has hit | ||
| a bottleneck or lading has, | ||
| * deterministic, targets must receive the same load across all instances of | ||
| lading else replication of results is impossible and | ||
| * extensible, lading must be available and capable of being extended for a | ||
| variety of use-cases. | ||
|
|
||
| No change is valid to lading that is in conflict with these goals. In specific | ||
| this means that lading will pre-allocate where possible, will explicitly thread | ||
| randomness and other sources of non-determinism into code paths and will | ||
| preference algorithms that have better worst-case behavior. | ||
|
|
||
| # Code Style | ||
|
|
||
| This project is subject attempts to automate code style to a great degree, using | ||
| these tools: | ||
|
|
||
| * `cargo clippy` | ||
| * `cargo fmt` | ||
|
|
||
| We do not allow for warnings: all warnings are errors. Deprecation warnings MUST | ||
| be treated as errors. Lading is written in a "naive" style where abstraction is | ||
| not preferred if a duplicated pattern will satisfy. Our reasoning for this is it | ||
| makes ramp-up for new engineers easier: all you must do is follow the pattern, | ||
| not internalize a complex type hierarchy. There are obvious places in the code | ||
| base where replicated patterns have been made into abstractions -- we follow the | ||
| "shape" rule, if you have three or more repeats, make a jig -- but we do not | ||
| start there. | ||
|
|
||
| Lading is written to be as easy to contribute to as possible. We ask that any | ||
| dependency used in the project in more than one crate be present in the | ||
| top-level Cargo.toml and be referenced from the workspace in sub-crates. | ||
|
|
||
| Lading does not care about inward backward compatibility. Behavior observable to | ||
| users must be preserved, but our internal APIs are not subject to backward | ||
| compatibility concerns. | ||
|
|
||
| Lading project uses comments strategically, documenting the "why" and not the | ||
| "what". Do not add "what" comments that put into English the behavior of a line | ||
| or two of code. Do add comments that explain the "why" of a block of code, how | ||
| it functions or is unusual in a way that an experienced engineer might not | ||
| understand. | ||
|
|
||
| Crate versions are always given as XX.YY and not XX.YY.ZZ. | ||
|
|
||
| # Testing | ||
|
|
||
| Where possible lading prefers property tests over unit tests and in especially | ||
| critical components we require proofs. We use | ||
| [proptest](https://github.com/proptest-rs/proptest) in this project for property | ||
| tests and the [kani](https://github.com/model-checking/kani) proof tool. | ||
|
|
||
| ## Workflow | ||
|
|
||
| Changes to lading are subject this flow: | ||
|
|
||
| * `cargo check` | ||
| * `cargo clippy` | ||
| * `cargo nextest run` | ||
|
|
||
| Proofs must be run with the `cargo kani` tool in the crate where proofs reside. | ||
|
|
||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. super nit: extra new line |
||
| # Tools | ||
|
|
||
| To identify outdated dependencies: `cargo outdated --root-deps-only`. | ||
|
|
||
| To run micro-benchmarks: `cargo criterion` | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a brief "map" of the crates in this project would be helpful, specifically what crates have what responsibilities.