v0.33: Zig toolchain support
There is now support for using Zig to build RISC-V programs that are then used by Godot Sandbox. Zig is a programming language that has a stand-alone program with no dependencies for all platforms. It can build full Linux RISC-V programs using the zig cc
and zig c++
commands. The underlying toolchain is LLVM-based and the C++ standard library is libc++. There are now CMake examples using the Zig toolchain and the unittests are also built and run using Zig.
The big picture idea here is that people will be able to compile Godot Sandbox programs no matter which platform they are on, without having to download anything other than Zig. This is effectively a Docker alternative, but with some additional benefits. CMake and git is still required for CMake projects.
Programs built with the Zig toolchain are much smaller than when built with the standard RISC-V GNU toolchain. Have a look for yourself: https://github.com/libriscv/godot-sandbox-programs/releases . The v0.5 binaries built using Zig are nearly half the size from v0.4. Most notably, the reduced binary sizes have reduced binary translation compilation times heavily.
Documentation on how to use this on Windows and macOS will be coming. We've tested macOS and Windows!
Otherwise, mostly bugfixes:
- Fixed a bug with binary translations and multiple instances of the same program with different memory sizes
- Fix precise simulation not throwing exception after a timeout
- Added a new program property on Sandbox, exposing the current program in the editor
- Made heap allocations default 16-byte aligned, in order to match expectations by run-times
- Add initial native memalign() (+friends) support in the guests
- Add a pre-generated version of the run-time generated API to CMake builds (default enabled)
- Fetch the Godot Sandbox C++ API automatically in CMake builds, making it easier to use
Full Changelog: v0.32...v0.33