You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# File: main.nimimport nimx/window
import nimx/text_field
proc startApp() =# First create a window. Window is the root of view hierarchy.var wnd = newWindow(newRect(40, 40, 800, 600))
# Create a static text field and add it to view hierarchylet label = newLabel(newRect(20, 20, 150, 20))
label.text ="Hello, world!"
wnd.addSubview(label)
# Run the app
runApplication:
startApp()
Running
nim c -r --threads:on main.nim
Supported target platforms
Nimx officially supports Linux, MacOS, Windows, Android, iOS and WebAssembly (with Nim C backend and Emscripten, and Emscripten-less compilation is experimental).
Troubleshooting
Nimx is tested only against the latest devel version of Nim compiler. Before reporting any issues please verify that your Nim is as fresh as possible.
Running nimx samples
git clone https://github.com/yglukhov/nimx
cd nimx
nimble install -dy
nake # Build and run on the current platform# or
nake js # Build and run in default web browser