Latest release
» Shirei v0.6.7 — OS dark mode & window controls, color emoji, widgets
Getting Started
Import package name: go.hasen.dev/shirei
Github repo: https://github.com/hasenj/go-shirei
Copy the code sample above to a new file in an empty directory, then run the
following to download the dependencies:
❯ go mod init main
❯ go mod tidy
❯ go run .
You can browse the demo directories on the github repo for more examples.
Read the Tutorial →
Why use Shirei:
-
Produce small native binaries, ≈10MB is typical for binary size.
-
Performance and resource usage is a first class design consideration.
-
Easy to learn API & fast iteration cycle for both humans and AI.
-
Simpler UI code, focus on program data, not widget objects.
-
Flexbox layout model means you have full freedom in arranging styled container trees to
build custom UIs and components.
-
Batteries included: default widgets, robust text editing, virtual lists, tables, modals.
-
International text support: unlike what you might expect from imgui libraries from C/C++,
Shirei supports complex text shaping and bidirectional layout, input method editor (IME) for
East Asian languages, and ability to use all system fonts.
-
Snapshot testing: render the normal application frame to an image without opening a native
window or requiring a GPU.
For the full picture — the application model, layout mechanics, colors and text
styling, interaction, application patterns, and a reference section of common
mistakes — see the full tutorial.
Example Programs
The following example programs ship with Shirei and are useful programs in
their own right.