openquickjs / quickjs Goto Github PK
View Code? Open in Web Editor NEWA community-driven QuickJS fork. Issues and Pull Requests are welcome.
Home Page: https://openquickjs.org
License: Other
A community-driven QuickJS fork. Issues and Pull Requests are welcome.
Home Page: https://openquickjs.org
License: Other
Trying to build quickjs on ubuntu20. Getting the following error on two different ubuntu instances.
cmake and ninja install was successful.
sudo apt install cmake ninja-build # Ubuntu
quickjs > bash scripts/build.sh # build quickjs qjs qjsc etc. ~/code/js/quickjs:@sparta 11:12
+ rm -rf build bin lib
+ mkdir build
+ cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -B build -S .
-- The C compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at build/_deps/corrosion-src/cmake/FindRust.cmake:21 (message):
`rustc` not found in PATH or `/home/towshif/.cargo/bin`.
Hint: Check if `rustc` is in PATH or manually specify the location by
setting `Rust_COMPILER` to the path to `rustc`.
Call Stack (most recent call first):
build/_deps/corrosion-src/cmake/FindRust.cmake:259 (_findrust_failed)
build/_deps/corrosion-src/cmake/Corrosion.cmake:57 (find_package)
build/_deps/corrosion-src/CMakeLists.txt:68 (include)
-- Configuring incomplete, errors occurred!
See also "/home/towshif/code/js/quickjs/build/CMakeFiles/CMakeOutput.log".
+ cmake --build ./build --target qjs run-test262 -j 8
ninja: error: loading 'build.ninja': No such file or directory
Run ./bin/qjs -e 'console.log("Hello, World!")'
qjs: /home/runner/work/quickjs/quickjs/src/core/runtime.c:2672: JS_FreeRuntime: Assertion `list_empty(&rt->gc_obj_list)' failed.
/home/runner/work/_temp/3c25e719-61b9-46be-ad45-fb3e90ec798b.sh: line 1: 2445 Aborted (core dumped) ./bin/qjs -e 'console.log("Hello, World!")'
Error: Process completed with exit code 134.
The rust programming language is much more modern to help maintain the project.
test262/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-8.js:9: strict mode: unexpected error: Test262Error: Array.prototype.indexOf.call(obj, "l") Expected SameValue(«-1», «2») to be true
test262/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-18.js:11: unexpected error: Test262Error: Array.prototype.indexOf.call(str, "2") Expected SameValue(«-1», «2») to be true
test262/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-18.js:11: strict mode: unexpected error: Test262Error: Array.prototype.indexOf.call(str, "2") Expected SameValue(«-1», «2») to be true
test262/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-14.js:16: unexpected error: Test262Error: Array.prototype.indexOf.call(objOne, true) Expected SameValue(«-1», «0») to be true
test262/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-14.js:16: strict mode: unexpected error: Test262Error: Array.prototype.indexOf.call(objOne, true) Expected SameValue(«-1», «0») to be true
Average memory statistics for 75250 tests:
NAME COUNT SIZE
memory allocated 1011 124975 (123.6 per block)
memory used 967 117030 (0 overhead, 8.2 average slack)
atoms 532 26858 (50.5 per atom)
objects 172 12425 (72.2 per object)
properties 876 15798 (5.1 per object)
shapes 60 13809 (230.2 per shape)
bytecode functions 13 1685
bytecode 13 931 (71.6 per function)
C functions 100
arrays 1
fast arrays 1
elements 1 16 (1.0 per fast array)
Result: 515/75250 errors, 1392 excluded, 7972 skipped, 515 new
Average memory statistics for 75820 tests:
NAME COUNT SIZE
memory allocated 1015 139033 (137.0 per block)
memory used 971 116989 (0 overhead, 22.7 average slack)
atoms 536 27003 (50.4 per atom)
objects 172 12433 (72.3 per object)
properties 877 15829 (5.1 per object)
shapes 60 13821 (230.3 per shape)
bytecode functions 13 1699
bytecode 13 975 (75.0 per function)
C functions 100
arrays 1
fast arrays 1
elements 1 16 (1.0 per fast array)
Result: 1368/75820 errors, 9368 skipped, 1368 new
test262
commit and make it a submodule, or the total tests count increase time by time, not good for compare test reulsts before/after code changes; We upgrade test262
submodule periodically;Bugs: - modules: better error handling with cyclic module references
Misc ideas:
Memory:
Built-in standard library:
REPL:
Optimization ideas:
s += a + b
, s += a.b
and similar simple expressionsTest262o: 0/11262 errors, 463 excluded
Test262o commit: 7da91bceb9ce7613f87db47ddd1292a2dda58b42 (es5-tests branch)
Result: 35/75280 errors, 909 excluded, 585 skipped
Test262 commit: 31126581e7290f9233c29cefd93f66c6ac78f1c9
2020-11-08:
2020-09-06:
2020-07-05:
2020-04-12:
2020-03-16:
2020-01-19:
2020-01-05:
2019-12-21:
2019-10-27:
2019-09-18:
2019-09-01:
2019-08-18:
2019-08-10:
2019-07-28:
2019-07-21:
2019-07-09:
Is your feature request related to a problem? Please describe.
Currently, this cannot be compiled with msvc or clang on windows due to ties to POSIX headers.
Describe the solution you'd like
Multi-platform header includes
Describe alternatives you've considered
There are no alternatives. You can just compile on Windows with MSVC or Clang.
Since official quickjs repository bellard/quickjs is not open enough. There're lot great PRs (including open and closed) there.
We can review them in spare time to apply good patches here.
~100 KB
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.