Expand description
libCwtch-rs
Rust bindings for libCwtch
Example echobot in examples/echobot.rs (cargo run --example echobot – assumes tor is on $PATH)
Building
Updating libCwtch and bingings.rs with Bindgen
cargo install bindgenlibCwtch.so version is specified in build.rs. If updating, also download the corresponding libCwtch.h and delete the ‘preamble from import “C”’ section as it imports headers required for the C lib to compile but that we don’t want to create rust bindings for (like importing stdlib.h). Then:
bindgen libCwtch.h -o src/cwtchlib_go/bindings.rsWhile developing you can use the LCG_DIR environment variable to specify the directory containing a local libCwtch.so
library to override the default one.
This is useful in cases where you are adding or updating APIs prior to a release.
Todo
Modules
Additional structs for advnaced event handling and converstion helpers
Basic structs using data from Cwtch and for deserializing JSON and serializing to JSON to communicate with Cwtch
Traits
Interface to a Cwtch app with API matching libcwtch
Functions
Create a new CwtchLib that is backed by bindings to libcwtch-go
Type Definitions
Error type for Cwtch lib related errors, intended for use with Result
