Rust bindings for libcwtch-go
Go to file
Dan Ballard 52b799ef7c improvements for use with imp; migrate echobot to 2022-07-21 01:04:21 -07:00
examples improvements for use with imp; migrate echobot to 2022-07-21 01:04:21 -07:00
src improvements for use with imp; migrate echobot to 2022-07-21 01:04:21 -07:00
.gitignore bump yanked version of block-buffer 2022-04-26 12:19:59 -07:00
Cargo.lock improvements for use with imp; migrate echobot to 2022-07-21 01:04:21 -07:00
Cargo.toml improvements for use with imp; migrate echobot to 2022-07-21 01:04:21 -07:00
LICENSE add MIT LICENSE 2021-09-03 20:39:03 -07:00
README.md Allow building from local 2022-04-27 13:05:41 -07:00
build.rs Allow building from local 2022-04-27 13:05:41 -07:00
libCwtch.h lcg 1.7.1 2022-04-21 17:07:51 -07:00

README.md

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 bindgen

libCwtch.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.rs

While 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