Skip to main content

oxicode_hashline/
lib.rs

1//! oxicode-hashline — line-anchored patch format for AI-assisted code editing.
2//!
3//! Pure-function library: no filesystem, no agent runtime, no schema library.
4//! The host (oxicode-agent) injects a [`patcher::HashlineFs`] implementation.
5//!
6//! Ported from omp's `packages/hashline/` (TypeScript). Same algorithms,
7//! same test contracts, Rust idioms.
8#![warn(missing_docs)]
9
10pub mod apply;
11pub mod diff_preview;
12pub mod format;
13pub mod grammar;
14pub mod messages;
15pub mod mismatch;
16pub mod normalize;
17pub mod parser;
18pub mod patcher;
19pub mod recovery;
20pub mod snapshots;
21pub mod tokenizer;
22pub mod types;
23
24// Re-export the most-used items at crate root.
25pub use apply::apply_edits;
26pub use format::compute_file_hash;
27pub use normalize::{normalize_to_lf, strip_bom};
28pub use parser::{Patch, PatchSection, split_patch_input};
29pub use patcher::{HashlineFs, Patcher};
30pub use snapshots::{InMemorySnapshotStore, Snapshot, SnapshotStore};
31pub use types::{Anchor, Cursor, Edit};