Let's Explore GUI Options for Nim

Nim is still a fringe programming language, so unfortunately the tl;dr is that there are no booming, mature options for creating a native GUI with Nim. There are a handful of efforts being made toward this end, with various degrees of success and ongoing effort. I've chosen to run with NiGui for now, for simple interfaces, as it does not yet have the support for more complex elements or layouts but is simple to use for very basic GUIs.

I don't pretend to be an expert in GUI development, or in Nim, so in this post I'm mostly attempting to outline objective facts about each option to give an at-a-glance perspective of the state of GUI development with Nim.

NiGui

Repo: GitHub

Platforms: Windows, macOS, Linux

Native: yes

License: MIT

Last Commit: 3/27/19

Commits in Last Year: 47

Notes: Minimal (but functional) number of GUI elements. Responsive developer.

wxnim

Repo: GitHub

Platforms: Windows, macOS, Linux

Native: no

GUI Toolkit: wxWidgets

License: MIT (wxWidgets uses an L-GPL like license)

Last Commit: 8/2/15

Commits in Last Year: 0

Notes: 

wNim

Repo: GitHub

Platforms: Windows

Native: yes

License: MIT

Last Commit: 3/19/19

Commits in Last Year: 75

Notes: 

NimQML

Repo: GitHub

Platforms: Windows, macOS, Linux, Android, iOS

Native: no

GUI ToolkitQt QML

License: LGPL

Last Commit: 11/27/2018

Commits in Last Year: 3

Notes: Decent beginner documentation and examples

nuklear-nim

Repo: GitHub

Platforms: Windows, macOS, Linux, Android, iOS

Native: no

GUI Toolkit: nuklear

License: none listed on bindings; nuklear is MIT

Last Commit: 9/26/2017

Commits in Last Year: 0

Notes: 

ui

Repo: GitHub

Platforms: Windows, macOS, Linux

Native: no (libui is not really clear whether it's native or uses custom controls)

GUI Toolkitlibui

License: MIT

Last Commit: 8/25/2018

Commits in Last Year: 7

Notes: Built by the Nim team.

nimx

Repo: GitHub

Platforms: Windows, macOS, Linux, Android, iOS, Javascript

Native: no

License: MIT

Last Commit: 3/6/19

Commits in Last Year: 47

Notes: 

iup

Repo: GitHub

Platforms: Windows, Linux

Native: no

GUI Toolkit: IUP

License: MIT

Last Commit: 10/11/2018

Commits in Last Year: 1

Notes: Built by the Nim team.



All "Commits in Last Year" are updated as of 4/1/2019.

The data was pulled from the GitHub GraphQL API. You can see the same using their explorer and the following query.


{
  nigui: repository(owner: "trustable-code", name: "nigui") {
    ...RepoFragment
  }
  wxnim: repository(owner: "araq", name: "wxnim") {
    ...RepoFragment
  }
  wnim: repository(owner: "khchen", name: "wnim") {
    ...RepoFragment
  }
  nimqml: repository(owner: "filcuc", name: "nimqml") {
    ...RepoFragment
  }
  nuklear: repository(owner: "zacharycarter", name: "nuklear-nim") {
    ...RepoFragment
  }
  ui: repository(owner: "nim-lang", name: "ui") {
    ...RepoFragment
  }
  nimx: repository(owner: "yglukhov", name: "nimx") {
    ...RepoFragment
  }
  iup: repository(owner: "nim-lang", name: "iup") {
    ...RepoFragment
  }
}

fragment RepoFragment on Repository {
  name
  defaultBranchRef {
    name
    target {
      ... on Commit {
        id
        yearCommits: history(since:"2018-04-01T01:01:00") {
          totalCount
        }
        lastCommit: history(first:1){
          pageInfo {
            hasNextPage
            endCursor
          }
          edges {
            node {
                authoredDate
            }
          }
        }
      }
    }
  }
}


If you would like me to include any additional libraries here, or to update information on existing libraries, please email mwhager87 [at] gmail.

Originally published on

Last updated on