Rand Stats



Perl 6 IUP IUP Logo

Perl 6 interface to the IUP toolkit for building GUI's.

Operating SystemBuild Status
LinuxBuild Status


IUP is a multi-platform toolkit for building graphical user interfaces. IUP's purpose is to allow a program source code to be compiled in different systems without any modification. Its main advantages are:


Get the IUP library and install it:

mkdir libiup
cd libiup
curl -L https://sourceforge.net/projects/iup/files/3.25/Linux%20Libraries/iup-3.25_Linux44_64_lib.tar.gz > libiup.tar.gz
tar xvzf libiup.tar.gz
sudo bash install
sudo bash install_dev
cd ..

Install the Perl 6 module with Zef:

zef update
zef install IUP


This module is in its early stages and should be considered a Work in Progress. The interface is not final and may change in the future.

Sample GUI:

Hello World IUP Application

Sample code:

use IUP;

my @argv = ("Test");

# initialize iup

my $iup = IUP.new();


# create widgets and set their attributes

my $btn = $iup.button("&Ok", "");

$btn.set_callback("ACTION", &exit_callback);

$btn.set_attribute("IMAGE", "IUP_ActionOk");
$btn.set_attribute("EXPAND", "YES");
$btn.set_attribute("TIP", "Exit button");

my $lbl = $iup.label("Hello, world!");

my $vb = $iup.vbox($lbl, $btn);
$vb.set_attribute("MARGIN", "10x10");
$vb.set_attribute("GAP", "10");
$vb.set_attribute("ALIGNMENT", "ACENTER");

my $dlg = $iup.dialog($vb);
$dlg.set_attribute("TITLE", "Hello");

# Map widgets and show dialog


# Wait for user interaction


# Clean up



sub exit_callback() returns Int {
	return IUP_CLOSE;


Henrique Dias mrhdias@gmail.com

See Also


This library is free software; you can redistribute it and/or modify it under the same terms as Perl 6 itself.