Skip to content

Native CLI Builds

Now that we have CLI hosting on the site, and the update command, it might be worth supporting an update --native, which could download a specific native build from the server. To do this, the Java CLI can read the system properties such as arch and OS (which it already does for the default compile flags), and use those to form the "triple target" for the executable. If the server does not support the system, we must handle the 404 appropriately.

For this to work, we'll need to cross-build the CLI for Scala Native and Scala JVM. This will necessitate abstracting the STTP backend to be one of the Java HTTP backend or the Curl backend for native. Then, the relevant triple targets will need to be specified in the .sbt file: https://clang.llvm.org/docs/CrossCompilation.html#general-cross-compilation-options-in-clang describes the valid targets, and the docs for SBT is here https://scala-native.org/en/stable/user/sbt.html#cross-compilation-using-target-triple

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information