mirror of
https://github.com/logos-messaging/libchat.git
synced 2026-04-02 17:43:14 +00:00
Implement a `client` crate that wraps the `libchat` context behind a simple `ChatClient<D>` API. The delivery strategy is pluggable via a `DeliveryService` trait, with two implementations provided: - `InProcessDelivery` — shared `MessageBus` for single-process tests - `CDelivery` — C function-pointer callback for the FFI layer Add a `client-ffi` crate that exposes the client as a C API via `safer-ffi`. A `generate-headers` binary produces the companion C header. Include two runnable examples: - `examples/in-process` — Alice/Bob exchange using in-process delivery - `examples/c-ffi` — same exchange written entirely in C; smoketested under valgrind (to catch memory leaks) in CI iterates: #71
40 lines
994 B
Plaintext
40 lines
994 B
Plaintext
# Generated by Cargo
|
|
# will have compiled files and executables
|
|
debug
|
|
target
|
|
|
|
# These are backup files generated by rustfmt
|
|
**/*.rs.bk
|
|
|
|
# MSVC Windows builds of rustc generate these, which store debugging information
|
|
*.pdb
|
|
|
|
# Generated by cargo mutants
|
|
# Contains mutation testing data
|
|
**/mutants.out*/
|
|
|
|
# RustRover
|
|
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
#.idea/
|
|
|
|
*/.DS_Store
|
|
|
|
# Compiled binary
|
|
**/ffi_nim_example
|
|
/nim-bindings/examples/pingpong
|
|
/nim-bindings/libchat
|
|
|
|
# Temporary data folder
|
|
tmp
|
|
|
|
.DS_Store
|
|
|
|
# Generated C headers (produced by `make` in examples/c-ffi; do not commit)
|
|
crates/client-ffi/client_ffi.h
|
|
|
|
# Compiled C FFI example binary
|
|
examples/c-ffi/c-client
|