Hanami
Hanami is supported as a plain Rack app. It shares the same packaged boot path as Sinatra, with a couple of Hanami-specific steps.
Detected by
An app is treated as Hanami when it has a config/app.rb and its Gemfile
depends on hanami.
Requirements
- Hanami 2+ on Ruby 3.2+.
- The standard toolchain: Rust, a C/C++ compiler, and rbe-tebako.
- For local mode, SQLite. Hanami apps usually use ROM, and a local-mode build has no database server.
How it boots
Hanami boots through RubyEverywhere's shared Rack path: the packaged app loads
your Rack app, prepares the database, and serves it on 127.0.0.1 with Puma.
Packaged runs set HANAMI_ENV=production (and RACK_ENV=production).
Migrations run before Hanami boots. ROM infers its schema at load time, so the database must be migrated before
hanami/bootruns. RubyEverywhere's boot order handles this. Keep it in mind if you customize boot.
Development
every dev # runs `hanami dev` inside the desktop shell
Assets are compiled with hanami assets compile as part of packaging.
Notes
- No inline scripts. The native shell's content-security policy forbids inline
<script>. Load the bridge and your JS as external modules (served viaRack::Static), not inline tags. - See the
example-hanami/app in the repo for a working reference.