pniGenerate
: generate filespniCompile
: compile the c shim lib. On Windows, this is task does nothing, and you will have to
run make build-native
manually insteadbuildSampleNativeImage
: build native imageYou may add two scripts at the root of this project, for running the sample server and client.
my-server.sh
mode=""
task="runSampleServer"
GRAAL=`cat is-graal-build`
if [[ "$GRAAL" == "true" ]]
then
mode="server"
task="runSampleNativeImage"
fi
args="$mode cert=${PATH_TO_YOUR_TLS_CERT} key=${PATH_TO_YOUR_TLS_KEY}"
if [[ "$GRAAL" == "true" ]]
then
./gradlew $task --console=plain -DARGS="$args"
else
./gradlew $task --console=plain --args="$args"
fi
my-client.sh
mode=""
task="runSampleClient"
GRAAL=`cat is-graal-build`
if [[ "$GRAAL" == "true" ]]
then
mode="client"
task="runSampleNativeImage"
fi
args="$mode host=127.0.0.1 port=443"
SSLKEYLOGFILE="${PATH_TO_STORE_SSL_KEY_LOG_FILE}"
if [[ "$GRAAL" == "true" ]]
then
SSLKEYLOGFILE="$SSLKEYLOGFILE" ./gradlew $task --console=plain -DARGS="$args"
else
SSLKEYLOGFILE="$SSLKEYLOGFILE" ./gradlew $task --console=plain --args="$args"
fi
To compile the graal native-image version code, change content of file ./is-graal-build
to true
.
If you are using Windows, you will need MinGW UCRT64
to build and run, and you will have to call
make build-native
manually before running.