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

Comments

  1. 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...

    ReplyDelete
  2. ChakraCore's cons IMHO
    1. it is a Microsoft product :-)
    2. it powers Microsoft Edge and Internet Explorer browsers :-)

    ReplyDelete
  3. Fabio VITALE Well, both points also hold true for C#.

    ReplyDelete
  4. Ondrej Kelle Cool! Would you open source it?

    ReplyDelete
  5. Edwin Yip It's a possibility I'll consider. If/when I open it I'll announce it here.

    ReplyDelete
  6. Ondrej 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?

    ReplyDelete
  7. Mocte Sandoval In principle yes, if your host provides the missing browser/Electron-like parts (DOM implementation, HTML/CSS rendering).

    ReplyDelete
  8. Nice, 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.

    ReplyDelete
  9. Vincent 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).

    ReplyDelete
  10. I 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.

    ReplyDelete
  11. Vincent 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).

    ReplyDelete
  12. Nice, thanks for the heads up, will definitely take a look.

    ReplyDelete

Post a Comment