Skip to content
Merged
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
3 changes: 3 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# `cargo xtask <task>` runs the workspace's development tasks (tools/xtask).
[alias]
xtask = "run --package xtask --"
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ rustc-ice-*.txt
# 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/

# This repository is used to test origin.
.origin/
15 changes: 13 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,30 @@ review bots read and write at the same time, written in Rust.
shared by every component.
- `crates/origin-platform`: everything that differs between platforms
(durable writes, file locks, copy-on-write clones, positioned reads,
refusing network file systems), behind traits. It is the only place that may depend on the
target OS.
refusing network file systems), behind traits. It is the only place whose
code differs by target OS. `std::os::unix`, which every supported platform
has, may be used anywhere.
- `crates/origin-client`: the HTTP client, generated from the server's OpenAPI
document. Never edit generated code by hand.
- `apps/origin-src`: the `origin` binary, both the command line and the
server.
- `tools/xtask`: development tasks, run with `cargo xtask`, such as timing
origin against git (`just bench-git`).

## Testing & Benchmarks

Performance is a primary goal, so benchmarks matter as much as tests. A change
to a hot path (hashing, storage, snapshots, transfer) should come with a
benchmark, and its numbers in the pull request.

- `just bench`: the divan micro-benchmarks (encoding, store writes,
snapshots).
- `just bench-git`: times origin against git on a 20,000-file tree with
hyperfine, and rewrites `docs/benchmarks.md`.

End-to-end tests run the `origin` binary with `ORIGIN_CONFIG_DIR` set to a
temporary directory, which holds the user's `config.toml` and node key.

## Commits & Pull Requests

Titles follow conventional commits with a scope, e.g.
Expand Down
Loading
Loading