Skip to content
This repository was archived by the owner on Apr 21, 2026. It is now read-only.

Commit beb0e97

Browse files
author
Kit Plummer
authored
Kp/release prep (#7)
* add: DittoDocument trait docs * update: README, and print -> log * update: Cargo.toml and add MIT license * cotditto->ditto_cot
1 parent a2bd1d1 commit beb0e97

4 files changed

Lines changed: 19 additions & 20 deletions

File tree

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ See the [Rust README](rust/README.md) for detailed documentation.
3030

3131
```toml
3232
[dependencies]
33-
cotditto = { git = "https://github.com/yourusername/ditto_cot", package = "cotditto" }
33+
ditto_cot = { git = "https://github.com/getditto-shared/ditto_cot", package = "ditto_cot" }
3434
```
3535

3636
### End-to-End (e2e) Testing for Rust
@@ -175,7 +175,7 @@ The `DittoDocument` trait is part of the Ditto SDK and defines the interface for
175175
### Example: CoT Event → CotDocument → DQL
176176

177177
```rust
178-
use cotditto::{cot_events::CotEvent, ditto::{CotDocument, cot_to_document}};
178+
use ditto_cot::{cot_events::CotEvent, ditto::{CotDocument, cot_to_document}};
179179
use dittolive_ditto::prelude::*;
180180

181181
// Parse CoT XML and convert to CotDocument
@@ -203,7 +203,7 @@ for doc in results.documents() {
203203
When you receive a document from Ditto's DQL (e.g. as a `DittoDocument`), you can deserialize it to a `CotDocument` and then convert it back to a `CotEvent` for CoT XML serialization:
204204

205205
```rust
206-
use cotditto::{ditto::CotDocument, cot_events::CotEvent};
206+
use ditto_cot::{ditto::CotDocument, cot_events::CotEvent};
207207

208208
// Suppose you get a DittoDocument from a query
209209
let doc: CotDocument = DittoDocument::from_json_str(doc_json)?;
@@ -395,7 +395,7 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
395395
### Ditto Integration
396396

397397
```rust
398-
use cotditto::ditto_sync::{DittoContext, DittoError};
398+
use ditto_cot::ditto_sync::{DittoContext, DittoError};
399399

400400
async fn store_cot_event(ditto: &DittoContext, cot_xml: &str) -> Result<(), DittoError> {
401401
// Parse CoT XML
@@ -522,7 +522,7 @@ All CotDocument instances include these common fields (Note: DittoDocument is th
522522
The library provides basic XML well-formedness checking for CoT messages. Note that full XSD schema validation is not currently implemented.
523523
524524
```rust
525-
use cotditto::schema_validator::validate_against_cot_schema;
525+
use ditto_cot::schema_validator::validate_against_cot_schema;
526526
527527
let cot_xml = r#"
528528
<event version="2.0"
@@ -615,4 +615,3 @@ Ditto SDK Rust Docs: <https://software.ditto.live/rust/Ditto>
615615
---
616616

617617
MIT Licensed.
618-

fuzz/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[package]
2-
name = "cotditto-fuzz"
2+
name = "ditto_cot-fuzz"
33
version = "0.1.0"
44
edition = "2021"
55

6-
[dependencies.cotditto]
6+
[dependencies.ditto_cot]
77
path = ".."
88

99
[dependencies]

fuzz/fuzz_targets/fuzz_parse_cot.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![no_main]
22
use libfuzzer_sys::fuzz_target;
3-
use cotditto::xml_parser::parse_cot;
3+
use ditto_cot::xml_parser::parse_cot;
44

55
fuzz_target!(|data: &str| {
66
let _ = parse_cot(data);

rust/README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Rust Implementation
22

3-
[![Crates.io](https://img.shields.io/crates/v/cotditto)](https://crates.io/crates/cotditto)
4-
[![Documentation](https://docs.rs/cotditto/badge.svg)](https://docs.rs/cotditto)
3+
[![Crates.io](https://img.shields.io/crates/v/ditto_cot)](https://crates.io/crates/ditto_cot)
4+
[![Documentation](https://docs.rs/ditto_cot/badge.svg)](https://docs.rs/ditto_cot)
55
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
66

77
A high-performance Rust library for translating between [Cursor-on-Target (CoT)](https://www.mitre.org/sites/default/files/pdf/09_4937.pdf) XML events and Ditto-compatible CRDT documents.
@@ -27,7 +27,7 @@ Add to your `Cargo.toml`:
2727

2828
```toml
2929
[dependencies]
30-
cotditto = { git = "https://github.com/yourusername/ditto_cot" }
30+
ditto_cot = { git = "https://github.com/getditto-shared/ditto_cot" }
3131
```
3232

3333
## 🚀 Usage
@@ -37,7 +37,7 @@ cotditto = { git = "https://github.com/yourusername/ditto_cot" }
3737
The library provides ergonomic builder patterns for creating CoT events:
3838

3939
```rust
40-
use cotditto::cot_events::CotEvent;
40+
use ditto_cot::cot_events::CotEvent;
4141
use chrono::Duration;
4242

4343
// Create a simple location update
@@ -62,7 +62,7 @@ let tactical_event = CotEvent::builder()
6262
Create geographic points with builder pattern:
6363

6464
```rust
65-
use cotditto::cot_events::Point;
65+
use ditto_cot::cot_events::Point;
6666

6767
// Simple coordinate specification
6868
let point = Point::builder()
@@ -85,7 +85,7 @@ let point2 = Point::with_accuracy(34.0, -118.0, 100.0, 5.0, 10.0);
8585
### XML Parsing and Generation
8686

8787
```rust
88-
use cotditto::cot_events::CotEvent;
88+
use ditto_cot::cot_events::CotEvent;
8989

9090
// Parse CoT XML to CotEvent
9191
let cot_xml = r#"<event version="2.0" uid="TEST-123" type="a-f-G-U-C"
@@ -106,7 +106,7 @@ let xml_output = event.to_xml()?;
106106
Convert between CoT events and Ditto documents:
107107

108108
```rust
109-
use cotditto::{
109+
use ditto_cot::{
110110
cot_events::CotEvent,
111111
ditto::cot_to_document,
112112
};
@@ -129,7 +129,7 @@ println!("{}", json);
129129
### Quick Reference: Common Event Types
130130

131131
```rust
132-
use cotditto::cot_events::CotEvent;
132+
use ditto_cot::cot_events::CotEvent;
133133
use chrono::Duration;
134134

135135
// Location Update (GPS tracker, unit position)
@@ -181,8 +181,8 @@ The `CotDocument` enum implements Ditto's `DittoDocument` trait, allowing you to
181181

182182
```rust
183183
use dittolive_ditto::prelude::*;
184-
use cotditto::ditto::{CotDocument, cot_to_document};
185-
use cotditto::cot_events::CotEvent;
184+
use ditto_cot::ditto::{CotDocument, cot_to_document};
185+
use ditto_cot::cot_events::CotEvent;
186186

187187
// Create a CotEvent and convert to CotDocument
188188
let cot_event = CotEvent::new_location_update(/* parameters */);
@@ -222,7 +222,7 @@ let query_result = store.execute_v2((&query, params)).await?;
222222
223223
## 📚 Documentation
224224

225-
Full API documentation is available on [docs.rs](https://docs.rs/cotditto).
225+
Full API documentation is available on [docs.rs](https://docs.rs/ditto_cot).
226226

227227
## 🧪 Testing
228228

0 commit comments

Comments
 (0)