Skip to main content

Crate claw_core

Crate claw_core 

Source
Expand description

Core Claw VCS object types, IDs, hashing, and COF encoding.

claw-core owns the stable in-repository data model: typed objects, content-addressed IDs, Protocol Buffer conversions, and Claw Object Format helpers. Higher-level crates should use these APIs instead of duplicating serialization or hashing behavior.

§Example

use claw_core::hash::content_hash;
use claw_core::object::TypeTag;

let id = content_hash(TypeTag::Blob, b"hello");
assert_eq!(id.as_bytes().len(), 32);

Re-exports§

pub use error::CoreError;
pub use hash::content_hash;
pub use id::ChangeId;
pub use id::IntentId;
pub use id::ObjectId;
pub use object::Object;

Modules§

cof
Claw Object Format encoding and decoding.
error
Core error types shared across object encoding and conversion.
generated
Prost-generated Protocol Buffer bindings. Prost-generated Protocol Buffer modules for the Claw object schema.
hash
Domain-separated content hashing helpers.
id
Strongly typed object, intent, change, and conflict identifiers.
object
Top-level repository object enum and type tags.
proto_conv
Deterministic conversions between core objects and generated protobuf types. Conversion between hand-written Rust types and prost-generated proto types. Used for deterministic Protobuf serialization on disk.
types
Hand-written Claw VCS object model types. Hand-written Claw object model types.