Ruby binding for Free Pascal and Lazarus
Author: Ivan Shikhalev.
License: GNU GPL v3+.
Homepage: this, welcome to Wiki and Issue tracker.
Version: 1.0 public beta.
Documentation: only in Russian, sorry...
This is a lazarus-package for use Ruby in Pascal projects. It is solving two task:
- Add a Ruby scripting engine in your project;
- or write extension libraries for Ruby using Free Pascal.
See also the Ruby documentation.
This package contains the next parts:
- API bindings in
ruby.pas
. This file may be compiled in two different modes (by setting conditional defines): static and dynamic. IfRUBY_STATIC
defined, your program will linked with selected version oflibruby
. It is the only right way for creation ruby extension and efficient but not flexible way for add Ruby in pascal programs. In dynamic way you select library version at run-time. - Units
RbTools
andRbObjects
provided some utilities for comfortable conversions between Ruby and Pascal data types. Pascal objects convert to Ruby objects with autodefinitions of published properties. And other properties and methods may defined by hands. - Other units provide definitions some public members of common classes. This part of package will be extend from version to version.
Also this repo contains the demo project for demonstrate the basic features.
The subdir demo/rb
contains some ruby-scripts usable for it.
The package was testing in FPC 2.7.1 and Lazarus 1.3 with Ruby 1.9.3 and 2.0. Ruby 1.8 is unsupported.
It's not fully tested but must work in Windows, Linux and Mac OS X under 32- and 64-bit architecture.
-
Define methods for most standard classes:
- unit
Forms
; - unit
Controls
; - unit
Graphics
; - unit
Dialogs
; - And other...
- unit
-
Writing documentation.
-
Ruby 2.1 compatibility.
-
IDE integration.
-
Ruby SynHighlighter(?)