From 7f86e0b6033b66e80db27b61a449fad662ad1250 Mon Sep 17 00:00:00 2001 From: SheetJS Date: Fri, 24 May 2024 04:24:50 -0400 Subject: [PATCH] More `darwin-arm` tests --- docz/data/engines.xls | 6 +-- docz/docs/03-demos/19-desktop/02-nwjs.md | 2 +- docz/docs/03-demos/20-cli/23-deno.md | 2 +- docz/docs/03-demos/20-cli/index.md | 2 +- docz/docs/03-demos/42-engines/01-duktape.md | 21 ++++++--- docz/docs/03-demos/42-engines/04-jsc.md | 49 ++++++++++++++++++--- docz/docs/03-demos/42-engines/06-goja.md | 2 +- docz/docs/03-demos/42-engines/08-quickjs.md | 14 +++--- docz/docs/03-demos/42-engines/09-hermes.md | 2 +- docz/docs/03-demos/42-engines/20-chakra.md | 6 +-- docz/docs/03-demos/42-engines/21-boa.md | 2 +- docz/docs/03-demos/42-engines/24-graaljs.md | 2 +- docz/docs/03-demos/42-engines/25-mujs.md | 1 + docz/docs/09-miscellany/05-contributing.md | 12 ++++- docz/static/cli/Cargo.toml | 2 +- 15 files changed, 91 insertions(+), 34 deletions(-) diff --git a/docz/data/engines.xls b/docz/data/engines.xls index a1fefa5..6a83401 100644 --- a/docz/data/engines.xls +++ b/docz/data/engines.xls @@ -95,7 +95,7 @@ JSC C++ - + @@ -195,7 +195,7 @@ GraalJS Java - + @@ -205,7 +205,7 @@ MuJS C - + diff --git a/docz/docs/03-demos/19-desktop/02-nwjs.md b/docz/docs/03-demos/19-desktop/02-nwjs.md index 9747137..0c7c0ff 100644 --- a/docz/docs/03-demos/19-desktop/02-nwjs.md +++ b/docz/docs/03-demos/19-desktop/02-nwjs.md @@ -118,7 +118,7 @@ This demo was tested in the following environments: | Windows 10 | `win10-x64` | `0.83.0` | 2024-03-04 | | | Windows 11 | `win11-arm` | `0.82.0` | 2023-12-01 | | | Linux (HoloOS) | `linux-x64` | `0.85.0` | 2024-03-12 | | -| Linux (Ubuntu) | `linux-arm` | `0.60.0` | 2023-09-27 | Unofficial build[^1] | +| Linux (Debian) | `linux-arm` | `0.60.0` | 2024-05-23 | Unofficial build[^1] | ::: diff --git a/docz/docs/03-demos/20-cli/23-deno.md b/docz/docs/03-demos/20-cli/23-deno.md index 01792ac..779e68c 100644 --- a/docz/docs/03-demos/20-cli/23-deno.md +++ b/docz/docs/03-demos/20-cli/23-deno.md @@ -100,7 +100,7 @@ This demo was last tested in the following deployments: | Architecture | Deno | Date | |:-------------|:---------|:-----------| | `darwin-x64` | `1.43.1` | 2024-05-08 | -| `darwin-arm` | `1.37.2` | 2023-10-18 | +| `darwin-arm` | `1.43.6` | 2024-05-23 | | `win10-x64` | `1.41.3` | 2024-03-24 | | `win11-x64` | `1.37.2` | 2023-10-14 | | `win11-arm` | `1.38.4` | 2023-12-01 | diff --git a/docz/docs/03-demos/20-cli/index.md b/docz/docs/03-demos/20-cli/index.md index faf6d2e..9bcc0df 100644 --- a/docz/docs/03-demos/20-cli/index.md +++ b/docz/docs/03-demos/20-cli/index.md @@ -370,7 +370,7 @@ This demo was last tested in the following deployments: | Architecture | V8 Version | Crate | Date | |:-------------|:--------------|:---------|:-----------| | `darwin-x64` | `12.3.219.9` | `0.88.0` | 2024-03-15 | -| `darwin-arm` | `11.8.172.13` | `0.79.2` | 2023-10-18 | +| `darwin-arm` | `12.6.228.3` | `0.92.0` | 2024-05-23 | | `win10-x64` | `12.3.219.9` | `0.88.0` | 2024-03-24 | | `win11-x64` | `11.8.172.13` | `0.79.2` | 2023-10-14 | | `linux-x64` | `12.3.219.9` | `0.88.0` | 2024-03-18 | diff --git a/docz/docs/03-demos/42-engines/01-duktape.md b/docz/docs/03-demos/42-engines/01-duktape.md index d8db244..4684bc1 100644 --- a/docz/docs/03-demos/42-engines/01-duktape.md +++ b/docz/docs/03-demos/42-engines/01-duktape.md @@ -131,11 +131,11 @@ This demo was tested in the following deployments: | Architecture | Version | Date | |:-------------|:--------|:-----------| | `darwin-x64` | `2.7.0` | 2024-04-04 | -| `darwin-arm` | `2.7.0` | 2023-10-18 | +| `darwin-arm` | `2.7.0` | 2024-05-23 | | `win10-x64` | `2.7.0` | 2024-03-27 | | `win11-arm` | `2.7.0` | 2023-12-01 | | `linux-x64` | `2.7.0` | 2024-03-21 | -| `linux-arm` | `2.7.0` | 2023-12-01 | +| `linux-arm` | `2.7.0` | 2024-05-23 | ::: @@ -742,6 +742,7 @@ This demo was tested in the following deployments: | Architecture | Version | Zig | Date | |:-------------|:--------|:---------|:-----------| | `darwin-x64` | `2.7.0` | `0.11.0` | 2024-03-10 | +| `darwin-arm` | `2.7.0` | `0.12.0` | 2024-05-23 | | `win10-x64` | `2.7.0` | `0.11.0` | 2024-03-10 | | `linux-x64` | `2.7.0` | `0.12.0` | 2024-04-25 | @@ -763,11 +764,21 @@ project folder. +For Intel Mac: + ```bash curl -LO https://ziglang.org/download/0.12.0/zig-macos-x86_64-0.12.0.tar.xz -tar -xzf zig-macos-x86_64-0.12.0.tar.xz +tar -xzf zig-macos-*.tar.xz ``` +For ARM64 Mac: + +```bash +curl -LO https://ziglang.org/download/0.12.0/zig-macos-aarch64-0.12.0.tar.xz +tar -xzf zig-macos-*.tar.xz +``` + + @@ -800,7 +811,7 @@ unzip zig-windows-x86_64-0.12.0.zip ```bash -./zig-macos-x86_64-0.12.0/zig init +./zig-*/zig init ``` @@ -884,7 +895,7 @@ curl -L -o src/main.zig https://docs.sheetjs.com/duk/main.zig ```bash -./zig-macos-x86_64-0.12.0/zig build run -- pres.numbers +./zig-*/zig build run -- pres.numbers ``` diff --git a/docz/docs/03-demos/42-engines/04-jsc.md b/docz/docs/03-demos/42-engines/04-jsc.md index a86b080..45afab5 100644 --- a/docz/docs/03-demos/42-engines/04-jsc.md +++ b/docz/docs/03-demos/42-engines/04-jsc.md @@ -387,6 +387,7 @@ This demo was tested in the following environments: | Architecture | Version | Date | |:-------------|:-----------------|:-----------| | `darwin-x64` | `7618.1.15.14.7` | 2024-04-24 | +| `darwin-arm` | `7618.2.12.11.7` | 2024-05-24 | | `linux-x64` | `7618.1.15.14.7` | 2024-04-24 | ::: @@ -414,8 +415,8 @@ cd sheetjs-jsc 2) Download and extract the WebKit snapshot: ```bash -curl -LO https://codeload.github.com/WebKit/WebKit/zip/refs/tags/WebKit-7618.1.15.14.7 -mv WebKit-7618.1.15.14.7 WebKit.zip +curl -LO https://codeload.github.com/WebKit/WebKit/zip/refs/tags/WebKit-7618.2.12.11.7 +mv WebKit-7618.2.12.11.7 WebKit.zip unzip WebKit.zip ``` @@ -425,11 +426,24 @@ unzip WebKit.zip ```bash -cd WebKit-WebKit-7618.1.15.14.7 +cd WebKit-WebKit-7618.2.12.11.7 Tools/Scripts/build-webkit --jsc-only --cmakeargs="-DENABLE_STATIC_JSC=ON" cd .. ``` +:::danger pass + +When this demo was last tested on ARM64 macOS, JIT elicited runtime errors and +WebAssembly elicited compile-time errors. WebAssembly and JIT must be disabled: + +```bash +cd WebKit-WebKit-7618.2.12.11.7 +Tools/Scripts/build-webkit --jsc-only --cmakeargs="-DENABLE_STATIC_JSC=ON" --no-jit --no-webassembly +cd .. +``` + +::: + :::caution pass When this demo was tested on macOS, the build failed with the error message @@ -455,14 +469,37 @@ The referenced header file must be patched to declare `NSString`: namespace WTF { ``` +::: + +:::caution pass + +When this demo was tested on ARM64 macOS, the build failed with the error message + +``` +Source/JavaScriptCore/runtime/JSCBytecodeCacheVersion.cpp:37:10: fatal error: 'wtf/spi/darwin/dyldSPI.h' file not found +#include + ^~~~~~~~~~~~~~~~~~~~~~~~~~ +1 error generated. +``` + +The `#include` should be changed to a relative directive: + +```cpp title="Source/JavaScriptCore/runtime/JSCBytecodeCacheVersion.cpp (edit highlighted lines)" +#include +// highlight-start +#include "../../WTF/wtf/spi/darwin/dyldSPI.h" +// highlight-end +#endif +``` + ::: ```bash -cd WebKit-WebKit-7618.1.15.14.7 -env CFLAGS="-Wno-error=dangling-reference -Wno-dangling-reference" CXXFLAGS="-Wno-error=dangling-reference -Wno-dangling-reference" Tools/Scripts/build-webkit --jsc-only --cmakeargs="-Wno-error -DENABLE_STATIC_JSC=ON -DUSE_THIN_ARCHIVES=OFF -DCMAKE_C_FLAGS="-Wno-error -Wno-dangling-reference" -DCMAKE_CXX_FLAGS=-Wno-error -Wno-dangling-reference" --make-args="-j1 -Wno-error -Wno-error=dangling-reference" -j1 +cd WebKit-WebKit-7618.2.12.11.7 +env CFLAGS="-Wno-error=dangling-reference -Wno-dangling-reference" CXXFLAGS="-Wno-error=dangling-reference -Wno-dangling-reference" Tools/Scripts/build-webkit --jsc-only --cmakeargs="-Wno-error -DENABLE_STATIC_JSC=ON -DUSE_THIN_ARCHIVES=OFF -DCMAKE_C_FLAGS=\"-Wno-error -Wno-dangling-reference\" -DCMAKE_CXX_FLAGS=-Wno-error -Wno-dangling-reference" --make-args="-j1 -Wno-error -Wno-error=dangling-reference" -j1 cd .. ``` @@ -478,7 +515,7 @@ When this was last tested on the Steam Deck, the build ran for 24 minutes! 4) Create a symbolic link to the `Release` folder in the source tree: ```bash -ln -s WebKit-WebKit-7618.1.15.14.7/WebKitBuild/JSCOnly/Release/ . +ln -s WebKit-WebKit-7618.2.12.11.7/WebKitBuild/JSCOnly/Release/ . ``` 5) Download [`sheetjs-jsc.c`](pathname:///jsc/sheetjs-jsc.c): diff --git a/docz/docs/03-demos/42-engines/06-goja.md b/docz/docs/03-demos/42-engines/06-goja.md index c5adcfe..aa47a87 100644 --- a/docz/docs/03-demos/42-engines/06-goja.md +++ b/docz/docs/03-demos/42-engines/06-goja.md @@ -95,7 +95,7 @@ This demo was tested in the following deployments: | Architecture | Git Commit | Go version | Date | |:-------------|:-----------|:-----------|:-----------| | `darwin-x64` | `e401ed4` | `1.21.7` | 2024-04-25 | -| `darwin-arm` | `873a149` | `1.21.3` | 2023-10-18 | +| `darwin-arm` | `ccbae20` | `1.22.3` | 2024-05-23 | | `win10-x64` | `e401ed4` | `1.22.1` | 2024-03-24 | | `win11-arm` | `b396bb4` | `1.21.1` | 2023-12-01 | | `linux-x64` | `e401ed4` | `1.22.1` | 2024-03-21 | diff --git a/docz/docs/03-demos/42-engines/08-quickjs.md b/docz/docs/03-demos/42-engines/08-quickjs.md index a83a2fe..e509a14 100644 --- a/docz/docs/03-demos/42-engines/08-quickjs.md +++ b/docz/docs/03-demos/42-engines/08-quickjs.md @@ -27,7 +27,7 @@ command-line tool for reading data from files. :::note pass Many QuickJS functions are not documented. The explanation was verified against -the latest release (commit `6a89d7c`). +the latest release (commit `d378a9f`). ::: @@ -264,13 +264,13 @@ This demo was tested in the following deployments: | Architecture | Git Commit | Date | |:-------------|:-----------|:-----------| | `darwin-x64` | `6a89d7c` | 2024-03-15 | -| `darwin-arm` | `2788d71` | 2023-10-18 | +| `darwin-arm` | `d378a9f` | 2024-05-23 | | `win10-x64` | `9e561d5` | 2024-03-04 | | `win11-arm` | `03cc5ec` | 2023-12-01 | | `linux-x64` | `3b45d15` | 2024-04-25 | | `linux-arm` | `03cc5ec` | 2023-12-01 | -When the demo was tested, `3b45d15` was the HEAD commit on the `master` branch. +When the demo was tested, `d378a9f` was the HEAD commit on the `master` branch. ::: @@ -286,7 +286,7 @@ tests were run entirely within Windows Subsystem for Linux. ```bash git clone https://github.com/bellard/quickjs cd quickjs -git checkout 3b45d15 +git checkout d378a9f make cd .. ``` @@ -343,9 +343,9 @@ This demo was tested in the following environments: | Git Commit | Date | |:-----------|:-----------| -| `3b45d15` | 2024-04-25 | +| `d378a9f` | 2024-05-23 | -When the demo was tested, `3b45d15` was the HEAD commit on the `master` branch. +When the demo was tested, `d378a9f` was the HEAD commit on the `master` branch. ::: @@ -354,7 +354,7 @@ When the demo was tested, `3b45d15` was the HEAD commit on the `master` branch. ```bash git clone https://github.com/bellard/quickjs cd quickjs -git checkout 9e561d5 +git checkout d378a9f make cd .. cp quickjs/qjs . diff --git a/docz/docs/03-demos/42-engines/09-hermes.md b/docz/docs/03-demos/42-engines/09-hermes.md index 82e1db2..a8e1a8c 100644 --- a/docz/docs/03-demos/42-engines/09-hermes.md +++ b/docz/docs/03-demos/42-engines/09-hermes.md @@ -365,7 +365,7 @@ This demo was tested in the following deployments: | Architecture | Git Commit | Date | |:-------------|:-----------|:-----------| | `darwin-x64` | `d070c74` | 2024-04-25 | -| `darwin-arm` | `2b4f949` | 2023-10-18 | +| `darwin-arm` | `d070c74` | 2024-05-23 | | `linux-x64` | `d217af8` | 2024-03-21 | | `linux-arm` | `84732b3` | 2023-12-01 | diff --git a/docz/docs/03-demos/42-engines/20-chakra.md b/docz/docs/03-demos/42-engines/20-chakra.md index 2d865a3..7450000 100644 --- a/docz/docs/03-demos/42-engines/20-chakra.md +++ b/docz/docs/03-demos/42-engines/20-chakra.md @@ -133,7 +133,7 @@ This demo was tested in the following deployments: | Architecture | Git Commit | Date | |:-------------|:-----------|:-----------| | `darwin-x64` | `c3ead3f` | 2024-03-15 | -| `darwin-arm` | `c3ead3f` | 2023-10-19 | +| `darwin-arm` | `3a7b120` | 2024-05-23 | | `win10-x64` | `c3ead3f` | 2024-03-04 | | `linux-x64` | `1f6e17c` | 2024-04-25 | @@ -180,7 +180,7 @@ All commands in this demo should be run in a "Native Tools Command Prompt". ```bash git clone https://github.com/chakra-core/ChakraCore.git cd ChakraCore -git checkout 1f6e17c +git checkout 3a7b120 cd .. ``` @@ -411,7 +411,7 @@ If successful, the program will print the contents of the first sheet as CSV. :::note Tested Deployments -This demo was last tested on 2024-04-25 against `ch` commit `1f6e17c`. +This demo was last tested on 2024-05-23 against `ch` commit `3a7b120`. ::: diff --git a/docz/docs/03-demos/42-engines/21-boa.md b/docz/docs/03-demos/42-engines/21-boa.md index 772c56b..c858028 100644 --- a/docz/docs/03-demos/42-engines/21-boa.md +++ b/docz/docs/03-demos/42-engines/21-boa.md @@ -121,7 +121,7 @@ This demo was tested in the following deployments: | Architecture | Boa | Date | |:-------------|:---------|:-----------| | `darwin-x64` | `0.18.0` | 2024-04-25 | -| `darwin-arm` | `0.17.3` | 2023-10-20 | +| `darwin-arm` | `0.18.0` | 2024-05-23 | | `win10-x64` | `0.18.0` | 2024-04-25 | | `win11-arm` | `0.17.3` | 2023-12-01 | | `linux-x64` | `0.18.0` | 2024-03-21 | diff --git a/docz/docs/03-demos/42-engines/24-graaljs.md b/docz/docs/03-demos/42-engines/24-graaljs.md index b15f0bc..4dc806e 100644 --- a/docz/docs/03-demos/42-engines/24-graaljs.md +++ b/docz/docs/03-demos/42-engines/24-graaljs.md @@ -56,7 +56,7 @@ This demo was tested in the following deployments: |:--------|:--------|:-----------| | 22 | 24.0.0 | 2024-03-23 | | 21.0.2 | 24.0.0 | 2024-03-23 | -| 17.0.7 | 24.0.1 | 2024-04-25 | +| 17.0.8 | 24.0.1 | 2024-05-23 | ::: diff --git a/docz/docs/03-demos/42-engines/25-mujs.md b/docz/docs/03-demos/42-engines/25-mujs.md index 26f64d2..d8e9a75 100644 --- a/docz/docs/03-demos/42-engines/25-mujs.md +++ b/docz/docs/03-demos/42-engines/25-mujs.md @@ -323,6 +323,7 @@ This demo was tested in the following deployments: | Architecture | Version | Date | |:-------------|:--------|:-----------| | `darwin-x64` | `1.3.4` | 2024-04-21 | +| `darwin-arm` | `1.3.4` | 2024-05-23 | | `linux-x64` | `1.3.4` | 2024-04-21 | ::: diff --git a/docz/docs/09-miscellany/05-contributing.md b/docz/docs/09-miscellany/05-contributing.md index a8af40e..4b662e7 100644 --- a/docz/docs/09-miscellany/05-contributing.md +++ b/docz/docs/09-miscellany/05-contributing.md @@ -47,7 +47,7 @@ These instructions were tested on the following platforms: | MacOS 14.5 (ARM64) | `darwin-arm` | 2024-05-23 | | Windows 10 (x64) + WSL Ubuntu | `win10-x64` | 2024-04-04 | | Windows 11 (x64) + WSL Ubuntu | `win11-x64` | 2024-05-10 | -| Windows 11 (ARM) + WSL Ubuntu | `win11-arm` | 2023-09-18 | +| Windows 11 (ARM) + WSL Ubuntu | `win11-arm` | 2024-05-23 | With some additional dependencies, the unminified scripts are reproducible and tests will pass in Windows XP with NodeJS 5.10.0. @@ -69,13 +69,21 @@ A) Ensure WSL ("WSL 2" in Windows 10) and the Ubuntu distribution are installed.
Installation Notes (click to hide) -In "Turn Windows features on or off", the following features must be enabled: +In "Turn Windows features on or off", all available features from the following +list should be enabled: - "Hyper-V" (including every sub-feature) - "Virtual Machine Platform" - "Windows Hypervisor Platform" - "Windows Subsystem for Linux" +:::note pass + +The WSL requirements have changed over the years. To be safe, it is recommended +to install every listed feature that is available for the Windows version. + +::: + The following command installs Ubuntu within WSL: ```powershell diff --git a/docz/static/cli/Cargo.toml b/docz/static/cli/Cargo.toml index db095ce..87a4876 100644 --- a/docz/static/cli/Cargo.toml +++ b/docz/static/cli/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2021" [dependencies] -v8 = "0.88.0" +v8 = "0.92.0" [[bin]] name = "sheet2csv"