clear crate names

This commit is contained in:
Jazz Turner-Baggs 2026-03-22 16:15:32 -07:00
parent 1f481005fa
commit 5a6142cad9
No known key found for this signature in database
57 changed files with 46 additions and 5 deletions

7
Cargo.lock generated
View File

@ -119,6 +119,13 @@ dependencies = [
"zeroize",
]
[[package]]
name = "client"
version = "0.1.0"
dependencies = [
"libchat",
]
[[package]]
name = "const-oid"
version = "0.9.6"

View File

@ -3,15 +3,16 @@
resolver = "3"
members = [
"libchat/conversations",
"libchat/crypto",
"libchat/double-ratchets",
"libchat/storage",
"core_crates/conversations",
"core_crates/crypto",
"core_crates/double-ratchets",
"core_crates/storage",
"chat_crates/client",
]
[workspace.dependencies]
blake2 = "0.10"
storage = { path = "libchat/storage" }
storage = { path = "core_crates/storage" }
# Panicking across FFI boundaries is UB; abort is the correct strategy for a
# C FFI library.

View File

@ -0,0 +1,10 @@
[package]
name = "client"
version = "0.1.0"
edition = "2024"
[lib]
crate-type = ["rlib"]
[dependencies]
libchat = { path = "../../core_crates/conversations" }

View File

@ -0,0 +1,18 @@
use libchat::ChatError;
use libchat::Context;
pub struct ChatClient {
ctx: Context,
}
impl ChatClient {
pub fn new(name: impl Into<String>) -> Self {
Self {
ctx: Context::new_with_name(name),
}
}
pub fn create_bundle(&mut self) -> Result<Vec<u8>, ChatError> {
self.ctx.create_intro_bundle()
}
}

View File

@ -0,0 +1,3 @@
mod client;
pub use client::ChatClient;

View File

@ -12,6 +12,8 @@ mod types;
mod utils;
pub use api::*;
pub use context::{Context, Introduction};
pub use errors::ChatError;
#[cfg(test)]
mod tests {