Show HN: Run GUIs as Scripts

Hokusai Pocket is an open-source project for creating portable apps and games using Ruby scripts, leveraging mruby and raylib for cross-platform deployment.
A project for making portable apps and games using hokusai
Work in progress, expect changes. ideas and contributions are welcome.
Hokusai pocket uses barista for bootstrapping itself.
Note: It is not recommended to build this project with mrbgems.
git clone https://github.com/skinnyjames/hokusai-pocket.git && cd hokusai-pocket
barista cli
- this command will compile mruby/tree-sitter/raylib and produce a
hokusai-pocketbinary inbin/
To run apps using the binary:
hokusai-pocket run:target=<somefile.rb>
To package your app as a binary for the host system:
hokusai-pocket build:target=<somefile.rb>
To cross-compile your app for different platforms (wip, requires docker):
hokusai-pocket publish:target=<somefile.rb>
- optional arguments include: assets_path, platforms (osx, linux, windows), extras, gem_config.
An example app (counter.rb) demonstrates the usage of Hokusai::Block with styles and templates, handling events like clicks to increment or decrement a counter, and configuring the backend with FPS and window dimensions.
The project structure includes /bin, /grammar, /ruby, /mrblib, /src, and a Brewfile. It supports a basic implementation of require_relative to generate a single Ruby file for compilation via mrbc.
Related projects: Taylor, Ruby 2D, DragonRuby.
Source: Hacker News


















