hokusai-native-builder 0.1.0
hokusai-native-builder
Builder for the Hokusai Native project.
Currently very BETA, and proof of concept.
The program downloads dependencies ands produces package.tar.gz
in the build folder.
The dependencies are:
- GraalVM
- Gradle
- TruffleRuby
- Hokusai Native
- Raylib
The resulting package contains:
- TruffleRuby and GraalVM libs
- libhokusai-native
- A raylib backend (hokusai-backend)
- a test ruby app to run
This program depends on crystal for building.
Installation
- Download repo
shards build
Usage
bin/hokusai-native-builder setup
bin/hokusai-native-builder gem -- "install hokusai-zero"
bin/hokusai-native-builder native-image
To run an app
The environment variable HOKUSAI_RUBY_HOME
needs to be set to the truffle ruby installation included in the build
HOKUSAI_RUBY_HOME=./truffle ./hokusai-backend <some-app.rb>
Gotchas
What about windows?
While a standard Hokusai installation is cross-platform, Hokuasi Native can only support platforms that GraalVM and TruffleRuby support.
https://github.com/oracle/truffleruby?tab=readme-ov-file#system-compatibility
What about android?
Android has provisions that make it unfeasible to use the native image in an application, and Oracle (GraalVM) removed the provisions that made this sort of thing possible. In particular Android stopped allowing text relocations in native libraries, and Oracle stopped supporting not adding these relocations.
https://github.com/oracle/graal/issues/9037
Missing Hokusai callbacks?
Hokusai defines callbacks for performing commands and expects those callbacks to be provided by a backend at runtime. The Hokusai Native project currently supports a subset of these render callbacks, and more work is needed to support them all.
So commands like text/rect/circle/etc work, but shader and transform commands will not work.
Contributing
- Fork it (https://github.com/skinnyjames/hokusai-native-builder/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Zero Stars - creator and maintainer
hokusai-native-builder
- 2
- 0
- 0
- 0
- 2
- 3 days ago
- June 27, 2025
MIT License
Fri, 22 Aug 2025 14:43:55 GMT