-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation updates #685
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
e18c766
Document how to create standalone executables
saghul 71a7abd
Tweak intro and document differences with bellard/quickjs
saghul 50f1447
Add list of projects using NG
saghul 57b768a
Add cloning instructions to building section
saghul cf54f85
Update README
saghul File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
# ⚡️ QuickJS - A mighty JavaScript engine | ||
|
||
Friendly [QuickJS] fork focused on reigniting the project. | ||
|
||
## Overview | ||
|
||
In October 2023 [@bnoordhuis] and [@saghul] decided to fork the [QuickJS] project with | ||
the aim of reigniting it. They reached out to the original authors ([@bellard] and [@chqrlie]) | ||
about their intentions. | ||
QuickJS is a small and embeddable JavaScript engine. It aims to support the latest | ||
[ECMAScript] specification. | ||
|
||
This project is a _fork_ of the [original QuickJS project] by Fabrice Bellard and Charlie Gordon, after it went dormant, with the intent of reigniting its development. | ||
|
||
## Getting started | ||
|
||
Head over to the [project website] for instructions on how to get started and more | ||
documentation. | ||
|
||
As of December 2023 the initial goal was somewhat accomplished. [@bellard] resumed working on | ||
the project and both parties have been pulling patches from each other since. | ||
## Authors | ||
|
||
As of early 2024 both projects agree the proper path forward involves merging both projects | ||
and combining the efforts. While that may take a while, since both projects diverged in certain | ||
areas, there is willingness to go in this direction from both sides. | ||
[@bnoordhuis], [@saghul], and many more [contributors]. | ||
|
||
[QuickJS]: https://bellard.org/quickjs | ||
[@bellard]: https://github.com/bellard | ||
[original QuickJS project]: https://bellard.org/quickjs | ||
[@bnoordhuis]: https://github.com/bnoordhuis | ||
[@chqrlie]: https://github.com/chqrlie | ||
[@saghul]: https://github.com/saghul | ||
[contributors]: https://github.com/quickjs-ng/quickjs/graphs/contributors | ||
[project website]: https://quickjs-ng.github.io/quickjs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Differences with bellard/quickjs | ||
|
||
This project aims to be a drop-in replacement for those already using QuickJS. | ||
Minimal API changes might be necessary. | ||
|
||
## Community development | ||
|
||
NG is developed in the open, interacting with the wider community and through | ||
these interactions many improvements have already been made, including the incorporation | ||
of patches previously maintained in other forks. | ||
|
||
Each PR is reviewed, iterated on, and merged in GitHub. | ||
|
||
To date, NG has had over 40 distinct contributors and over 400 PRs. | ||
|
||
## Consistent release cadence | ||
|
||
As the project moves forward, a steady cadence of releases has been maintained, with an | ||
average of a new release every 2 months. | ||
|
||
## Testing | ||
|
||
Since its inception testing has been a focus. Each PR is tested in over 50 configurations, | ||
involving different operating systems, build types and sanitizers. | ||
|
||
The `test262` suite is also ran for every change. | ||
|
||
## Cross-platform support | ||
|
||
In order to better support other platforms such as Windows the build system was | ||
changed to use [CMake]. | ||
|
||
In addition, Windows is treated as a first class citizen, with the addition of support | ||
for the MSVC compiler. | ||
|
||
[CMake]: https://cmake.org/ | ||
|
||
## Performance | ||
|
||
While being an interpreter limits the performance in comparison with other engines which | ||
use a JIT, several significant performance improvements have been made: | ||
|
||
- Opcode fusion | ||
- Polymorphic inline caching | ||
- Memory allocation improvements | ||
- Improved parse speeds | ||
|
||
## New ECMAScript APIs | ||
|
||
The main focus of NG is to deliver state-of-the-art JavaScript features. Typically once they | ||
are stable (stage 4) but sometimes even at earlier stages. Here is a non-exhaustive list | ||
of ES features present in NG: | ||
|
||
- Resizable ArrayBuffer | ||
- Float16Array | ||
- WeakRef | ||
- FinalizationRegistry | ||
- Iterator Helpers | ||
- Promise.try | ||
- Error.isError | ||
- Set operations | ||
|
||
Some non-standard but widely used APIs have also been added: | ||
|
||
- V8's `Error.prepareStackTrace` and `Error.stackTraceLimit` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Projects using NG | ||
|
||
Here is a list of projects currently using, supporting or migrating to QuickJS-NG. | ||
If you want yours to be listed here, please open a PR! | ||
|
||
## [txiki.js](https://github.com/saghul/txiki.js) | ||
|
||
A tiny JavaScript runtime. | ||
|
||
## [radare2](https://github.com/radareorg/radare2) | ||
|
||
Reverse engineering framework. | ||
|
||
## [rquickjs](https://github.com/DelSkayn/rquickjs) | ||
|
||
High level Rust bindings. | ||
|
||
## [llrt](https://github.com/awslabs/llrt) | ||
|
||
Lightweight JS runtime for serverless applications. | ||
saghul marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## [nx.js](https://github.com/TooTallNate/nx.js) | ||
|
||
JavaScript runtime for Nintendo Switch homebrew applications. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably flesh those out. The only one that comes to mind is class ids may need tweaking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though those 2 are rare to see and maybe belong in advanced use cases...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On my next pass I'll try and add some "migration" section.