Skip to content
forked from SamuelRhody/m.js

C++, Javascript, python, ruby and R bindings to the Gt.M database

License

Notifications You must be signed in to change notification settings

fosm/gtm-bindings

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gtm-bindings

C++, Javascript, python 2, ruby and R bindings to the M database

The goal of this project is to make the M database GT.M available from Javascript and other languages. Before attempting to compile, install GT.M and set the GTM_DIST environment variable to the installation folder.

For any of these bindings, copy "Source/_gtmaccess.m" and "Source/gtm_access.ci" to your M scripts folder.

You need to set the GTMCI environment variable to the location of gtm_access.ci

In bash shell do: export GTMCI=/path/to/gtm_access.ci

C++

Probably easiest if you get Source/GTM.cpp and associated headers and add them to your project. gtm_dist is an environment variable pointing at your GT.M installation folder.

Add this argument when compiling: -I$gtm_dist

Add these arguments when linking: -L$gtm_dist -lgtmshr -rpath $gtm_dist

See http://tinco.pair.com/bhaskar/gtm/doc/books/pg/UNIX_manual/webhelp/content/ch11s05.html#building_stand_alone_programs for other compiler settings.

node.js

In Linux, for node.js bindings do: (NOTE - this is currently broken?)

sudo apt-get install nodejs nodejs-dev openssl libssl-dev npm build-essential libv8-dev cmake

cmake . -DWRAP_NODEJS=ON

make

Look in Wrapping/NodePackage/README for more info.

Python 2

If you want to wrap for Python 2 you should do:

sudo apt-get install python-dev swig cmake build-essential

cmake . -DWRAP_NODEJS=OFF -DWRAP_PYTHON=ON

make

Install locally by: sudo python Wrapping/PythonPackage/setup.py install

Further usage instructions are in Wrapping/PythonPackage/dist/README

R

If you want to wrap for R you should do:

sudo apt-get install r-base r-base-dev swig cmake build-essential

cmake . -DWRAP_NODEJS=OFF -DWRAP_R=ON

make

More details about R at: http://cran.r-project.org/bin/linux/ubuntu/README

Ruby

If you want to wrap for Ruby you should do:

sudo apt-get install ruby-dev swig cmake build-essential

cmake . -DWRAP_NODEJS=OFF -DWRAP_RUBY=ON

make

About

C++, Javascript, python, ruby and R bindings to the Gt.M database

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 27.9%
  • CMake 22.4%
  • Python 17.5%
  • C 11.5%
  • JavaScript 10.4%
  • Ruby 8.4%
  • Other 1.9%