New finding today - open source Delphi headers for the ChakraCore JavaScript engine by Microsoft, which powers the Edge and Internet Explorer browsers.
New finding today - open source Delphi headers for the ChakraCore JavaScript engine by Microsoft, which powers the Edge and Internet Explorer browsers.
===
ChakraCore's advantages IMHO:
A - small binary size - less than 2MB zipped.
B - Known to have the best ES6 support among the JS engines.
C - Good performance. (I read some online reviews).
===
Sample is here:
https://github.com/hsreina/Chakra-Samples-Delphi
===
Let's thank @HSReina
https://github.com/hsreina/ChakraCore-Delphi
===
ChakraCore's advantages IMHO:
A - small binary size - less than 2MB zipped.
B - Known to have the best ES6 support among the JS engines.
C - Good performance. (I read some online reviews).
===
Sample is here:
https://github.com/hsreina/Chakra-Samples-Delphi
===
Let's thank @HSReina
https://github.com/hsreina/ChakraCore-Delphi
As a little hobby project, I've been playing with Chakra Core recently and have some experimental Delphi and Free Pascal code, working with their supported targets linux64, osx64, win64, win32 (I haven't tried winarm yet). In addition to the header translations I have some wrapper classes, can work with ES6 modules, calling from host to engine and vice versa, propagating exceptions, etc. I'm currently stuck/researching how to handle the existing mess of Javascript modules (AMD, CommonJS, ES6) consistently, if possible without a transpiler like Babel...
ReplyDeleteChakraCore's cons IMHO
ReplyDelete1. it is a Microsoft product :-)
2. it powers Microsoft Edge and Internet Explorer browsers :-)
And, as Edwin Yip posted on G+, an interesting project is v8DelphiWrapper (https://stackoverflow.com/a/47218541/133516), github.com - zolagiggszhou/v8delphiwrapper
ReplyDeleteFabio VITALE Well, both points also hold true for C#.
ReplyDeleteOndrej Kelle Cool! Would you open source it?
ReplyDeleteEdwin Yip It's a possibility I'll consider. If/when I open it I'll announce it here.
ReplyDeleteOndrej Kelle Can't wait for it!
ReplyDeleteOndrej Kelle Will it be correct to assume that with your little project one could develop electron like applications? eg design app with html, css js and have access to the system through the host app (shell) written un Pascal?
ReplyDeleteMocte Sandoval In principle yes, if your host provides the missing browser/Electron-like parts (DOM implementation, HTML/CSS rendering).
ReplyDeleteUwe Raabe you are absolutely right!
ReplyDeleteNice, I've been looking around for a replacement for active scripting (which we use in FinalBuilder). Working with v8 is painfull, Spidermonkey not much better. Ondrej Kelle I'd certainly be interested in your efforts.
ReplyDeleteVincent Parrett By "Working with v8 is painfull, Spidermonkey not much better", would you expand a little bit? Which wrappers did you use? Thanks. PS, winsoft.dk also has a ChakraCore wrapper (not only C API header translations).
ReplyDeleteI only spent a little time with them, but their api's are much harder to write nice wrappers over than chakra's - the chakra api surface is pretty small. I still need to find some time to play more with it, debugging is something I need.
ReplyDeleteVincent Parrett Agreed, ChakraCore seems nicer than the mentioned alternatives. There's debugging (including time-travel) API, too, which looks interesting (I wish I had more time for this).
ReplyDeleteVincent Parrett FYI
ReplyDeletegithub.com - tondrej/chakracore-delphi
Nice, thanks for the heads up, will definitely take a look.
ReplyDelete