by c-smile · 5y ago · 0 comments
Possible, see Sciter.JS : https://github.com/c-smile/sciter-js-sdk
10 times more compact than Tauri, 20 times less than Electron.JS
Yet it has Rust API ( https://github.com/sciter-sdk/rust-sciter ), that if someone need "Made with Rust" label :)
And it works even on Windows 2000, do you remember that thing? See: https://sciter.com/necromancing-sciter-on-windows-2000/
Needing to rewrite with other UI/JS frameworks to account for quirks gives me pause.
React needs web browser compatibility layer to work in Sciter.JS as React was designed strictly for browsers.
For that matter: PReact ( https://preactjs.com/ ) works out of the box already, see : https://github.com/c-smile/sciter-js-sdk/tree/main/samples/p... ;
MithrilJS ( https://mithril.js.org/ ) works as it is also.
SvelteJS works as it is with Sciter.JS too.
Also Sciter.JS has its own native implementation of JSX ( it's built in JS core of Sciter.JS) and also DOM extended by native element.patch(vdom) that makes "reactivity" to work in Sciter.JS with native speed.
Yet quite a lot of UI components are natively built-in. For example:
https://sciter.com/behaviorvirtual-list-for-sciter-and-scite... and https://sciter.com/sciter-js-themes/
Being "almost" web compatible is not a recipe for success, as it's bound to cause confusion and frustration among folks that want it to be an Electron alternative.
Either embrace Web APIs entirely (perhaps a smaller compatible subset), or just position it as something else entirely, like Flutter.
Hmm... and how do I do that? What's your impression?
Sciter.JS is "an embeddable HTML/CSS/JS UI engine" and that's it.
Yes, it is possible to use it without touching native side like ElectronJS, see: https://quark.sciter.com/ , but that's not the primary use case. So far it has around 400 mln installations in embedded form as part of other products, see: https://sciter.com/#customers
If you want you can treat it as Flutter that uses time proven and familiar HTML/CSS/JS resource definitions instead of Dart. Dart is close to JS but not JS, Flutter has some DOM but not HTML DOM, it has some style system but quite rudimental one.
But Sciter do not have codecs embedded. Instead
a. it [re-]uses streaming services of underlying OS;
b. has interface for the hosting application to supply its own video streams.
This way some applications use WebRTC as video sources, some use ffmpeg library to provide video streams. Video playback architecture is app dependent usually. Sciter provides to them "video rendering site".
That's idea of Sciter - to reuse underlying OS services as much as possible.
For example Sciter has spellchecking but only if OS provides spellchecking API (and usually they do).