Slight reorganization of docs
This commit is contained in:
37
BUILDING.md
Normal file
37
BUILDING.md
Normal file
@@ -0,0 +1,37 @@
|
||||
## Build Instructions for various platforms
|
||||
|
||||
### Linux
|
||||
|
||||
- `make static_lib`
|
||||
- `make tests`
|
||||
|
||||
### macOS
|
||||
|
||||
- `make static_lib`
|
||||
- `make macos_framework`
|
||||
- `make tests`
|
||||
|
||||
### iOS
|
||||
|
||||
- `make ios_framework`
|
||||
|
||||
### FreeBSD
|
||||
|
||||
- `make static_lib`
|
||||
- `make tests`
|
||||
|
||||
### Windows
|
||||
|
||||
- [Prebuilt Binaries\Libraries Here]()
|
||||
|
||||
Otherwise,
|
||||
|
||||
- Set up [mingw-w64](https://mingw-w64.org/doku.php)
|
||||
- Install a copy of [MSYS](http://www.mingw.org/wiki/MSYS)
|
||||
- Run `msys.bat` (should be in the base directory of your MSYS installation)
|
||||
- Tell it where your `mingw-64` installation is
|
||||
- `make static_lib`
|
||||
- `make tests`
|
||||
|
||||
This will output binaries to `build/mingw-w64`
|
||||
|
||||
39
README.md
39
README.md
@@ -19,44 +19,31 @@ Pre-Built Binaries Here: [zerotier.com/download.shtml](https://zerotier.com/down
|
||||
```
|
||||
#include "libzt.h"
|
||||
|
||||
char *str = "welcome to the machine";
|
||||
char *nwid = "c7cd7c9e1b0f52a2";
|
||||
char *str = "welcome to the machine";
|
||||
char *nwid = "c7cd7c9e1b0f52a2"; // network to join
|
||||
char *pasth = "zt1" // path where this node's keys and configs will be stored
|
||||
|
||||
zts_simple_start("./zt", nwid);
|
||||
fd = zts_socket(AF_INET, SOCK_STREAM, 0);
|
||||
zts_simple_start(path, nwid);
|
||||
int fd = zts_socket(AF_INET, SOCK_STREAM, 0);
|
||||
zts_connect(fd, (const struct sockaddr *)addr, sizeof(addr));
|
||||
zts_write(fd, str, strlen(str));
|
||||
zts_close(fd);
|
||||
```
|
||||
|
||||
Bindings for [other languages and platforms](examples).
|
||||
Bindings for various [LANGUAGES](examples)
|
||||
|
||||
***
|
||||
|
||||
### Building
|
||||
### Building (linux, macos, bsd, win, ios)
|
||||
|
||||
All build targets will output to `build/`.
|
||||
Complete instructions here [PLATFORMS](BUILDING.md)
|
||||
All build targets will output to `build/`
|
||||
|
||||
### Static Library
|
||||
- `make static_lib`
|
||||
|
||||
### iOS App Framework
|
||||
- `make ios_app_framework`
|
||||
|
||||
### macOS App Framework
|
||||
- `make macos_app_framework`
|
||||
- Static Library (linux, mac, win, bsd): `make static_lib`
|
||||
- iOS App Framework: `make ios_app_framework`
|
||||
- macOS App Framework: `make macos_app_framework`
|
||||
|
||||
***
|
||||
|
||||
### Using Language Bindings
|
||||
- `SDK_LANG_JNI=1`: Enable JNI bindings for Java (produces a shared library)
|
||||
- `SDK_LANG_CSHARP=1`
|
||||
- `SDK_LANG_PYTHON=1`
|
||||
- `SDK_LANG_GO=1`
|
||||
|
||||
### Debugging flags
|
||||
- `SDK_DEBUG=1` - For debugging libzt
|
||||
- `ZT_DEBUG=1` - For debugging the ZeroTier core protocol
|
||||
|
||||
### Tests
|
||||
### Testing and Debugging
|
||||
- See [TESTING.md](TESTING.md)
|
||||
@@ -1,5 +1,9 @@
|
||||
## Testing via [selftest.cpp](test/selftest.cpp)
|
||||
|
||||
### Enabling debug output
|
||||
- `SDK_DEBUG=1` - For debugging libzt
|
||||
- `ZT_DEBUG=1` - For debugging the ZeroTier core protocol
|
||||
|
||||
After building the static library, you can run:
|
||||
|
||||
- `make tests`
|
||||
|
||||
@@ -1 +1,7 @@
|
||||
Language bindings
|
||||
Language bindings
|
||||
|
||||
### Using Language Bindings
|
||||
- `SDK_LANG_JNI=1`: Enable JNI bindings for Java (produces a shared library)
|
||||
- `SDK_LANG_CSHARP=1`
|
||||
- `SDK_LANG_PYTHON=1`
|
||||
- `SDK_LANG_GO=1`
|
||||
Reference in New Issue
Block a user