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
77A 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" }
3737The 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 ;
4141use chrono :: Duration ;
4242
4343// Create a simple location update
@@ -62,7 +62,7 @@ let tactical_event = CotEvent::builder()
6262Create 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
6868let 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
9191let 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()?;
106106Convert 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 ;
133133use 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
183183use 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
188188let 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