From a881bc89243ac8315e25458e6035610574d45716 Mon Sep 17 00:00:00 2001 From: SheetJS Date: Wed, 27 May 2026 22:51:38 -0400 Subject: [PATCH] demo refresh --- .../02-examples/06-loader.md | 62 ++++++- docz/docs/03-demos/01-math/09-danfojs.md | 2 +- docz/docs/03-demos/01-math/11-tensorflow.md | 2 +- .../docs/03-demos/02-frontend/07-angularjs.md | 4 +- docz/docs/03-demos/02-frontend/08-dojo.md | 2 +- docz/docs/03-demos/03-net/01-network/index.md | 2 +- docz/docs/03-demos/03-net/02-upload/index.md | 2 +- docz/docs/03-demos/04-grid/10-tabulator.md | 2 +- docz/docs/03-demos/19-desktop/01-electron.md | 2 +- docz/docs/03-demos/19-desktop/02-nwjs.md | 19 +-- docz/docs/03-demos/19-desktop/03-wails.md | 2 +- .../docs/03-demos/19-desktop/05-neutralino.md | 12 +- docz/docs/03-demos/20-cli/21-txiki.md | 52 ++---- docz/docs/03-demos/27-local/02-websql.md | 4 +- docz/docs/03-demos/27-local/05-clipboard.md | 8 +- .../03-demos/32-extensions/09-mathematica.md | 69 +++++--- docz/docs/03-demos/32-extensions/10-stata.md | 4 +- docz/docs/03-demos/32-extensions/11-matlab.md | 4 +- docz/docs/03-demos/42-engines/01-duktape.md | 17 +- docz/docs/03-demos/42-engines/08-quickjs.md | 6 +- docz/docs/03-demos/42-engines/09-hermes.md | 155 +++++++++++++----- tests/engines/duktape.sh | 2 +- 22 files changed, 278 insertions(+), 156 deletions(-) diff --git a/docz/docs/02-getting-started/02-examples/06-loader.md b/docz/docs/02-getting-started/02-examples/06-loader.md index 14e68d0..6da92f2 100644 --- a/docz/docs/02-getting-started/02-examples/06-loader.md +++ b/docz/docs/02-getting-started/02-examples/06-loader.md @@ -47,8 +47,9 @@ This demo was tested in the following configurations: | AMD RX 7900 XTX (24 GB VRAM) + Ryzen Z1 Extreme (16 GB RAM) | `linux-x64` | Ollama | 2025-11-15 | | Intel Arc B580 (12 GB VRAM) + Ryzen Z1 Extreme (24 GB RAM) | `win11-x64` | Ollama | 2025-11-15 | | Intel Arc B580 (12 GB VRAM) + Ryzen Z1 Extreme (16 GB RAM) | `linux-x64` | Ollama | 2025-11-15 | -| AMD RYZEN AI MAX+ 395 + Radeon 8060S (128 GB unified memory) | `linux-x64` | Ollama | 2025-11-15 | -| AMD RYZEN AI MAX+ 395 + Radeon 8060S (128 GB unified memory) | `win11-x64` | Ollama | 2025-11-15 | +| AMD Ryzen AI MAX+ 395 + Radeon 8060S (128 GB unified memory) | `linux-x64` | Ollama | 2025-11-15 | +| AMD Ryzen AI MAX+ 395 + Radeon 8060S (128 GB unified memory) | `win11-x64` | Ollama | 2025-11-15 | +| AMD Ryzen AI 9 HX 370 + Radeon 890M (64 GB unified memory) | `win11-x64` | `llama.cpp` | 2026-05-12 | | Apple M4 Max 16-Core CPU + 40-Core GPU (48 GB unified memory) | `darwin-arm` | Ollama | 2025-11-15 | SheetJS users have verified this demo in other configurations: @@ -60,6 +61,7 @@ SheetJS users have verified this demo in other configurations: |:---------------------------------------------------------------------|:-------------|:------------| | NVIDIA L40 (48 GB VRAM) + i9-13900K (32 GB RAM) | `linux-x64` | Ollama | | NVIDIA RTX 5090 (32 GB VRAM) + Ryzen AI Z2 Extreme (24 GB RAM) | `win11-x64` | Ollama | +| NVIDIA RTX 5090 Mobile (24 GB VRAM) + Ryzen Z1 Extreme (24 GB RAM) | `win11-x64` | `llama.cpp` | | NVIDIA RTX 4090 (24 GB VRAM) + Ryzen Z2 Go (32 GB RAM) | `win11-x64` | Ollama | | NVIDIA RTX 4090 (24 GB VRAM) + Ryzen Z2 Go (32 GB RAM) | `linux-x64` | Ollama | | NVIDIA RTX 4080 SUPER (16 GB VRAM) + Ryzen Z1 Extreme (16 GB RAM) | `win11-x64` | Ollama | @@ -962,6 +964,42 @@ Available devices: CUDA0: NVIDIA GeForce RTX 5090 (32606 MiB, 30994 MiB free) ``` + + +
+ AMD Instructions on Windows (click to show) + +[The `llamacpp-rocm` project](https://github.com/lemonade-sdk/llamacpp-rocm) +builds `llama.cpp` binaries with ROCm support. There are specific releases for +different families of GPUs. The following GPUs were tested: + +| Name | Identifier | +|:--------------------------|:-----------| +| Radeon 890M (Strix Point) | `gfx1150` | + +The Windows release artifact for the specific `gfx` version musta be downloaded. +For example, Strix Point uses `gfx1150`: + +```pwsh +cd ~/Downloads +mkdir llama +cd llama +curl.exe -LO https://github.com/lemonade-sdk/llamacpp-rocm/releases/download/b1265/llama-b1265-windows-rocm-gfx1150-x64.zip +Expand-Archive llama-*.zip -DestinationPath "." +``` + +If `llama.cpp` can detect relevant GPUs, `./llama-cli.exe --list-devices` will +list a ROCm device under "Available devices". The following output was captured +on a Strix Point machine: + +```text title="Devices detected by llama.cpp" +> ./llama-cli.exe --list-devices +... +Available devices: +// highlight-next-line + ROCm0: AMD Radeon(TM) 890M Graphics (26989 MiB, 26837 MiB free) +``` +
@@ -1122,6 +1160,14 @@ cd ~/Downloads/llama ./llama-server -m ./phi-4-Q4_K.gguf -ngl 99 --host 0.0.0.0 --port 11434 ``` +When the service is ready, the terminal will display: + +``` +main: server is listening on http://0.0.0.0:11434 +``` + +Leave this window running in the background. + 8) Serve the embedding model with `llama-server` in a new window: ```bash title="Serve nomic-embed-text (in a new window)" @@ -1129,7 +1175,15 @@ cd ~/Downloads/llama ./llama-server -m ./nomic-embed-text-v1.5.Q8_0.gguf -ngl 99 --host 0.0.0.0 --port 11433 --embeddings ``` -8) Edit `query.mjs` to use the local OpenAI-compatible servers: +When the service is ready, the terminal will display: + +``` +main: server is listening on http://0.0.0.0:11433 +``` + +Leave this window running in the background. + +9) Edit `query.mjs` to use the local OpenAI-compatible servers: ```js title="query.mjs (snippet, edit highlighted line)" // highlight-start @@ -1149,7 +1203,7 @@ const embeddings = new OpenAIEmbeddings({ apiKey: "not-needed", configuration: { // ... ``` -9) Run the demo script: +10) Run the demo script: diff --git a/docz/docs/03-demos/01-math/09-danfojs.md b/docz/docs/03-demos/01-math/09-danfojs.md index 547913b..b2b086c 100644 --- a/docz/docs/03-demos/01-math/09-danfojs.md +++ b/docz/docs/03-demos/01-math/09-danfojs.md @@ -23,7 +23,7 @@ This demo was tested in the following deployments: | Platform | Version | Date | |:-------------|:--------|:-----------| -| Chromium 137 | `1.2.0` | 2025-06-16 | +| Chromium 147 | `1.2.0` | 2026-05-22 | | Safari 18.5 | `1.2.0` | 2025-06-16 | | Konqueror 22 | `1.1.2` | 2025-04-23 | diff --git a/docz/docs/03-demos/01-math/11-tensorflow.md b/docz/docs/03-demos/01-math/11-tensorflow.md index 91c8dd1..7ad36fb 100644 --- a/docz/docs/03-demos/01-math/11-tensorflow.md +++ b/docz/docs/03-demos/01-math/11-tensorflow.md @@ -36,7 +36,7 @@ Each browser demo was tested in the following environments: | Browser | TF.js | Date | |:-------------|:----------|:-----------| -| Chromium 133 | `4.22.0` | 2025-04-21 | +| Chromium 147 | `4.22.0` | 2026-05-22 | | Safari 18.3 | `4.22.0` | 2025-04-21 | | Konqueror 22 | `4.22.0` | 2025-04-23 | diff --git a/docz/docs/03-demos/02-frontend/07-angularjs.md b/docz/docs/03-demos/02-frontend/07-angularjs.md index c64fd03..cc49ae9 100644 --- a/docz/docs/03-demos/02-frontend/07-angularjs.md +++ b/docz/docs/03-demos/02-frontend/07-angularjs.md @@ -36,9 +36,9 @@ This demo was tested in the following environments: | Browser | Version | Date | |:-------------|:------------------|:-----------| -| Chromium 133 | `1.8.2` (latest) | 2025-03-30 | +| Chromium 147 | `1.8.2` (latest) | 2026-05-22 | | Konqueror 22 | `1.8.2` (latest) | 2025-04-23 | -| Chromium 133 | `1.2.32` (legacy) | 2025-03-30 | +| Chromium 147 | `1.2.32` (legacy) | 2026-05-22 | ::: diff --git a/docz/docs/03-demos/02-frontend/08-dojo.md b/docz/docs/03-demos/02-frontend/08-dojo.md index 269e0a0..050d136 100644 --- a/docz/docs/03-demos/02-frontend/08-dojo.md +++ b/docz/docs/03-demos/02-frontend/08-dojo.md @@ -76,7 +76,7 @@ This demo was tested in the following environments: | Platform | Date | |:-------------|:-----------| -| Chromium 133 | 2025-03-30 | +| Chromium 147 | 2026-05-22 | | Konqueror 22 | 2025-04-23 | Demos exclusively using Dojo Core were tested using Dojo Toolkit `1.17.3`. diff --git a/docz/docs/03-demos/03-net/01-network/index.md b/docz/docs/03-demos/03-net/01-network/index.md index 72614eb..96dec14 100644 --- a/docz/docs/03-demos/03-net/01-network/index.md +++ b/docz/docs/03-demos/03-net/01-network/index.md @@ -90,7 +90,7 @@ Each browser demo was tested in the following environments: | Browser | Date | |:-------------|:-----------| -| Chromium 133 | 2025-03-30 | +| Chromium 147 | 2026-05-22 | | Safari 18.3 | 2025-03-30 | | Konqueror 22 | 2025-04-23 | diff --git a/docz/docs/03-demos/03-net/02-upload/index.md b/docz/docs/03-demos/03-net/02-upload/index.md index 0f69e66..1e75664 100644 --- a/docz/docs/03-demos/03-net/02-upload/index.md +++ b/docz/docs/03-demos/03-net/02-upload/index.md @@ -135,7 +135,7 @@ Each browser demo was tested in the following environments: | Browser | Date | |:-------------|:-----------| -| Chromium 133 | 2025-03-30 | +| Chromium 147 | 2026-05-22 | | Safari 18.3 | 2025-03-30 | | Konqueror 22 | 2025-04-23 | diff --git a/docz/docs/03-demos/04-grid/10-tabulator.md b/docz/docs/03-demos/04-grid/10-tabulator.md index 3ab874d..ba30ab7 100644 --- a/docz/docs/03-demos/04-grid/10-tabulator.md +++ b/docz/docs/03-demos/04-grid/10-tabulator.md @@ -24,7 +24,7 @@ This demo was tested in the following deployments: | Browser | Version | Date | |:-------------|:--------|:-----------| -| Chromium 133 | `6.3.1` | 2025-03-31 | +| Chromium 147 | `6.3.1` | 2026-05-22 | | Konqueror 22 | `6.3.1` | 2025-04-23 | ::: diff --git a/docz/docs/03-demos/19-desktop/01-electron.md b/docz/docs/03-demos/19-desktop/01-electron.md index 208da20..1c82b5e 100644 --- a/docz/docs/03-demos/19-desktop/01-electron.md +++ b/docz/docs/03-demos/19-desktop/01-electron.md @@ -240,7 +240,7 @@ This demo was tested in the following environments: |:---------------|:-------------|:---------|:-----------| | macOS 15.7.4 | `darwin-x64` | `40.8.0` | 2026-03-08 | | macOS 14.5 | `darwin-arm` | `35.1.2` | 2025-08-30 | -| Windows 11 | `win11-x64` | `33.2.1` | 2025-02-11 | +| Windows 11 | `win11-x64` | `40.8.0` | 2026-05-14 | | Windows 11 | `win11-arm` | `33.2.1` | 2025-02-23 | | Linux (Ubuntu) | `linux-x64` | `35.1.2` | 2025-07-06 | | Linux (Debian) | `linux-arm` | `33.2.1` | 2025-02-16 | diff --git a/docz/docs/03-demos/19-desktop/02-nwjs.md b/docz/docs/03-demos/19-desktop/02-nwjs.md index da0b18e..7ca1113 100644 --- a/docz/docs/03-demos/19-desktop/02-nwjs.md +++ b/docz/docs/03-demos/19-desktop/02-nwjs.md @@ -123,7 +123,7 @@ This demo was tested in the following environments: |:---------------|:-------------|:----------|:-----------|:---------------------| | macOS 15.3.2 | `darwin-x64` | `0.94.0` | 2025-03-31 | | | macOS 14.5 | `darwin-arm` | `0.94.0` | 2025-03-30 | | -| Windows 11 | `win11-x64` | `0.100.0` | 2025-05-27 | | +| Windows 11 | `win11-x64` | `0.111.3` | 2026-05-22 | | | Windows 11 | `win11-arm` | `0.94.0` | 2025-02-23 | | | Linux (Ubuntu) | `linux-x64` | `0.101.2` | 2025-07-06 | | | Linux (Debian) | `linux-arm` | `0.60.0` | 2025-02-16 | Unofficial build[^1] | @@ -145,8 +145,9 @@ cd sheetjs-nwjs "author": "sheetjs", "version": "0.0.0", "main": "index.html", + "window": { "icon": "" }, "dependencies": { - "nw": "0.101.2", + "nw": "0.111.3", "xlsx": "https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz" } }`} @@ -224,23 +225,11 @@ Unfortunately `nw-builder` will not be able to build a standalone program. 5) To build a standalone app, run the builder: ```bash -npx -p nw-builder@4.13.14 nwbuild --mode=build --version=0.101.2 --glob=false --outDir=../out ./ +npx -p nw-builder@4.17.10 nwbuild --mode=build --version=0.111.3 --glob=false --outDir=../out ./ ``` This will generate the standalone app in the `..\out\` folder. -:::caution pass - -There is a regression in `nw-builder` versions `4.12.0` and `4.13.14`. - -In local `win11-x64` testing, `4.11.6` generates the standalone application. - -```bash -npx -p nw-builder@4.11.6 nwbuild --mode=build --version=0.101.2 --glob=false --outDir=../out ./ -``` - -::: - 6) Launch the generated application: | Architecture | Command | diff --git a/docz/docs/03-demos/19-desktop/03-wails.md b/docz/docs/03-demos/19-desktop/03-wails.md index d89fd86..16eac1a 100644 --- a/docz/docs/03-demos/19-desktop/03-wails.md +++ b/docz/docs/03-demos/19-desktop/03-wails.md @@ -62,7 +62,7 @@ This demo was tested in the following environments: |:---------------|:-------------|:----------|:-----------| | macOS 15.3.2 | `darwin-x64` | `v2.10.1` | 2025-03-31 | | macOS 14.5 | `darwin-arm` | `v2.10.1` | 2025-03-30 | -| Windows 11 | `win11-x64` | `v2.10.1` | 2025-05-27 | +| Windows 11 | `win11-x64` | `v2.12.0` | 2026-05-26 | | Windows 11 | `win11-arm` | `v2.10` | 2025-02-23 | | Linux (HoloOS) | `linux-x64` | `v2.10.2` | 2025-07-06 | | Linux (Debian) | `linux-arm` | `v2.10` | 2025-02-16 | diff --git a/docz/docs/03-demos/19-desktop/05-neutralino.md b/docz/docs/03-demos/19-desktop/05-neutralino.md index a22d3a4..5fbb1ee 100644 --- a/docz/docs/03-demos/19-desktop/05-neutralino.md +++ b/docz/docs/03-demos/19-desktop/05-neutralino.md @@ -53,7 +53,7 @@ This demo was tested in the following environments: |:---------------|:-------------|:---------|:---------|:-----------| | macOS 15.3.2 | `darwin-x64` | `6.0.0` | `6.0.0` | 2025-03-31 | | macOS 14.5 | `darwin-arm` | `6.0.0` | `6.0.0` | 2025-03-30 | -| Windows 11 | `win11-x64` | `6.1.0` | `6.1.0` | 2025-05-27 | +| Windows 11 | `win11-x64` | `6.7.0` | `6.7.0` | 2026-05-26 | | Windows 11 | `win11-arm` | `5.6.0` | `5.6.0` | 2025-02-23 | | Linux (HoloOS) | `linux-x64` | `6.1.0` | `6.1.0` | 2025-07-06 | | Linux (Debian) | `linux-arm` | `5.6.0` | `5.6.0` | 2025-02-16 | @@ -232,7 +232,7 @@ sudo pacman -Syu webkit2gtk 1) Create a new NeutralinoJS app: ```bash -npx @neutralinojs/neu create sheetjs-neu +npx -y @neutralinojs/neu create sheetjs-neu cd sheetjs-neu ``` @@ -339,7 +339,7 @@ function showInfo() { 7) Run the app: ```bash -npx @neutralinojs/neu run +npx -y @neutralinojs/neu run ```

The app should print SheetJS Version {current}

@@ -358,7 +358,7 @@ npx @neutralinojs/neu run 9) Close the app. Run the app again: ```bash -npx @neutralinojs/neu run +npx -y @neutralinojs/neu run ``` When the app loads, a table should show in the main screen. @@ -397,7 +397,7 @@ async function exportData() { 11) Close the app. Run the app again: ```bash -npx @neutralinojs/neu run +npx -y @neutralinojs/neu run ``` When the app loads, click the "Import File" button and select a spreadsheet to @@ -422,7 +422,7 @@ save as `SheetJSNeu` will not automatically add the `.xlsx` extension! 12) Build production apps: ```bash -npx @neutralinojs/neu build +npx -y @neutralinojs/neu build ``` Platform-specific programs will be created in the `dist` folder: diff --git a/docz/docs/03-demos/20-cli/21-txiki.md b/docz/docs/03-demos/20-cli/21-txiki.md index 7ca627c..0b5c6ab 100644 --- a/docz/docs/03-demos/20-cli/21-txiki.md +++ b/docz/docs/03-demos/20-cli/21-txiki.md @@ -92,8 +92,8 @@ This demo was tested in the following deployments: |:-------------|:----------|:----------|:-----------| | `darwin-x64` | `24.12.0` | `793dd9d` | 2026-01-21 | | `darwin-arm` | `24.12.0` | `793dd9d` | 2026-01-18 | -| `win11-x64` | `24.12.0` | | 2026-03-08 | -| `win11-arm` | `24.12.0` | | 2025-04-19 | +| `win11-x64` | `26.4.0` | | 2026-05-26 | +| `win11-arm` | `26.4.0` | | 2026-05-26 | | `linux-x64` | `24.12.0` | `65e5595` | 2026-01-18 | | `linux-arm` | `24.12.0` | `65e5595` | 2026-01-21 | @@ -181,11 +181,18 @@ mv txiki-windows-x86_64\* . -1) Download the test file https://docs.sheetjs.com/pres.numbers: +1) Download the SheetJS Standalone script and test file. Move both files to the +project directory: -```bash + + +{`\ curl -LO https://docs.sheetjs.com/pres.numbers -``` +curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`} + :::note pass @@ -197,9 +204,10 @@ Invoke-WebRequest : A parameter cannot be found that matches parameter name 'LO' `curl.exe` must be invoked directly: -```bash +{`\ curl.exe -LO https://docs.sheetjs.com/pres.numbers -``` +curl.exe -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`} + ::: @@ -226,39 +234,13 @@ curl.exe -LO https://docs.sheetjs.com/txikijs/sheet2csv.js ::: -3) Download the SheetJS Standalone script and move to the project directory: - - - -{`\ -curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`} - - -:::note pass - -In PowerShell, the command may fail with a parameter error: - -``` -Invoke-WebRequest : A parameter cannot be found that matches parameter name 'LO'. -``` - -`curl.exe` must be invoked directly: - -{`\ -curl.exe -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js`} - - -::: - -4) Bundle the script: +3) Bundle the script: ```js npx -y esbuild sheet2csv.js --bundle --outfile=bundle.js --platform=neutral ``` -5) Compile and run `sheet2csv`: +4) Compile and run `sheet2csv`: ```bash ./tjs compile bundle.js sheet2csv diff --git a/docz/docs/03-demos/27-local/02-websql.md b/docz/docs/03-demos/27-local/02-websql.md index 60b2e40..5ce0bd7 100644 --- a/docz/docs/03-demos/27-local/02-websql.md +++ b/docz/docs/03-demos/27-local/02-websql.md @@ -159,13 +159,13 @@ This browser demo was tested in the following environments: | Browser | Date | |:-------------|:-----------| | Konqueror 22 | 2025-04-23 | -| Chromium 118 | 2025-03-30 | +| Chromium 118 | 2026-05-22 | Browsers that do not support WebSQL will throw errors: | Browser | Date | Error Message | |:-------------|:-----------|:------------------------------| -| Chromium 133 | 2025-03-30 | `openDatabase is not defined` | +| Chromium 147 | 2026-05-22 | `openDatabase is not defined` | | Safari 18.3 | 2025-03-30 | `Web SQL is deprecated` | | Firefox 136 | 2025-03-30 | `openDatabase is not defined` | diff --git a/docz/docs/03-demos/27-local/05-clipboard.md b/docz/docs/03-demos/27-local/05-clipboard.md index ecc1c8e..24029bf 100644 --- a/docz/docs/03-demos/27-local/05-clipboard.md +++ b/docz/docs/03-demos/27-local/05-clipboard.md @@ -22,10 +22,10 @@ Each browser demo was tested in the following environments: | Browser | Architecture | Date | Notes | |:-------------|:-------------|:-----------|:--------------------------------| -| Chromium 133 | `darwin-arm` | 2025-04-23 | | -| Safari 17.5 | `darwin-arm` | 2025-04-23 | `text/rtf` not supported | -| Chromium 116 | `win11-arm` | 2025-04-23 | | -| Edge 135 | `win11-arm` | 2025-04-23 | | +| Chromium 146 | `darwin-arm` | 2026-05-16 | `text/rtf` did not work | +| Safari 26.2 | `darwin-arm` | 2026-05-16 | `text/rtf` not supported | +| Chromium 147 | `win11-arm` | 2026-05-26 | | +| Edge 148 | `win11-arm` | 2026-05-26 | | | Chromium 135 | `linux-arm` | 2025-04-23 | | | Konqueror 22 | `linux-arm` | 2025-04-23 | `text/rtf`, files not supported | diff --git a/docz/docs/03-demos/32-extensions/09-mathematica.md b/docz/docs/03-demos/32-extensions/09-mathematica.md index 4b93a2f..9bd4135 100644 --- a/docz/docs/03-demos/32-extensions/09-mathematica.md +++ b/docz/docs/03-demos/32-extensions/09-mathematica.md @@ -30,7 +30,7 @@ This demo was tested by SheetJS users in the following deployments: | Architecture | Version | Date | |:-------------|:--------|:-----------| | `darwin-x64` | `14.1` | 2025-03-31 | -| `win11-x64` | `14.2` | 2025-05-21 | +| `win11-x64` | `14.2` | 2026-05-26 | ::: @@ -181,66 +181,85 @@ This demo tests the NodeJS external engine and dedicated command line tools. ### NodeJS Engine -0) Install NodeJS. When the demo was tested, version `20.19.2` was installed. +0) Install NodeJS. When the demo was tested, version `20.20.0` was installed. 1) Install dependencies in the Home folder (`~` or `$HOME` or `%HOMEPATH%`): {`\ -npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz zeromq@6.4.2`} +npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz zeromq@6.5.0`} -2) Open a new Mathematica Notebook and register NodeJS. When the example was -tested in Windows, the commands were: +2) Find the location of the `node` program. -```mathematica -RegisterExternalEvaluator["NodeJS","/usr/local/bin/node"] -FindExternalEvaluators["NodeJS"] -``` - -The second argument to `RegisterExternalEvaluator` should be the path to the -`node` program, which can be found by running the following command in a new -terminal window: +Run the following command in a new terminal window: ```bash which node ``` +When this demo was last tested, the path was `/usr/local/bin/node`. + -```mathematica -RegisterExternalEvaluator["NodeJS","C:\\Program Files\\nodejs\\node.exe"] -FindExternalEvaluators["NodeJS"] -``` - -The second argument to `RegisterExternalEvaluator` should be the path to the -`node.exe` program, which can be found by running the following command in a new -PowerShell window: +Run the following command in a new PowerShell window: ```powershell (Get-Command node.exe).Path ``` +When this demo was last tested, the path was `C:\Program Files\nodejs\node.exe`. + +3) Open a new Mathematica Notebook and register NodeJS. + +Copy the following snippet into the Mathematica window, replace the second +argument to `RegisterExternalEvaluator` with the path from the previous step, +and evaluate the block: + +```mathematica title="Register NodeJS (replace the path and run in Mathematica)" +RegisterExternalEvaluator["NodeJS","REPLACE_WITH_THE_PATH_TO_NODEJS"] +FindExternalEvaluators["NodeJS"] +``` + +:::caution pass + +Windows paths typically contain backslashes. They must be escaped. + +For example, if the path is `C:\Program Files\nodejs\node.exe`, the backslashes +must be doubled: + +```mathematica title="Correct way to use a path with backslashes in Mathematica" +RegisterExternalEvaluator["NodeJS","C:\\Program Files\\nodejs\\node.exe"] +``` + +The recommended approach is to copy the raw path from the PowerShell window, +select `REPLACE_WITH_THE_PATH_TO_NODEJS` (but not the surrounding quotes), and +paste. Mathematica will show a popup: + +![Popup when pasting text](pathname:///mathematica/PasteEscapeString.png) + +Press "Yes" in the popup and allow Mathematica to escape the string + +::: + If NodeJS is registered, the value in the "Registered" column will be "True". -4) Run `require("process").cwd()` from NodeJS: +4) Find the working directory for NodeJS scripts in the Mathematica evaluator: ```mathematica ExternalEvaluate["NodeJS", "require('process').cwd()"] ``` -The result is the working directory for NodeJS scripts - 5) Download [`pres.numbers`](https://docs.sheetjs.com/pres.numbers) and move the file to the folder from the previous result. -3) Copy, but do not run, the following snippet into the running notebook: +6) Copy, but do not run, the following snippet into the running notebook: diff --git a/docz/docs/03-demos/32-extensions/10-stata.md b/docz/docs/03-demos/32-extensions/10-stata.md index 247b30e..79281d5 100644 --- a/docz/docs/03-demos/32-extensions/10-stata.md +++ b/docz/docs/03-demos/32-extensions/10-stata.md @@ -55,7 +55,7 @@ This demo was tested in the following deployments: |:-------------|:------------------|:-----------| | `darwin-x64` | `18.5` (StataNow) | 2025-06-20 | | `darwin-arm` | `19.5` (StataNow) | 2026-03-13 | -| `win11-x64` | `18.5` (StataNow) | 2025-04-28 | +| `win11-x64` | `19.5` (StataNow) | 2026-05-14 | | `win11-arm` | `18.5` (StataNow) | 2025-02-23 | | `linux-x64` | `19.5` (StataNow) | 2025-07-06 | @@ -415,7 +415,7 @@ Inspect the output and confirm that `cleanfile.plugin` is listed. 13) Move to the `c:\data` directory in Stata: -```stata +```stata title="Move to the data directory (run in Stata)" cd c:\data ``` diff --git a/docz/docs/03-demos/32-extensions/11-matlab.md b/docz/docs/03-demos/32-extensions/11-matlab.md index d99e368..25746eb 100644 --- a/docz/docs/03-demos/32-extensions/11-matlab.md +++ b/docz/docs/03-demos/32-extensions/11-matlab.md @@ -30,7 +30,7 @@ This demo was tested by SheetJS users in the following deployments: | Architecture | Version | Date | |:-------------|:--------|:-----------| | `darwin-x64` | R2024b | 2025-03-31 | -| `win11-x64` | R2024b | 2025-05-10 | +| `win11-x64` | R2025b | 2026-05-26 | ::: @@ -197,7 +197,7 @@ flowchart LR 0) Launch MATLAB and run the following command to print the workspace folder: -```matlab +```matlab title="Show Matlab Workspace folder (run in MATLAB)" pwd ``` diff --git a/docz/docs/03-demos/42-engines/01-duktape.md b/docz/docs/03-demos/42-engines/01-duktape.md index 1b1fc22..6977372 100644 --- a/docz/docs/03-demos/42-engines/01-duktape.md +++ b/docz/docs/03-demos/42-engines/01-duktape.md @@ -130,7 +130,7 @@ This demo was tested in the following deployments: |:-------------|:--------|:-----------| | `darwin-x64` | `2.7.0` | 2026-01-21 | | `darwin-arm` | `2.7.0` | 2026-03-07 | -| `win11-x64` | `2.7.0` | 2025-04-28 | +| `win11-x64` | `2.7.0` | 2026-05-26 | | `win11-arm` | `2.7.0` | 2025-02-23 | | `linux-x64` | `2.7.0` | 2025-04-21 | | `linux-arm` | `2.7.0` | 2026-03-07 | @@ -908,7 +908,7 @@ This demo was tested in the following deployments: |:-------------|:--------|:---------|:-----------| | `darwin-x64` | `2.7.0` | `0.15.2` | 2026-01-20 | | `darwin-arm` | `2.7.0` | `0.15.2` | 2026-01-20 | -| `win11-x64` | `2.7.0` | `0.14.0` | 2025-04-28 | +| `win11-x64` | `2.7.0` | `0.15.2` | 2026-05-26 | | `win11-arm` | `2.7.0` | `0.13.0` | 2025-02-23 | | `linux-x64` | `2.7.0` | `0.14.0` | 2025-04-21 | | `linux-arm` | `2.7.0` | `0.15.2` | 2026-03-07 | @@ -977,8 +977,8 @@ The following commands should be run within WSL bash. For X64 Windows: ```bash -curl -LO https://ziglang.org/download/0.14.0/zig-windows-x86_64-0.14.0.zip -unzip zig-windows-x86_64-0.14.0.zip +curl -LO https://ziglang.org/download/0.15.2/zig-x86_64-windows-0.15.2.zip +unzip zig-x86_64-windows-0.15.2.zip ``` For ARM64 Windows: @@ -1017,7 +1017,7 @@ The following command should be run within Powershell. ::: ```bash -.\zig-windows-*\zig.exe init +.\zig-*\zig.exe init ``` @@ -1055,8 +1055,7 @@ mv *.js src`} ```zig title="build.zig (add highlighted lines)" const exe = b.addExecutable(.{ - .name = "sheetjs_zig", - .root_module = exe_mod, + // ... }); // highlight-start exe.addCSourceFile(.{ .file = b.path("duktape-2.7.0/src/duktape.c"), .flags = &.{ "-std=c99", "-fno-sanitize=undefined" } }); @@ -1111,7 +1110,7 @@ sudo pacman -Syu glibc linux-api-headers This command should be run in PowerShell: ```bash -.\zig-windows-*\zig.exe build run -- pres.numbers +.\zig-*\zig.exe build run -- pres.numbers ``` @@ -1272,7 +1271,7 @@ This demo was tested in the following deployments: |:-------------|:--------|:-----------| | `darwin-x64` | `2.2.1` | 2026-01-21 | | `darwin-arm` | `2.2.1` | 2026-03-07 | -| `win11-x64` | `2.2.1` | 2026-02-02 | +| `win11-x64` | `2.2.1` | 2026-05-26 | | `win11-arm` | `2.2.1` | 2026-05-09 | | `linux-x64` | `2.2.1` | 2026-01-08 | | `linux-arm` | `2.2.1` | 2026-03-07 | diff --git a/docz/docs/03-demos/42-engines/08-quickjs.md b/docz/docs/03-demos/42-engines/08-quickjs.md index 210c4b2..454ac78 100644 --- a/docz/docs/03-demos/42-engines/08-quickjs.md +++ b/docz/docs/03-demos/42-engines/08-quickjs.md @@ -265,7 +265,7 @@ This demo was tested in the following deployments: |:-------------|:-----------|:-----------|:-----------| | `darwin-x64` | QuickJS | `f113949` | 2026-01-21 | | `darwin-arm` | QuickJS | `f113949` | 2026-03-07 | -| `win11-x64` | QuickJS-NG | `4951c83` | 2025-04-18 | +| `win11-x64` | QuickJS-NG | `3adc8c9` | 2026-05-26 | | `win11-arm` | QuickJS-NG | `865ba1f` | 2025-04-18 | | `linux-x64` | QuickJS | `f113949` | 2026-03-08 | | `linux-arm` | QuickJS | `f113949` | 2026-03-07 | @@ -369,10 +369,10 @@ cd sheetjs-quick ```bash git clone https://github.com/quickjs-ng/quickjs cd quickjs -git checkout 4951c83 +git checkout 3adc8c9 cmake -B build -DQJS_BUILD_EXAMPLES=ON cmake --build build --config Release -build\Release\qjs.exe amalgam.js +build\qjs.exe amalgam.js cd .. ``` diff --git a/docz/docs/03-demos/42-engines/09-hermes.md b/docz/docs/03-demos/42-engines/09-hermes.md index d72c2e9..6f1d413 100644 --- a/docz/docs/03-demos/42-engines/09-hermes.md +++ b/docz/docs/03-demos/42-engines/09-hermes.md @@ -374,7 +374,7 @@ fork, which powers React Native for Windows, does have built-in support[^5] | Architecture | Git Commit | Date | |:-------------|:-----------|:-----------| -| `win11-x64` | `254fb48` | 2025-04-28 | +| `win11-x64` | `f9abcf6` | 2026-05-26 | | `win11-arm` | `4c64b05` | 2025-02-23 | The ["Windows Example"](#windows-example) covers `hermes-windows`. @@ -613,7 +613,7 @@ contents of the first sheet as CSV rows. :::info pass -The commands must be run in a "Native Tools Command Prompt". +The commands must be run in a VS 2022 "Native Tools Command Prompt". ::: @@ -625,15 +625,37 @@ The commands must be run in a "Native Tools Command Prompt". The build sequence requires Python, which can be installed from the official Windows installer[^7]. -Visual Studio with "Desktop development with C++" workload and CMake must be -installed[^8]. In addition, the following Spectre-mitigated libs must be added: +Visual Studio 2022 "Desktop development with C++" workload must be installed[^8]. -- MSVC C++ x64/x86 Spectre-mitigated libs (Latest) -- C++ ATL for latest build tools with Spectre Mitigations (x86 & x64) -- C++ MFC for latest build tools with Spectre Mitigations (x86 & x64) +The following VS 2022 "Individual components" must be added: -The easiest way to install is to select "Individual components" and search for -"spectre latest" (no quotation marks). Pick each option for the relevant CPU. +- C++ CMake tools for Windows +- C++/CLI support for v143 build tools (Latest) +- C++ Clang Compiler for Windows (19.1.5) +- MSBuild support for LLVM (clang-cl) toolset + +In addition, the architecture-specific Spectre-mitigated libs must be added: + + + + +- MSVC v143 - VS 2022 C++ x64/x86 Spectre-mitigated libs (Latest) +- C++ ATL for latest v143 build tools with Spectre Mitigations (x86 & x64) +- C++ MFC for latest v143 build tools with Spectre Mitigations (x86 & x64) + +Search for "spectre latest x64" (no quotation marks) and select each option. + + + + +- MSVC v143 - VS 2022 C++ ARM64/ARM64EC Spectre-mitigated libs (Latest) +- C++ ATL for latest v143 build tools with Spectre Mitigations (ARM64/ARM64EC) +- C++ MFC for latest v143 build tools with Spectre Mitigations (ARM64/ARM64EC) + +Search for "spectre latest arm64" (no quotation marks) and select each option. + + + @@ -693,7 +715,7 @@ cd sheetjs-hermes ```bash git clone https://github.com/microsoft/hermes-windows cd hermes-windows -git checkout 254fb48 +git checkout f9abcf6 cd .. ``` @@ -710,15 +732,70 @@ git config --global http.sslVerify true ::: -5) Build the library: +5) Patch the build structure to ensure MSVC flags are used in `clang-cl`. + +:::note pass + +The Hermes Windows fork switched to a new build structure that does not support +current MSVC build tools. The following patches force MSVC-style flags for use +with `clang-cl`. + +::: + +`API/jsi/jsi/CMakeLists.txt` should force `/EHsc`: + +```diff title="API/jsi/jsi/CMakeLists.txt (apply the following patch)" + if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" OR + "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") +- list(APPEND jsi_compile_flags "-Wno-non-virtual-dtor") ++ list(APPEND jsi_compile_flags "/EHsc") +elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC") +``` + +`cmake/modules/Hermes.cmake` should force MSVC-style flags: + +```diff title="cmake/modules/Hermes.cmake (apply the following patch)" + if (HERMES_ENABLE_EH) + if (GCC_COMPATIBLE) +- list(APPEND flags -fexceptions) ++ list(APPEND flags /EHsc) + elseif (MSVC) + list(APPEND flags /EHsc) + endif () + else () + if (GCC_COMPATIBLE) +- list(APPEND flags -fno-exceptions) ++ list(APPEND flags /EHs-c-) + elseif (MSVC) + list(APPEND flags /EHs-c-) + endif () + endif () + + if (HERMES_ENABLE_RTTI) + if (GCC_COMPATIBLE) +- list(APPEND flags -frtti) ++ list(APPEND flags /GR) + elseif (MSVC) + list(APPEND flags /GR) + endif () + else () + if (GCC_COMPATIBLE) +- list(APPEND flags -fno-rtti) ++ list(APPEND flags /GR-) + elseif (MSVC) + list(APPEND flags /GR-) + endif () + endif () +``` + +6) Build the library: ```bash -cd hermes-windows -powershell .\.ado\scripts\cibuild.ps1 -AppPlatform win32 -Platform x64 -ToolsPlatform x64 -cd .. +cmake -S hermes-windows -B build -G "Visual Studio 17 2022" -A x64 -T ClangCL -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Debug -DHERMES_ENABLE_EH=ON -DHERMES_ENABLE_RTTI=ON +cmake --build build --config Debug ``` :::note pass @@ -735,21 +812,15 @@ Set-ExecutionPolicy -ExecutionPolicy RemoteSigned ::: -:::info pass +:::note pass -In some test runs, the command failed when trying to copy `hermes.exe`: +The build may show a number of error messages involving exceptions: ``` -Copy-Item: C:\Users\Me\Documents\hermes-windows\.ado\scripts\cibuild.ps1:331 -Line | - 331 | Copy-Item "$compilerAndToolsBuildPath\bin\hermes.exe" -Destinatio … - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - | Cannot find path 'C:\Users\Me\Documents\hermes-windows\workspace\build\tools\bin\hermes.exe' - | because it does not exist. +error : cannot use 'try' with exceptions disabled ``` -The libraries are built first and the standalone binary is not needed when -embedding Hermes, so the error message can be safely ignored. +These errors can be ignored. ::: @@ -764,25 +835,24 @@ cmake --build ./build -6) Copy every generated `.lib` and `.dll` file into the main folder: +7) Copy every generated `.lib` and `.dll` file into the main folder: -```powershell +```cmd for /r build %f in (*.dll) do copy /Y "%f" . for /r build %f in (*.lib) do copy /Y "%f" . -for /r hermes-windows %f in (*.dll) do copy /Y "%f" . -for /r hermes-windows %f in (*.lib) do copy /Y "%f" . ``` -7) Download [`sheetjs-hermes.cpp`](pathname:///hermes/sheetjs-hermesw.cpp): +8) Download [`sheetjs-hermesw.cpp`](pathname:///hermes/sheetjs-hermesw.cpp): ```bash curl -o sheetjs-hermesw.cpp https://docs.sheetjs.com/hermes/sheetjs-hermesw.cpp ``` -8) Build the application: +9) Build the application: -```powershell -cl /MDd sheetjs-hermesw.cpp DbgHelp.lib *.lib /I hermes-windows\API /I hermes-windows\include /I hermes-windows\public\ /I hermes-windows\API\jsi icuuc.lib icuin.lib +```cmd +cl /std:c++17 /EHsc /MTd /Zi /I hermes-windows\API /I hermes-windows\public /I hermes-windows\API\jsi /c sheetjs-hermesw.cpp +link /OUT:sheetjs-hermesw.exe /DEBUG sheetjs-hermesw.obj *.lib winmm.lib ``` :::info pass @@ -790,18 +860,27 @@ cl /MDd sheetjs-hermesw.cpp DbgHelp.lib *.lib /I hermes-windows\API /I hermes-wi In some test runs, the build failed due to duplicate symbols: ``` -hermesVMRuntimeLean.lib(Runtime.obj) : error LNK2005: "private: __cdecl hermes::vm::Runtime::Runtime(class std::shared_ptr,class hermes::vm::RuntimeConfig const &)" (??0Runtime@vm@hermes@@AEAA@V?$shared_ptr@VStorageProvider@vm@hermes@@@std@@AEBVRuntimeConfig@12@@Z) already defined in hermesVMRuntime.lib(Runtime.obj) +hermesvmlean_a.lib(StaticHUnit.obj) : error LNK2005: _sh_unit_init_guarded already defined in hermesvm.lib(hermesvm.dll) ``` -The lean libraries should be manually removed: +Libraries with duplicate symbols should be manually removed: ```pwsh -del *ean.lib +del hermesvm.lib hermesvm.dll hermesvmlean.lib hermesvmlean.dll +``` + +After deleting the libraries, delete the `sheetjs-hermesw` artifacts and build: + +```cmd +del sheetjs-hermesw.* +curl -o sheetjs-hermesw.cpp https://docs.sheetjs.com/hermes/sheetjs-hermesw.cpp +cl /std:c++17 /EHsc /MTd /Zi /I hermes-windows\API /I hermes-windows\public /I hermes-windows\API\jsi /c sheetjs-hermesw.cpp +link /OUT:sheetjs-hermesw.exe /DEBUG sheetjs-hermesw.obj *.lib winmm.lib ``` ::: -9) Download the SheetJS Standalone script and the test file. Save both files in +10) Download the SheetJS Standalone script and the test file. Save both files in the project directory:
    @@ -814,7 +893,7 @@ curl -o xlsx.full.min.js https://cdn.sheetjs.com/xlsx-${current}/package/dist/xl curl -o pres.numbers https://docs.sheetjs.com/pres.numbers`} -10) Run the application: +11) Run the application: ```bash .\sheetjs-hermesw.exe pres.numbers @@ -1006,4 +1085,4 @@ If successful, the script will print CSV data from the test file. [^4]: See [`sheet_to_csv` in "Utilities"](/docs/api/utilities/csv#csv-output) [^5]: See [`microsoft/hermes-windows`](https://github.com/microsoft/hermes-windows) on GitHub [^7]: See ["Download Python"](https://www.python.org/downloads/) in the Python website. When the demo was last tested, Python 3.11.9 was installed. -[^8]: See [the Visual Studio website](https://visualstudio.microsoft.com/#vs-section) for download links. +[^8]: The VS 2022 link was removed from the download page. https://aka.ms/vs/17/release/vs_BuildTools.exe is a direct link. diff --git a/tests/engines/duktape.sh b/tests/engines/duktape.sh index 82e8f32..ef565aa 100755 --- a/tests/engines/duktape.sh +++ b/tests/engines/duktape.sh @@ -16,7 +16,7 @@ curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js curl -LO https://docs.sheetjs.com/pres.numbers curl -LO https://docs.sheetjs.com/duk/sheetjs.duk.c -gcc -std=c99 -Wall -osheetjs.duk sheetjs.duk.c duktape.c -lm +gcc -std=c99 -Wall -o sheetjs.duk sheetjs.duk.c duktape.c -lm ./sheetjs.duk pres.numbers npx -y xlsx-cli sheetjsw.xlsb