Provides Node.js bindings to execute Tcl commands using a native Tcl Interpreter. Also includes the ability to define new commands in the Tcl intepretor that will invoke a specified JavaScript function.
- Tcl development files (e.g.
sudo apt-get install tcl-dev
orsudo yum install tcl-devel
)
The build process will look for tclConfig.sh
to identify Tcl include directory
and linker flags. If you are using a Tcl version older than 8.5 or want to link to a specific
Tcl installation use the TCLCONFIG
environment variable to override the default behaviour
(e.g. export TCLCONFIG=/path/to/tclConfig.sh
).
This version has been updated to use node-addon-api and so should be compatible with future versions of node.js. Unfortunately, it may not build properly on very old node.js versions.
- Tcl thread support (To enable async commands outside the main event loop)
- C++ compiler with support for c++11 features (To enable async command queues outside the main event loop)
$ npm install --save tcl
var tcl = require( 'tcl' );
var Tcl = require( 'tcl' ).Tcl;
var tcl = new Tcl();
Execute a Tcl command synchronously and returns a Result.
Name | Type | Description |
---|---|---|
cmd | String | Command to execute |
tcl.$( 'info version' );
Execute a Tcl command using injected helper methods and returns a Result.
< 8000 div class="markdown-heading" dir="auto">