Skip to content

Commit 0575d10

Browse files
committed
Tweak intro and document differences with bellard/quickjs
1 parent a365f18 commit 0575d10

File tree

2 files changed

+69
-19
lines changed

2 files changed

+69
-19
lines changed

docs/docs/diff.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Differences with bellard/quickjs
2+
3+
This project aims to be a drop-in replacement for those already using QuickJS.
4+
Minimal API changes might be necessary.
5+
6+
## Community development
7+
8+
NG is developed in the open, interacting with the wider community and through
9+
these interactions many improvements have already been made, including the incorporation
10+
of patches previously maintained in other forks.
11+
12+
Each PR is reviewed, iterated on, and merged in GitHub.
13+
14+
To date, NG has had over 40 distinct contributors and over 400 PRs.
15+
16+
## Consistent release cadence
17+
18+
As the project moves forward, a steady cadence of releases has been maintained, with an
19+
average of a new release every 2 months.
20+
21+
## Testing
22+
23+
Since its inception testing has been a focus. Each PR is tested in over 50 configurations,
24+
involving different operating systems, build types and sanitizers.
25+
26+
The `test262` suite is also ran for every change.
27+
28+
## Cross-platform support
29+
30+
In order to better support other platforms such as Windows the build system was
31+
changed to use [CMake].
32+
33+
In addition, Windows is treated as a first class citizen, with the addition of support
34+
for the MSVC compiler.
35+
36+
[CMake]: https://cmake.org/
37+
38+
## Performance
39+
40+
While being an interpreter limits the performance in comparison with other engines which
41+
use a JIT, several significant performance improvements have been made:
42+
43+
- Opcode fusion
44+
- Polymorphic inline caching
45+
- Memory allocation improvements
46+
- Improved parse speeds
47+
48+
## New ECMAScript APIs
49+
50+
The main focus of NG is to deliver state-of-the-art JavaScript features. Typically once they
51+
are stable (stage 4) but sometimes even at earlier stages. Here is a non-exhaustive list
52+
of ES features present in NG:
53+
54+
- Resizable ArrayBuffer
55+
- Float16Array
56+
- WeakRef
57+
- FinalizationRegistry
58+
- Iterator Helpers
59+
- Promise.try
60+
- Error.isError
61+
- Set operations
62+
63+
Some non-standard but widely used APIs have also been added:
64+
65+
- V8's `Error.prepareStackTrace` and `Error.stackTraceLimit`

docs/docs/intro.md

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,18 @@ sidebar_label: Welcome
99
QuickJS is a small and embeddable JavaScript engine. It aims to support the latest
1010
[ECMAScript] specification.
1111

12-
This project is a _fork_ of the [original QuickJS project] by Fabrice Bellard, after it went
13-
dormant for several years, with the intent of reigniting its development.
12+
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.
1413

15-
In October 2023 [@bnoordhuis] and [@saghul] decided to fork the original project with
16-
the aim of reigniting it. They reached out to the original authors ([@bellard] and [@chqrlie])
17-
about their intentions.
18-
19-
As of December 2023 the initial goal was somewhat accomplished. [@bellard] resumed working on
20-
the project and both parties have been pulling patches from each other since.
21-
22-
As of early 2024 both projects agree the proper path forward involves merging both projects
23-
and combining the efforts. While that may take a while, since both projects diverged in certain
24-
areas, there is willingness to go in this direction from both sides.
25-
26-
This fork is focused on (but not limited to):
14+
This project is focused on (but not limited to):
2715

2816
- Community development
2917
- Testing
3018
- Cross-platform support
3119
- ES features
3220

33-
:::note
21+
You can check the differences with the original project [here.](./diff)
3422

23+
:::note
3524
This site is under construction, the entire API is not yet documented.
3625
:::
3726

@@ -42,7 +31,3 @@ for installing it from prebuilt binaries.
4231

4332
[ECMAScript]: https://tc39.es/ecma262/
4433
[original QuickJS project]: https://bellard.org/quickjs
45-
[@bellard]: https://github.com/bellard
46-
[@bnoordhuis]: https://github.com/bnoordhuis
47-
[@chqrlie]: https://github.com/chqrlie
48-
[@saghul]: https://github.com/saghul

0 commit comments

Comments
 (0)