Builds can fail for a number of reasons:
- If you are trying to dynamically load bytecode (this doesn’t work yet).
- If you use a feature not supported by our version of Native Image.
- If you’re on Windows/macOS and you don’t allocate enough RAM to Docker.
We use the GraalVM native image technology. The build is memory intensive, so please allocate at least 6GB of RAM to Docker and possibly more. However you don’t need to do builds all the time when working on an enclave. You always have the option of using mock mode to directly load the enclave code into the host JVM, which gives a regular Java development experience.
Conclave provides a number of different modes when building your enclave, supporting different stages of the development cycle. Release, debug and simulation modes all require a Linux environment in order to run. This does not prevent running a simulation enclave on MacOS or Windows if you load and run your project in a Docker container, but for convenience it is useful to be able to run your enclave code directly within the host environment. In addition, the build time for simulation, debug and release enclaves can be quite high.
With mock mode, the enclave class runs in the same JVM as the host, so interactions between the enclave and host are all just regular function calls. You can expect very short build times, step through using a debugger and enjoy the regular Java development experience. See here for more information in using mock mode.