XS7 – A compact JavaScript engine for embedded applications
moddable.com
moddable.com
With the 26KB RAM Duktape needs for "Hello world" we can run apps like the Sensor hub described in this blog post (run on a Thunderboard that only has 32KB of RAM total): http://blog.moddable.tech/blog/moddable-tech-presentation-to...
> security contexts and everything else which would be irrelevant for desktop apps
I hope that was dark sarcasm, or that you do not write software. Security is never irrelevant! Never!GP is likely overestimating how much "bloat" could actually be dropped but your comment is uninformed.
Also it's also not what most people mean by "untrusted". From a low level hardware standpoint though... assuming user-land code isn't trustworthy IS a good guideline.
No, "ALL" code is not untrusted. There's varying degrees of trust. I'd encourage you to stop trying to win the argument through platitudes and do some research instead, but I'm not sure you're interested.
Sciter is an implementation of HTML(~5)/CSS(~3) and DOM/layout/rendering. As for now it has its own JS alike script and VM and is contained in single DLL < 5mb all together.
So "yes", mini-electron is feasible and exists already I would say.
Yet, I am not that good in "legaleze" language, GPL vs BSD vs paid options, etc.
I found it too hard to start writing something with TIScript, maybe if there was some step-by-step tutorial it could be easier.
> So "yes", mini-electron is feasible and exists already I would say.
I believe you could became big player in "web to desktop" market if only sciter had JS & DOM support. That would give you access to existing code and make sciter almost drop in replacement for nw.js or electron.
//edit: formatting mistake
Any technical barriers to this ?
The Gnome folks tried anointing JS as the de jure development language across the Gnome project (i.e., for apps, too) a few years back, but there was a minor backlash. Unfortunately, Electron came along within the next year or so has since snagged most of the mindshare that was up for grabs after they backpeddled a bit. You can write JS apps, but it's not a prominent park of the environment outside of Gnome Shell and extensions, AFAIK. The documentation is pretty lacking.
GJS is SpiderMonkey under the hood—the same JS engine used in Firefox. It would be interesting to see if XS were an improvement for Gnome. Web browsers are subject to constraints that aren't necessarily a relevant factor for static packages downloaded from your distro vendor. For example, it looks like XS/Kinoma/Moddable supports AOT compilation, which could be a win.
Metrics here look like they focus on RAM and not on speed of computation.
On the softer side, GTK folks do favor C, and the explicit endorsement of (L)GPLv3 is worth brownie points in that circle. (SpiderMonkey is written in C++, and MPL2 is compatible with (L)GPL, but its copyleft is weaker and allows more permissive use.)
In any case, this project is really neat. I only wish I'd heard about it back in 2015.
I spent a few seconds looking through my feed of past Planet Gnome posts. It looks like the first announcement was here in 2013:
http://treitter.livejournal.com/14871.html
You can get a taste from the comments there. Here's some meta-commentary:
https://www.reddit.com/r/javascript/comments/17w0z5/javascri...
IIRC, it didn't really let up. I don't have a reference, but I vaguely recall something that, if not an official recantation, was akin to the general sentiment of backpeddling from the original stance, although I may be misremembering. In any case, the forthcoming concerted effort to go all-in on JS-for-Gnome didn't really happen as that post suggests it would.
A couple months after the fomentatious announcement linked above, GitHub quietly started work on Atom Shell and then a year later released Atom and Electron under MIT. What a massive lost opportunity for the Gnome folks to take advantage of the lead they'd set up for themselves instead of bowing to the vocal pressure! Had that not been the case, GTK+JS might've been the go-to framework for rapid cross-platform desktop app development in the instances where people are reaching for Electron today. (And that recurring plea for more "native" UIs would never be heard—or at the very least there'd be a straightforward path to migrate codebases to native in a piecemeal fashion if there was any motivation to do so.)
In case you're interested, here's the doc that describes the C interface to the runtime of the XS JavaScript engine: https://github.com/Moddable-OpenSource/moddable/blob/public/...
- XS7 can run in as little as 32K RAM :)
- Espruino follows the ES5 standard (released in 2009), whereas XS7 follows the ECMAScript 2017 standard.
- The Espruino debugger is more like gdb, the XS7 debugger has a GUI.
We have a couple of posts on our website with more information about XS7: http://blog.moddable.tech/blog/moddable-tech-presentation-to... http://www.moddable.com/XS7-TC-39
Would be very interesting to play with in that context.
It looks like there's nothing out-of-the-box but they do recommend ESP8266 based boards[1] on their site. Which is interesting as I thought that was just a wifi chip...
edit - It does look like they're producing their own board[2] as a demo/hacking platform which is pretty great!
1. https://www.amazon.com/HiLetgo-Internet-Development-Wireless...