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.
libcwtch-go/README.md

56 lines
1.7 KiB
Markdown
Raw Permalink Normal View History

2023-06-16 21:07:09 +00:00
# NOTE: libcwtch-go has been deprecated in favour of [autobindings](https://git.openprivacy.ca/cwtch.im/autobindings). This repository has been archived and is no longer maintained.
2023-06-16 21:05:32 +00:00
2021-06-24 23:06:24 +00:00
# libcwtch-go
C-bindings for the Go Cwtch Library.
2021-08-06 21:38:26 +00:00
# Build Instructions
2021-06-24 22:30:46 +00:00
make linux
make android
2021-08-06 21:38:26 +00:00
make windows
2022-06-22 18:51:04 +00:00
make macos
2021-08-06 21:38:26 +00:00
## 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.
2022-06-22 18:51:04 +00:00
## Windows
Cwtch relies on sqlite which in turn requires the use of CGO. As per [this issue](https://github.com/golang/go/issues/12029)
that means [TDM-GCC](https://jmeubank.github.io/tdm-gcc/download/) 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.
2021-08-06 21:38:26 +00:00
## Experimental iOS support
make ios
2021-06-24 22:30:46 +00:00
# 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
2022-04-21 23:10:27 +00:00
- `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.
2021-06-24 22:30:46 +00:00
## 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`
2021-08-06 21:38:26 +00:00
## Windows
- copy libCwtch.dll into the directory of the `.exe` using it
## MacOS
2022-06-22 18:51:04 +00:00
- copy libCwtch.x64.dylib and libCwtch.arm.dylib into the directory you are executing from