Skip to content
enderger edited this page Jun 15, 2020 · 6 revisions

Welcome to the nimx wiki!

Nimx is a package for the Nim programming language that allows for the creation of fast, cross platform GUI applications. It can compile to native, WebAssembly/Asm.js, mobile, and more!

Installing

nimble install nimx

Usage

import nimx / [window, layout, button, text_field]

runApplication:
  let w = newWindow(newRect(50,50,500,150))
  w.makeLayout:
    - Label:
      center == super
      width == 175
      height == 30
      text: "Hello, world!"

Running

nim c -r --threads:on <filename>.nim

Supported target platforms

Nimx officially supports Linux, MacOS, Windows, Android, iOS, Javascript (with Nim JS backend) and Asm.js/WebAssembly (with Nim C backend and Emscripten).

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 the default web browser