The New V8 JavaScript Runtime in PixInsight 1.9.4 — Script Porting Guide

  • Author Author Juan Conejero
  • Publish date Publish date
  • Last update Updated
  • Article read time Article read time 27 min read
  • Featured

Introduction

As most readers already know, I have been working hard for more than one year to replace the old SpiderMonkey 24 engine, which has been powering our JavaScript runtime since 2015, with a completely new, entirely redesigned, and fully rewritten runtime based on V8, Google's high-performance, open-source JavaScript and WebAssembly engine.

This monumental work is now complete, and the new runtime, available in version 1.9.4 Lockhart of PixInsight, has been thoroughly tested for stability and compatibility. We have already ported the most important standard scripts of our platform to the new V8 runtime, including the WBPP and FBPP preprocessing scripts, all astrometry scripts, and most utility and development scripts. The work to complete the transition to V8 will continue during the coming months. Many non-trivial scripts require substantial modifications to run on the new runtime. This is a delicate task, but for most scripts it isn't really difficult if properly implemented.

In this document, I'll describe the current status of the new PixInsight JavaScript Runtime (PJSR) and the required changes to port existing JavaScript code from the now-deprecated SpiderMonkey 24 engine to the V8 engine. The benefits can be immense, both in using a much cleaner, modern, and capable programming language and, depending on the algorithms and techniques implemented, in working with a much more efficient and highly performant infrastructure. At the end of this document, I'll provide information on new JavaScript classes with illustrative code examples. These new classes, along with others we have developed specifically for the new V8 runtime, can significantly improve your script development in PixInsight.
Next page: Runtime Selection
About author
Juan Conejero
Co-Founder and CEO, Pleiades Astrophoto S.L.
https://pixinsight.com/

Article information

Author
Juan Conejero
Article read time
27 min read
Views
9,223
Last update

More in Software Development

More from Juan Conejero

Back
Top