Hello World

Hello World

The simplest possible fynerisor application. Demonstrates loading a Risor script from a file and creating a basic label widget.

Hello World Screenshot

Features

  • Loads hello.risor from disk
  • Creates a label widget with “Hello World” text
  • Displays the label in the window

Code

// Simple hello world example
// Creates a label widget and sets it as the window content

require("v0.2")

let label = widget.NewLabel("Hello World")
window.SetContent(container.NewHBox(label))

Running

cd examples/01-hello-world
go run main.go

Or with the fynerisor CLI:

fynerisor script.risor

Full Source

View full example on GitHub ↗