C-bindings for the Go Cwtch Library https://cwtch.im
This repository has been archived on 2023-06-16. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
Sarah Jamie Lewis 055e1d65a1
continuous-integration/drone/push Build is pending Details
Merge pull request 'Update 'README.md'' (#117) from sarah-patch-3 into trunk
Reviewed-on: #117
Reviewed-by: Dan Ballard <dan@openprivacy.ca>
2023-06-16 21:07:15 +00:00
constants add (De)ActivateEngine API calls; support profile autostart 2022-12-04 19:49:02 -08:00
features add build date and version info; add server sync state data 2022-03-03 16:34:39 -08:00
utils Ensure Block Unknown Connections Settings is Respected on Protocol Engine Restart 2023-02-08 13:51:09 -08:00
.drone.yml Update Android Container 2023-01-31 18:34:11 -08:00
.gitignore macos uses .dylib 2021-08-28 18:25:50 -04:00
BUILDING_DEBUG.md Fresh Repository Commit - Cwtch Beta 2021-06-24 15:30:46 -07:00
LICENSE mit license 2021-06-25 15:13:06 -07:00
MEMORY.md Clarify Memory Ownership Model of libCwtch and Callers 2021-08-24 22:04:38 -07:00
Makefile Add trimpath, essential for Android repeatability 2023-01-12 13:17:45 -08:00
README.md Update 'README.md' 2023-06-16 21:07:09 +00:00
clangwrap.sh Build ios 2021-08-05 22:49:17 -07:00
go.mod Fix File Downloading on Android 2022-12-12 14:51:41 -08:00
go.sum Fix File Downloading on Android 2022-12-12 14:51:41 -08:00
lib.go Fix File Downloading on Android 2022-12-12 14:51:41 -08:00
quality.sh Fix logging of ACN 2022-01-12 14:11:35 -08:00
switch-ffi.sh switch swtich-*.sh back to sed now with -i.bak and rm lib.go.bak for compatibility with macos 2021-08-09 19:46:37 -04:00
switch-gomobile.sh switch swtich-*.sh back to sed now with -i.bak and rm lib.go.bak for compatibility with macos 2021-08-09 19:46:37 -04:00

README.md

NOTE: libcwtch-go has been deprecated in favour of autobindings. This repository has been archived and is no longer maintained.

libcwtch-go

C-bindings for the Go Cwtch Library.

Build Instructions

make linux
make android
make windows
make macos

Android Build Notes

Our build infrastructure is using Go 1.15.10, NDK 21.0.6113669, and gomobile commit bdb1ca9a1e083af5929a8214e8a056d638ebbf2d (2021 07 16)

Go 1.17.4, NDK 22.1.7171670, and gomobile 4e6c2922fdeed32d3596616518aaee7b0d79ce55 (2021 12 07) appear to compile as well.

Other version combinations untested and some definitely do not work.

Windows

Cwtch relies on sqlite which in turn requires the use of CGO. As per this issue that means TDM-GCC is required to be installed and used to compile on Windows. Install it and add it to your path and make windows should then work.

Experimental iOS support

make ios

Using

General Environment Variables

  • LOG_FILE if defined will mean all go logging will go to a file instead of stdout
  • LOG_LEVEL if set to debug will cause debug logging to be included in log output
  • CWTCH_PROFILE if set to 1 will cause a memory profile to be written to mem.prof and all active goroutines written to stdout when DebugInfo() is called.

Linux Desktop:

  • LD_LIBRARY_PATH set to point to libCwtch.so
  • or drop a symlink into /usr/lib

Android

  • copy cwtch.aar into flutter_app/android/cwtch

Windows

  • copy libCwtch.dll into the directory of the .exe using it

MacOS

  • copy libCwtch.x64.dylib and libCwtch.arm.dylib into the directory you are executing from