jsish
Home
Not logged in

Jsi is a small javascript interpreter integrating Database and Web with C.

Features


Enhancements

Jsi adds the following enhancements to EcmaScript.

Type-Checking

Jsi enhances function definitions with types, for both parameters and return values:

function foo (a:number, b:string):number {
   return a+1;
}

A warning is generated if a typed function is called with an incorrect type, or the wrong number of arguments.

Parameters can also be given a default value, allowing them to be called with fewer arguments:

function foo (a:number=0, b:string='') {
}
foo(99);

For more details see Types.

System

The System methods contain all the builtin toplevel commands in Jsi.

These can be invoked either at the toplevel, or via System, eg:

puts('hi');
System.puts('hi');

For more details see System.


OS-Support

Jsi provides several Operating-System enhancements:

File-System

There are several File-system related groups of commands:

For more details, see Filesystem.

Modules

Modules can interprets Js files or load extension commands upon their first invocation using source and load.

For more details, see Modules.

Threads

Threads are supported in Jsi, by allowing interps to run in their own thread.

For more details, see Threads.

Interp

Jsi executes scripts in a context called an interpreter. This provides a number of configurable runtime options.

For more details, see Interp.

Info

The Info commands provide Jsi with introspection capabilities.

For more details, see Info.


Extensions

Sqlite

Jsi comes with an Sqlite driver that by default is builtin to jsish. To ensure standalone compatibility, it also includes the source to a version of Sqlite.

For more details see Sqlite.

MySql

Jsi comes with a MySql driver. It is not by default builtin to jsish. But it can be added easily enough, or built into a shared library and loaded dynamically.

For more details see MySql.

Websockets

Jsi comes with an Libwebsocket driver that by default is builtin to jsish. To ensure standalone compatibility, it also includes the source to a version of Libwebsocket.

For more details see Websocket.

Sockets

The Socket extension provides access to both TCP and UDP sockets

For more details see Socket.

Zvfs

Jsi allows the creation of Zero Install database applications with seamless web access. Moreover, as Jsi's C-API is modelled after Tcl, it is well suited for embedded development.

For more details see Zvfs.


C-API

Amalgamation

Amalgamation provides the source for all Jsi files wrapped into file jsi.c.

For more details see Amalgamation.

Jsi-Lite

Jsi-Lite is the set of functions from jsi.c usable in C without an interpreter.

For more details see Jsi-Lite.

Jsi_DbQuery

Jsi_DbQuery is the part of Jsi-Lite used for accelerated Sqlite-C development .

For more details see DbQuery.

Jsi_DString

Jsi_DString provides efficient, stack-oriented string handling for C.

For more details see Jsi_DString.

C-Extensions

C-Extensions are where Jsi shines.

For more details see C-Extensions.