Skip to content
Martin Corino edited this page Jun 3, 2024 · 17 revisions

About

logo

What is wxRuby3?

wxRuby3 is a (mostly) native extension library for Ruby based on the mature wxWidgets GUI toolkit for C++ providing a framework to create cross-platform GUI applications with Ruby. It uses native widgets wherever possible to achieve GUI applications with the correct look, feel and behaviour on Windows, OSX and Linux.
wxRuby3 aims to provide a comprehensive solution to developing professional-standard desktop applications in Ruby.

What platforms are supported?

Currently the following platforms are supported.

Platform Ruby version(s) wxWidgets version(s)
Windows >= 10 Ruby >= 2.5
(RubyInstaller MSYS2-DevKit)
wxWidgets >= 3.2
Linux (tested; all major AMD64 and ARM64 distributions: Ubuntu, Debian, Fedora, OpenSuSE and ArchLinux)
(most likely also i686)
Ruby >= 2.5 wxWidgets >= 3.2
MacOS >= 10.10 using Cocoa (tested on AMD64 and ARM64 M1/M2 Chip) Ruby >= 2.5 (MacPorts, Homebrew, ruby-install, RVM) wxWidgets >= 3.2

How is wxRuby3 licensed?

wxRuby3 is free and open-source. It is distributed under the liberal MIT licence which is compatible with both free and commercial development. See the LICENSE document for more details.

How to get wxRuby3

wxRuby3 is distributed as a Ruby gem on RubyGems and can be installed with the command:

gem install wxruby3

This gem can also be downloaded from the release assets on Github in which case installing the gem could be achieved with:

gem install /local/path/to/downloaded/gem

For more information concerning post-install procedures, prebuilt binaries and/or install options see the INSTALL document.

How to use wxRuby3

wxRuby3 is very easy to use. The following code snippet for example

require 'wx'

Wx::App.run do
  Wx::Frame.new(nil, title: 'Hello world!').show
end

would display the following rudimentary Ruby GUI applications on Windows, MacOSX and Linux (GTK):

For all details concerning the various ins and outs of the wxRuby3 framework be sure to carefully read the User Guide.

Details concerning all available classes and methods can be found in the Reference documentation.

Clone this wiki locally