summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStevenWdV <stevenwdv@gmail.com>2021-11-24 23:32:48 +0100
committerStevenWdV <stevenwdv@gmail.com>2021-11-24 23:32:48 +0100
commit638edbb2ffc69fd44d547f93b43bd741ab110096 (patch)
treeeab3a96f54e77ffc36bd730e43a751c03d44269c
parentbc940a145ca8150bc1e8fbb18d0a4685e9b09ce0 (diff)
Add READMEs
-rw-r--r--README.md49
-rw-r--r--wrappers/csharp/EduVpnCommonTests/EduVpnCommonTests.csproj2
-rw-r--r--wrappers/csharp/README.md24
3 files changed, 74 insertions, 1 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..b1712f3
--- /dev/null
+++ b/README.md
@@ -0,0 +1,49 @@
+# EduVPN shared library
+
+This repository contains a Go library with functions that all EduVPN clients can use. The goal is to let EduVPN clients
+link against this library and gradually merge more common logic between EduVPN clients into this repository.
+
+cgo is used to build the go library into a shared dynamic library. Wrappers will be written using some FFI framework for
+each language used in EduVPN clients to easily interface with the library.
+
+## Functionality
+
+Currently, only verification of signatures on files from `disco.eduvpn.org` is supported. For now, these files have to
+be downloaded by the caller.
+
+## Build & test
+
+Build shared library for current platform:
+
+```shell
+make
+```
+
+Build shared library for specified OS & architecture (example):
+
+```shell
+make OS=windows ARCH=386
+```
+
+Results will be output in `exports/`.
+
+Test Go code:
+
+```shell
+make test-go
+```
+
+Test wrappers:
+
+```shell
+make test-wrappers
+```
+
+Take a look at `wrappers/<lang>/` for descriptions per wrapper.
+
+## Directory
+
+- `verify.go`: main API
+- `verify_test.go` and `test_data/`: tests for API
+- `exports/`: C API interface
+- `wrappers/`: Wrappers per language, currently only C#
diff --git a/wrappers/csharp/EduVpnCommonTests/EduVpnCommonTests.csproj b/wrappers/csharp/EduVpnCommonTests/EduVpnCommonTests.csproj
index cf58249..9a44848 100644
--- a/wrappers/csharp/EduVpnCommonTests/EduVpnCommonTests.csproj
+++ b/wrappers/csharp/EduVpnCommonTests/EduVpnCommonTests.csproj
@@ -13,7 +13,7 @@
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="../EduVpnCommon.csproj" />
+ <ProjectReference Include="../EduVpnCommon.csproj" />
</ItemGroup>
</Project>
diff --git a/wrappers/csharp/README.md b/wrappers/csharp/README.md
new file mode 100644
index 0000000..a00922a
--- /dev/null
+++ b/wrappers/csharp/README.md
@@ -0,0 +1,24 @@
+First build the shared Go library. Next:
+
+Build `EduVpnCommon`:
+
+```shell
+make
+```
+
+Build as nupkg, including eduvpn_verify library:
+
+```shell
+make pack
+```
+
+Currently, directly referencing the project may not work if you have multiple dynamic libraries compiled in
+the `exports` folder. If you instead add the `.nupkg`, e.g. with one of the
+methods [here](https://stackoverflow.com/q/43400069) or [here](https://stackoverflow.com/q/10240029) it automatically
+copies the correct library.
+
+Test:
+
+```shell
+make test
+```