- Start: Download, Building, Using, Embedding
- Docs: Builtins, Reference, FAQ, Index, License, Language, ECMA
- Development: Types, Strict Mode, Type Checking, Debugging, Errors, Logging
- Core: System, Info, Interp, Format, File-System, Events
- Integration: Modules, Packages, Auto-Load
- Web: Pre-processors, Markup, JSON
- Miscellaneous: CData, Threads, Signal, Sqlite, MySQL, Zvfs, Socket, WebSocket
- Tools: Testing, Tracing, Profiling, Code-Coverage
- C/C++: Jsi-Lite, C Extension, DString, CData, Options, Sqlite-C, JSON-C
- Applications: Ledger, SqliteUI, Web Server
Jsi seeks to fill the void in current development environments:
- Has Database (Sqlite) and GUI capabilities (WebSocket) builtin.
- Is easily embedded in C and extended.
|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.|
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.
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.