/ Home
DEMO | DOWNLOAD | DEPLOY | SEARCH
Login

BrowserDatabaseJsishScriptFileZVFS Javascript interpreter + embedded Web-server
  • With functions supporting typed parameters.
  • WebSockets, Sqlite and other prerequisites builtin.
  • A ZVFS to extend functionality with embedded-scripts.
  • Static binaries for Linux and/or Windows.
  • Implementated in C and embeddable with single #include.
(Link to lighter UI)

Topics

What is it?

Jsi seeks to fill the void in current development environments by providing:

  • a feature-dense development environment,
  • based on the most widely available and used languages (Javascript and C),
  • with builtin Database (Sqlite) and GUI capabilities (WebSocket),
  • is easily extended and embedded in C,
  • all while eschewing dependencies and excess complexity.

What is Jsi NOT?:

  • the latest and greatest ECMA features.
  • Object oriented and other kitchen-sink abstractions.
  • Duplication, or multiple way to achieve the same goal.

Packaging

A Deploy is a zip/sqlar archive or fossil repository containing one or more applications, which Jsi can mount and execute. For example, this Ledger demo is served out as follows using jsi-app fossil (via an Nginx reverse proxy). But deploying any application inevitably entails dealing with version dependencies. Jsi handles this in a novel way by mounting **tagged** releases from a fossil repository. If an application restart is set to automatically update the repository, it ensures the latest supported release always gets run. New code may be committed by developers at any time, but only tagged releases will be used. ServerrunningNginxJsishFossil::Browser:Fossil:User:Developer:

Security

As Jsi is self contained, running it standalone in a chroot-jail needs only a few files from /dev and /etc. For example, this Ledger demo is run in an unprivileged chroot containing a single executable (jsish), with non-data files made immutable with chattr. And if this is not secure enough, Jsi offers Safe-mode.

In addition, serving content from a zip or fossil repository adds another abstraction layer, making it that much harder to corrupt or hijack content.

An advantage of the chroot approach as compared with something like containers, is that far less disk space and system memory is required. Jsi and fossil together total around 10Meg of disk. Using hard links you could create hundreds of chrooted apps with little-to-no additional disk space. But more important is the reduction in Attack Surface. There is far less code involved and far less complexity.

C-API

Jsi is written in C. For embedded developers this provides a C-API that simplifies connecting low level (C) with high level (GUI) code. The use of C-Structs is intrinsically integrated into Jsi at all levels, and is the main mechanism used for module state, option parsing and C extensions. This direct interfacing with C-structs can potential be used to process very large amounts of data with little overhead. This includes the Sqlite interface which also supports mass data transfers to/from structs, which is of particular importance for embedded applications.

The C coding aspect of Jsi however is purely optional. Ledger and the other demo applications neither use nor require it.