This package provides the Java interface for the Cedar language. You can use these to call Cedar from your Java applications. See java-hello-world for an example of calling Cedar from a Java application.
For more information about Cedar, please see: https://www.cedarpolicy.com/
- JDK 17 or later
- Rust with
rustup
- Zig for cross compiling with cargo-zigbuild We currently depend on Zig 0.11.
Run the Gradle Wrapper
with the build
task to compile both the Cedar Java Foreign Function Interface and the Cedar Java library.
./gradlew build
Our build is quite long (due to the cross compiling), so to just check syntax:
./gradlew check -x test
Debugging calls across the JNI boundary is a bit tricky (as ever a bit more so on a Mac), but can be done by attaching both a Java and native debugger (such as GDB/LLDB) to the program.
You can see a list of features not yet supported in CedarJava at Differences from Rust.
See CONTRIBUTING for more information.
This project is licensed under the Apache-2.0 License.