diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 844fed72..bfa00e90 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -6,28 +6,44 @@ on:
pull_request:
branches: [ master ]
-
jobs:
build:
runs-on: ubuntu-latest
+ env:
+ PKG_CONFIG_PATH: /home/runner/lib/pkgconfig
steps:
- uses: actions/checkout@v2
-
- name: Install Cap'n Proto
run: |
export DEBIAN_FRONTEND=noninteractive
- sudo apt-get install -y capnproto libcapnp-dev
-
- - name: Set up JDK 1.8
+ env
+ sudo apt-get install -y gcc-7 g++-7
+ curl -O https://capnproto.org/capnproto-c++-0.8.0.tar.gz
+ tar zxf capnproto-c++-0.8.0.tar.gz
+ cd capnproto-c++-0.8.0
+ ./configure --prefix=$HOME CC=gcc-7 CXX=g++-7
+ make -j
+ make install
+ cd ..
+
+ - name: Set up JDK 14
uses: actions/setup-java@v1
with:
- java-version: 1.8
+ java-version: 14
- name: Build with Maven
+ env:
+ LD_LIBRARY_PATH: /home/runner/lib
run: |
- make
- mvn compile
+ env
+ make CC=gcc-7 CXX=g++-7
+ env PATH="${PATH}:/home/runner/bin" mvn -e -X compile
- name: Run tests
- run: mvn test
+ env:
+ LD_LIBRARY_PATH: /home/runner/lib
+ run: |
+ env PATH="${PATH}:/home/runner/bin"
+ env PATH="${PATH}:/home/runner/bin" mvn -e -X test
+
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 00000000..b0988158
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,18 @@
+image: capnproto-gitlab-builder
+
+stages:
+ - build
+ - quality
+
+build:
+ stage: build
+ script:
+ - mvn -e -X clean compile
+
+test:
+ stage: quality
+ dependencies:
+ - build
+ script:
+ - mvn -e -X test
+
diff --git a/.run/Calculator.run.xml b/.run/Calculator.run.xml
new file mode 100644
index 00000000..17b1ab4b
--- /dev/null
+++ b/.run/Calculator.run.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.run/CalculatorClient.run.xml b/.run/CalculatorClient.run.xml
new file mode 100644
index 00000000..87af5d16
--- /dev/null
+++ b/.run/CalculatorClient.run.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.run/CalculatorServer.run.xml b/.run/CalculatorServer.run.xml
new file mode 100644
index 00000000..d90a6d44
--- /dev/null
+++ b/.run/CalculatorServer.run.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/README.md b/README.md
index 88f19402..2123a2f3 100644
--- a/README.md
+++ b/README.md
@@ -6,3 +6,15 @@
and capabilities, and capnproto-java is a pure Java implementation.
[Read more here.](https://dwrensha.github.io/capnproto-java/index.html)
+
+This repository clone adds an implementation of the RPC framework for Java.
+
+Promise pipelining is provided via java.util.concurrent.CompletableFuture. Unlike the KJ asynchronous model, which completes promises
+only when they are waited upon, a CompletableFuture can complete immediately. This may break E-ordering, as the C++ implementation
+relies on kj::evalLater() to defer method calls and this implementation may have subtle differences.
+
+Most of the C++ RPC test cases have been ported to this implementation, which gives me some comfort that the implementation logic is
+correct, but more extensive testing is required.
+
+This implementation does not support generic interfaces. Extending the schema compiler to output code for generic interfaces is an
+exercise I leave to the reader.
diff --git a/benchmark/pom.xml b/benchmark/pom.xml
index 9186ee28..03578d58 100644
--- a/benchmark/pom.xml
+++ b/benchmark/pom.xml
@@ -31,9 +31,9 @@
UTF-8
- 1.8
- 1.8
- 8
+ 14
+ 14
+ 14
@@ -45,6 +45,16 @@
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.3
+
+ -Xlint:unchecked
+ 11
+ 11
+
+
maven-antrun-plugin
3.0.0
diff --git a/compiler/pom.xml b/compiler/pom.xml
index b5609283..f6cb60c9 100644
--- a/compiler/pom.xml
+++ b/compiler/pom.xml
@@ -41,7 +41,6 @@
5.11.4
test
-
org.capnproto
runtime
@@ -56,6 +55,8 @@
maven-compiler-plugin
3.3
+ 11
+ 11
-Xlint:unchecked
@@ -79,21 +80,21 @@
run
-
generate-test-sources
generate-test-sources
-
+
-
+
+
diff --git a/compiler/src/main/cpp/capnpc-java.c++ b/compiler/src/main/cpp/capnpc-java.c++
index 16c21280..439ee1c2 100644
--- a/compiler/src/main/cpp/capnpc-java.c++
+++ b/compiler/src/main/cpp/capnpc-java.c++
@@ -34,6 +34,7 @@
#include
#include
#include
+#include