pojala / electrino Goto Github PK
View Code? Open in Web Editor NEWDesktop runtime for apps built on web technologies, using the system's own web browser engine
License: MIT License
Desktop runtime for apps built on web technologies, using the system's own web browser engine
License: MIT License
Hi there!
Im building a relative heavy app (TradeJS), but with minimal electron requirements (so in a way perfect for Electrino).
Only requirement I have is to open multiple windows.
Is it possible to make a performance comparison with some standars JS tests? Like kraken etc.
Maybe it's no use, cause there are already existing benchmarks between chrome and default OS JS engines, but still it would be wise to mention it I think, because performance is one of the downsides in Electron/Web-Wrappers :)
Thanks!!!!
Say I wanted to build a concept using electrino. Just to see what I would bump into or find out some of the limitations. How do I get started?
For portability, it would be a much better idea to use pure C/C++ instead of Objective-C wherever possible.
I hate to be that guy, however, the community has shown interest but things are not moving due to pull requests not being merged or commented on and issues sitting for extended periods of time. Let's not let this sit for too long or people that are interested will simply give up and move on.
this sounds crazy, but hear me out, don't reject the idea right away, research & think about it.
Microsoft has this ancient technology called HTML Applications (HTA) on Windows since Windows XP.
it was a failure, and was discontinued. it's even patented, LOL oh classic 2003 Microsoft.
but mshta.exe is still on every windows installation since Windows XP. and I don't think it's going to be removed in any future Windows release. I am currently playing with HTA(s) on my Windows 10 (1703) machine.
HTA(s) can have access to the machine (the "this program can make changes to your PC" YES | NO dialogue)
HTA(s) can run scripts that can do native things, like modifying the registry, file system IO operations, etc..
it uses the default Internet Explorer of the Windows installation. to render and run the scripts of the "*.hta" file in the HTA Host (C:\Windows\SysWOW64\mshta.exe).
HTA(s) run Javascript (JScript) scripts and VB scripts in Internet Explorer compatibility mode.
in IE compatibility mode (IE 8) I believe you are restricted to EcmaScript 3. but transpilation can help with that. bebel and the Typescript transpile to ES3, Typescript even transpiles the async/await ES6 feature to ES3.
according to my research HTA(s) scripts can call .NET dlls and powershell and any program from shell.
I think we can make a bridge to Node.js with that capability. think of Edge or the cross platfrom .NET Core Javascript Services Library
I know its IE, every web developer's nightmares, but we can polyfill everything in it.
this will solve Electron's issue of installing Chromium with every Electron App on Windows.
The webview is a tiny cross-platform webview library for C/C++/Golang to build modern cross-platform GUI. This project has no ambition to provide neither Node.js backend nor the Electron API, but has similar objectives like generating small self-contained executable using platform native webview.
A "Hello World" app takes 115 MB using Electron, but only 167 kB using Electrino:
I wonder why size is small than electron?
Has anyone thought about how to support windows?
I was thinking of using WebView which supports Windows 8 and Windows 10.
In apps compiled for Windows 10, WebView uses the Microsoft Edge rendering engine to display HTML content. In apps compiled for Windows 8 or Windows 8.1, WebView uses Internet Explorer 11 in document mode.
There's a sample UWP app available on GitHub.
Thoughts?
Hi,
Could anyone tell how can we run the app that we are developing for debugging.
Like electron has :- electron .
What's for electrino :-
&&
Could anyone also tell that how can we compile our app for windows and mac.
First of all, great experimental project, congrats to everyone involved.
Is it possible for someone to add the list of limitations or the things that you cannot do at the moment with it? That'd greatly boost the development of those as well as help decisioning for people who're considering it for making an app.
I've just found nodekit today, didn't try it yet.
Just put it here for further reference.
I think we need to explicitly mention the goals of this project. The tradeoffs that are made using this project are definitely worth it I feel.
The tradeoffs that it makes is to use platform native tools for the web context and js context. To achieve this it is only able to offer a subset of features in Electron.
I think even if we just had two APIs child_exec
and fs
- it would still be totally worth it. It allows the creation of simple apps that are able to display a UI and access CLI and filesystem.
How to start electrino app
@pojala what is state of this project. Is it active. Even if you can list out the help you need some of us can help you out.
A long time ago, in a galaxy far far away: https://github.com/MacGapProject/MacGap1
macgap has much wider API support, but has been suffering from lack of interest. How about we direct some of this newfound hunger for thin apps into making it alive again?
In working condition Electrino?
I was trying to implement the window.webContents.openDevTools()
method. It's not trivial programmatically but can be open manually if the developerExtrasEnabled
flag is set to TRUE
.
WKWebView *webView = [[WKWebView alloc] initWithFrame:window.contentView.bounds configuration:wkConf];
[webView.configuration.preferences setValue:@(TRUE) forKey:@"developerExtrasEnabled"];
Now you can right click on the page and inspect an element :)
This requires USE_WKWEBVIEW
to be set to 1 and I had to modify this code:
- (void)webView:(WebView *)webView didReceiveTitle:(NSString *)title forFrame:(WebFrame *)frame
{
#if !USE_WKWEBVIEW
if (frame == self.webView.mainFrame) {
self.window.title = title;
}
#endif
}
Because mainFrame
doesn't exist on WKWebView
.
Btw, why do you want to support both WKWebView
and WebView
?
When writing #5, I thought of an idea of having Objective-C modules, which would allow developers to create modules written in JS (like the default ones), so they can use the Obj-C APIs without needing to expose each API into JS.
After pursuing this idea (I converted the current default modules except for the electrino
module), a new folder exists known as modules
. Developers would be allowed to drag and drop external modules which are automatically exposed to JS.
This also allows developers to pick and choose specific modules they want, allowing for smaller binary sizes.
I have left just the electrino
module within the application. It would most likely be common sense to leave some modules within the application (like console
).
Feel free to leave your opinions below :)
As mentioned on jscherer92/Quark#21, maybe http://www.lowjs.org/ ( https://github.com/neonious/lowjs ) could be used in the core. I would like to know what you think :)
What are your plans on porting it to Linux?
I think that electron apps are especially useful for Linux desktop given that we usually don't have that much third party attention compared to Windows and macOS. A good example is Wunderlist, there are Wunderlist apps for almost every platform (Windows, iOS, macOS, android, etc.. even the now dead Ubuntu Phone I think) except for Linux.. and that's why I created this project: WunderlisTux which I'd love to implement using Electrino instead of Electron.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.