diff --git a/docz/data/engines.xls b/docz/data/engines.xls index 6a83401..fb4591b 100644 --- a/docz/data/engines.xls +++ b/docz/data/engines.xls @@ -1,10 +1,6 @@ - + 10620 11020 @@ -24,21 +20,21 @@ + - +
@@ -62,7 +58,7 @@ ARM - Duktape + Duktape C @@ -72,7 +68,7 @@ - V8 + V8 C++ @@ -82,27 +78,27 @@ - Rhino + Rhino Java - - + + - JSC + JSC C++ - + - Jint + Jint C# @@ -112,7 +108,7 @@ - Goja + Goja Go @@ -122,17 +118,17 @@ - Nashorn + Nashorn Java - - + + - QuickJS + QuickJS C @@ -142,7 +138,7 @@ - Hermes + Hermes C++ @@ -152,7 +148,7 @@ - ChakraCore + ChakraCore C++ @@ -162,7 +158,7 @@ - Boa + Boa Rust @@ -172,17 +168,17 @@ - JE + JE Perl - + - JerryScript + JerryScript C @@ -192,24 +188,24 @@ - GraalJS + GraalJS Java - - + + - MuJS + MuJS C - +
@@ -238,8 +234,7 @@
- +
@@ -263,47 +258,47 @@ ARM - Duktape + Duktape Perl - + - Duktape + Duktape PHP - + - Duktape + Duktape Python - + - Duktape + Duktape Zig - - - + + + - V8 + V8 Rust @@ -313,7 +308,7 @@ - JSC + JSC Swift @@ -323,7 +318,7 @@ - ExecJS + ExecJS Ruby diff --git a/docz/docs/03-demos/19-desktop/05-neutralino.md b/docz/docs/03-demos/19-desktop/05-neutralino.md index 2beeb87..b97486e 100644 --- a/docz/docs/03-demos/19-desktop/05-neutralino.md +++ b/docz/docs/03-demos/19-desktop/05-neutralino.md @@ -193,7 +193,7 @@ This demo was tested in the following environments: | OS and Version | Architecture | Server | Client | Date | |:---------------|:-------------|:---------|:---------|:-----------| | macOS 14.4 | `darwin-x64` | `5.0.0` | `5.0.1` | 2024-03-15 | -| macOS 14.0 | `darwin-arm` | `4.14.1` | `3.12.0` | 2023-10-18 | +| macOS 14.5 | `darwin-arm` | `5.1.0` | `5.1.0` | 2024-05-25 | | Windows 10 | `win10-x64` | `5.1.0` | `5.1.0` | 2024-03-24 | | Windows 11 | `win11-arm` | `4.14.1` | `3.12.0` | 2023-12-01 | | Linux (HoloOS) | `linux-x64` | `5.0.0` | `5.0.1` | 2024-03-21 | @@ -336,7 +336,11 @@ npx @neutralinojs/neu run })(); ``` -9) Close the app and relaunch the app with `npx @neutralinojs/neu run` +9) Close the app. Run the app again: + +```bash +npx @neutralinojs/neu run +``` When the app loads, a table should show in the main screen. @@ -371,7 +375,11 @@ async function exportData() { } ``` -11) Close the app and re-run with `npx @neutralinojs/neu run` +11) Close the app. Run the app again: + +```bash +npx @neutralinojs/neu run +``` When the app loads, click the "Import File" button and select a spreadsheet to see the contents. @@ -398,8 +406,13 @@ save as `SheetJSNeu` will not automatically add the `.xlsx` extension! npx @neutralinojs/neu build ``` -Platform-specific programs will be created in the `dist` folder. For example, -the `darwin-arm` program will be `./dist/sheetjs-neu/sheetjs-neu-mac_arm64` +Platform-specific programs will be created in the `dist` folder: + +| Platform | Path to binary | +|:-------------|:-------------------------------------------| +| `darwin-arm` | `./dist/sheetjs-neu/sheetjs-neu-mac_arm64` | + +Run the generated app and confirm that Presidential data is displayed. [^1]: See [`nativeAllowList`](https://neutralino.js.org/docs/configuration/neutralino.config.json#nativeallowlist-string) in the NeutralinoJS documentation [^2]: See [`os.showOpenDialog`](https://neutralino.js.org/docs/api/os#osshowopendialogtitle-options) in the NeutralinoJS documentation diff --git a/docz/docs/03-demos/19-desktop/06-reactnative.md b/docz/docs/03-demos/19-desktop/06-reactnative.md index 6a17956..f0de457 100644 --- a/docz/docs/03-demos/19-desktop/06-reactnative.md +++ b/docz/docs/03-demos/19-desktop/06-reactnative.md @@ -48,7 +48,7 @@ This demo was tested in the following environments: |:---------------|:-------------|:------------|:-----------| | Windows 10 | `win10-x64` | `v0.73.11` | 2024-03-24 | | Windows 11 | `win11-x64` | `v0.72.12` | 2023-10-14 | -| Windows 11 | `win11-arm` | `v0.72.20` | 2023-12-01 | +| Windows 11 | `win11-arm` | `v0.74.5` | 2024-05-25 | | MacOS 14.4 | `darwin-x64` | `v0.73.22` | 2024-03-24 | | MacOS 14.1.2 | `darwin-arm` | `v0.72.11` | 2023-12-01 | @@ -424,10 +424,10 @@ setup instructions" to find instructions for manual installation. ### Project Setup -1) Create a new project using React Native `0.73.6`: +1) Create a new project using React Native `0.74.1`: ```bash -npx react-native init SheetJSWin --template react-native@0.73.6 +npx react-native init SheetJSWin --template react-native@0.74.1 cd SheetJSWin ``` diff --git a/docz/docs/03-demos/20-cli/23-deno.md b/docz/docs/03-demos/20-cli/23-deno.md index 779e68c..5b6f97e 100644 --- a/docz/docs/03-demos/20-cli/23-deno.md +++ b/docz/docs/03-demos/20-cli/23-deno.md @@ -102,10 +102,10 @@ This demo was last tested in the following deployments: | `darwin-x64` | `1.43.1` | 2024-05-08 | | `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 | +| `win11-x64` | `1.43.6` | 2024-05-25 | +| `win11-arm` | `1.43.6` | 2024-05-25 | | `linux-x64` | `1.41.3` | 2024-03-18 | -| `linux-arm` | `1.38.4` | 2023-12-01 | +| `linux-arm` | `1.43.6` | 2024-05-25 | ::: diff --git a/docz/docs/03-demos/20-cli/index.md b/docz/docs/03-demos/20-cli/index.md index 9bcc0df..fa7f517 100644 --- a/docz/docs/03-demos/20-cli/index.md +++ b/docz/docs/03-demos/20-cli/index.md @@ -90,7 +90,7 @@ This demo was tested in the following deployments: | Architecture | Version | NodeJS | Source | Date | |:-------------|:-------------|:----------|:----------|:-----------| | `darwin-x64` | `4.0.0-rc.4` | `14.15.3` | Pre-built | 2024-03-15 | -| `darwin-arm` | `4.0.0-rc.2` | `18.18.0` | Compiled | 2023-12-01 | +| `darwin-arm` | `4.0.0-rc.6` | `18.20.3` | Compiled | 2024-05-25 | | `win10-x64` | `4.0.0-rc.4` | `14.15.3` | Pre-built | 2024-04-18 | | `win11-arm` | `4.0.0-rc.2` | `20.10.0` | Compiled | 2023-12-01 | | `linux-x64` | `4.0.0-rc.4` | `14.15.3` | Pre-built | 2024-03-21 | @@ -102,7 +102,7 @@ This demo was tested in the following deployments: | Architecture | Version | NodeJS | Date | |:-------------|:--------|:---------|:-----------| | `darwin-x64` | `5.8.1` | `18.5.0` | 2024-03-15 | -| `darwin-arm` | `5.8.1` | `18.5.0` | 2023-12-01 | +| `darwin-arm` | `5.8.1` | `18.5.0` | 2024-05-25 | | `win10-x64` | `5.8.1` | `18.5.0` | 2024-04-18 | | `win11-arm` | `5.8.1` | `18.5.0` | 2023-12-01 | | `linux-x64` | `5.8.1` | `18.5.0` | 2024-03-21 | @@ -114,7 +114,7 @@ This demo was tested in the following deployments: | Architecture | Version | NodeJS | Date | |:-------------|:--------|:----------|:-----------| | `darwin-x64` | `2.4.0` | `21.7.1` | 2024-03-15 | -| `darwin-arm` | `2.3.0` | `21.3.0` | 2023-12-01 | +| `darwin-arm` | `2.4.3` | `22.2.0` | 2024-05-25 | | `win10-x64` | `2.4.2` | `16.20.2` | 2024-04-18 | | `linux-x64` | `2.4.0` | `21.7.1` | 2024-03-21 | | `linux-arm` | `2.3.0` | `21.3.0` | 2023-12-01 | @@ -372,7 +372,7 @@ This demo was last tested in the following deployments: | `darwin-x64` | `12.3.219.9` | `0.88.0` | 2024-03-15 | | `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 | +| `win11-x64` | `12.6.228.3` | `0.92.0` | 2024-05-23 | | `linux-x64` | `12.3.219.9` | `0.88.0` | 2024-03-18 | | `linux-arm` | `12.0.267.8` | `0.82.0` | 2023-12-01 | diff --git a/docz/docs/03-demos/32-extensions/01-extendscript.md b/docz/docs/03-demos/32-extensions/01-extendscript.md index f520a73..b80c4b8 100644 --- a/docz/docs/03-demos/32-extensions/01-extendscript.md +++ b/docz/docs/03-demos/32-extensions/01-extendscript.md @@ -422,7 +422,7 @@ If the InDesign version does not support UXP, a tooltip shows a message: > This file is not executable by any supported script language. -It is strongly recommended to upgrade to InDesign 2023. +[ExtendScript](#extendscript) should be used when UXP is not supported. ::: diff --git a/docz/docs/03-demos/42-engines/01-duktape.md b/docz/docs/03-demos/42-engines/01-duktape.md index 4684bc1..d9c01a3 100644 --- a/docz/docs/03-demos/42-engines/01-duktape.md +++ b/docz/docs/03-demos/42-engines/01-duktape.md @@ -133,7 +133,7 @@ This demo was tested in the following deployments: | `darwin-x64` | `2.7.0` | 2024-04-04 | | `darwin-arm` | `2.7.0` | 2024-05-23 | | `win10-x64` | `2.7.0` | 2024-03-27 | -| `win11-arm` | `2.7.0` | 2023-12-01 | +| `win11-arm` | `2.7.0` | 2024-05-25 | | `linux-x64` | `2.7.0` | 2024-03-21 | | `linux-arm` | `2.7.0` | 2024-05-23 | @@ -404,11 +404,12 @@ file, prints CSV rows from the first worksheet, and creates a XLSB workbook. This demo was tested in the following deployments: -| Architecture | Version | PHP Version | Date | -|:-------------|:--------|:------------|:-----------| -| `darwin-x64` | `2.7.0` | `8.3.4` | 2024-03-15 | -| `darwin-arm` | `2.7.0` | `8.3.2` | 2024-02-13 | -| `linux-x64` | `2.7.0` | `8.2.7` | 2024-03-21 | +| Architecture | Version | PHP | Date | +|:-------------|:--------|:---------|:-----------| +| `darwin-x64` | `2.7.0` | `8.3.4` | 2024-03-15 | +| `darwin-arm` | `2.7.0` | `8.3.2` | 2024-02-13 | +| `linux-x64` | `2.7.0` | `8.2.7` | 2024-03-21 | +| `linux-arm` | `2.7.0` | `8.2.18` | 2024-05-25 | ::: @@ -441,6 +442,13 @@ extension=ffi If this line is prefixed with a `;`, remove the semicolon. If this line does not appear in the file, add it to the end. +:::note pass + +On Linux and macOS, the file may be owned by the `root` user. If writing the +file fails with a normal user account, use `sudo` to launch the text editor. + +::: + 3) Build the Duktape shared library: ```bash @@ -543,6 +551,7 @@ This demo was tested in the following deployments: | `darwin-x64` | `2.7.0` | `3.12.2` | 2024-03-15 | | `darwin-arm` | `2.7.0` | `3.11.7` | 2024-02-13 | | `linux-x64` | `2.7.0` | `3.11.3` | 2024-03-21 | +| `linux-arm` | `2.7.0` | `3.11.2` | 2024-05-25 | ::: @@ -634,6 +643,37 @@ python3 SheetJSDuk.py pres.numbers If the program succeeded, the CSV contents will be printed to console and the file `sheetjsw.xlsb` will be created. That file can be opened with Excel. +:::caution pass + +In some tests, the command failed with an `OSError` message. + +The fix is to explicitly add `./` to the `lib` variable in `SheetJSDuk.py`: + + + + +The name of the library is `libduktape.207.20700.so`: + +```python title="SheetJSDuk.py (change highlighted line)" +# highlight-next-line +lib = "./libduktape.207.20700.so" +``` + + + + +The name of the library is `libduktape.so.207.20700`: + +```python title="SheetJSDuk.py (change highlighted line)" +# highlight-next-line +lib = "./libduktape.so.207.20700" +``` + + + + +::: + ### Zig :::caution Zig support is considered experimental. @@ -744,7 +784,9 @@ This demo was tested in the following deployments: | `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 | +| `win11-arm` | `2.7.0` | `0.12.0` | 2024-05-25 | | `linux-x64` | `2.7.0` | `0.12.0` | 2024-04-25 | +| `linux-arm` | `2.7.0` | `0.12.0` | 2024-05-25 | On Windows, due to incompatibilities between WSL and PowerShell, some commands must be run in WSL Bash. @@ -764,7 +806,7 @@ project folder. -For Intel Mac: +For X64 Mac: ```bash curl -LO https://ziglang.org/download/0.12.0/zig-macos-x86_64-0.12.0.tar.xz @@ -782,10 +824,20 @@ tar -xzf zig-macos-*.tar.xz +For X64 Linux: + ```bash curl -LO https://ziglang.org/download/0.12.0/zig-linux-x86_64-0.12.0.tar.xz -xz -d zig-linux-x86_64-0.12.0.tar.xz -tar -xf zig-linux-x86_64-0.12.0.tar +xz -d zig-linux-*.tar.xz +tar -xf zig-linux-*.tar +``` + +For AArch64 Linux: + +```bash +curl -LO https://ziglang.org/download/0.12.0/zig-linux-aarch64-0.12.0.tar.xz +xz -d zig-linux-*.tar.xz +tar -xf zig-linux-*.tar ``` @@ -797,9 +849,18 @@ The following commands should be run within WSL bash. ::: +For X64 Windows: + ```bash curl -LO https://ziglang.org/download/0.12.0/zig-windows-x86_64-0.12.0.zip unzip zig-windows-x86_64-0.12.0.zip +``` + +For ARM64 Windows: + +```bash +curl -LO https://ziglang.org/download/0.12.0/zig-windows-aarch64-0.12.0.zip +unzip zig-windows-aarch64-0.12.0.zip ``` @@ -818,7 +879,7 @@ unzip zig-windows-x86_64-0.12.0.zip ```bash -./zig-linux-x86_64-0.12.0/zig init +./zig-*/zig init ``` @@ -831,7 +892,7 @@ The following command should be run within Powershell. ::: ```bash -.\zig-windows-x86_64-0.12.0\zig.exe init +.\zig-windows-*\zig.exe init ``` @@ -902,7 +963,7 @@ curl -L -o src/main.zig https://docs.sheetjs.com/duk/main.zig ```bash -./zig-linux-x86_64-0.12.0/zig build run -- pres.numbers +./zig-*/zig build run -- pres.numbers ``` :::caution pass @@ -924,8 +985,10 @@ sudo pacman -Syu glibc linux-api-headers +This command should be run in PowerShell: + ```bash -.\zig-windows-x86_64-0.12.0\zig.exe build run -- pres.numbers +.\zig-windows-*\zig.exe build run -- pres.numbers ``` @@ -956,6 +1019,7 @@ This demo was tested in the following deployments: | `darwin-x64` | `2.2.0` | 2024-03-15 | | `darwin-arm` | `2.2.0` | 2024-02-13 | | `linux-x64` | `2.2.0` | 2024-03-21 | +| `linux-arm` | `2.2.0` | 2024-05-25 | ::: diff --git a/docz/docs/03-demos/42-engines/02-v8.md b/docz/docs/03-demos/42-engines/02-v8.md index 72bf1e6..5196908 100644 --- a/docz/docs/03-demos/42-engines/02-v8.md +++ b/docz/docs/03-demos/42-engines/02-v8.md @@ -125,10 +125,10 @@ This demo was tested in the following deployments: | V8 Version | Platform | OS Version | Compiler | Date | |:--------------|:-------------|:--------------|:-----------------|:-----------| | `12.4.253` | `darwin-x64` | macOS 14.4 | `clang 15.0.0` | 2024-03-15 | -| `12.1.283` | `darwin-arm` | macOS 14.1.2 | `clang 15.0.0` | 2023-12-01 | +| `12.7.130` | `darwin-arm` | macOS 14.5 | `clang 15.0.0` | 2024-05-25 | | `12.5.48` | `win10-x64` | Windows 10 | `CL 19.39.33523` | 2024-03-24 | | `12.5.48` | `linux-x64` | HoloOS 3.5.17 | `gcc 13.1.1` | 2024-03-21 | -| `11.8.82` | `linux-arm` | Debian 12 | `gcc 12.2.0` | 2023-12-01 | +| `12.7.130` | `linux-arm` | Debian 12 | `gcc 12.2.0` | 2024-05-25 | ::: @@ -162,7 +162,7 @@ cd /usr/local/lib :::note pass -If this step throws a permission error, run: +If this step throws a permission error, run the following commands: ```bash sudo mkdir -p /usr/local/lib @@ -226,7 +226,7 @@ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git :::note pass -If this step throws a permission error, run: +If this step throws a permission error, run the following commands and retry: ```bash sudo mkdir -p /usr/local/lib @@ -406,11 +406,11 @@ The recommended fix is to delete the referenced folder and re-run `gclient sync` -5) Checkout the desired version. The following command pulls `12.5.48`: +5) Checkout the desired version. The following command pulls `12.7.130`: ```bash -git checkout tags/12.5.48 -b sample +git checkout tags/12.7.130 -b sample ``` :::caution pass @@ -418,14 +418,14 @@ git checkout tags/12.5.48 -b sample The official documentation recommends: ```bash -git checkout refs/tags/12.5.48 -b sample -t +git checkout refs/tags/12.7.130 -b sample -t ``` This command failed in local testing: ``` -E:\v8\v8>git checkout refs/tags/12.5.48 -b sample -t -fatal: cannot set up tracking information; starting point 'refs/tags/12.5.48' is not a branch +E:\v8\v8>git checkout refs/tags/12.7.130 -b sample -t +fatal: cannot set up tracking information; starting point 'refs/tags/12.7.130' is not a branch ``` ::: @@ -502,6 +502,37 @@ Run the build: ninja -C out.gn/arm64.release.sample v8_monolith ``` +:::caution pass + +When this demo was last tested, an assertion failed: + +``` +../../src/base/small-vector.h: In instantiation of ‘class v8::base::SmallVector, 16>’: +../../src/compiler/turboshaft/loop-unrolling-reducer.h:577:11: required from here +../../src/base/macros.h:215:55: error: static assertion failed: T should be trivially copyable + 215 | static_assert(::v8::base::is_trivially_copyable::value, \ + | ^~~~~ +../../src/base/small-vector.h:25:3: note: in expansion of macro ‘ASSERT_TRIVIALLY_COPYABLE’ + 25 | ASSERT_TRIVIALLY_COPYABLE(T); + | ^~~~~~~~~~~~~~~~~~~~~~~~~ +``` + +The build passed after disabling the assertions: + +```cpp title="src/base/small-vector.h (edit highlighted lines)" + class SmallVector { + // Currently only support trivially copyable and trivially destructible data + // types, as it uses memcpy to copy elements and never calls destructors. + // highlight-start + //ASSERT_TRIVIALLY_COPYABLE(T); + //static_assert(std::is_trivially_destructible::value); + // highlight-end + + public: + static constexpr size_t kInlineSize = kSize; +``` +::: + @@ -587,11 +618,24 @@ ld: multiple errors: unknown file type in '/Users/test/dev/v8/v8/out.gn/x64.rele ```bash g++ -I. -Iinclude samples/hello-world.cc -o hello_world -fno-rtti -lv8_monolith \ - -lv8_libbase -lv8_libplatform -ldl -Lout.gn/arm64.release.sample/obj/ -pthread \ + -ldl -Lout.gn/arm64.release.sample/obj/ -pthread \ -std=c++17 -DV8_COMPRESS_POINTERS=1 -DV8_ENABLE_SANDBOX ./hello_world ``` +:::info pass + +In older V8 versions, the flags `-lv8_libbase -lv8_libplatform` were required. + +Linking against `libv8_libbase` or `libv8_libplatform` in V8 version `12.4.253` +elicited linker errors: + +``` +ld: multiple errors: unknown file type in '/Users/test/dev/v8/v8/out.gn/x64.release.sample/obj/libv8_libplatform.a'; unknown file type in '/Users/test/dev/v8/v8/out.gn/x64.release.sample/obj/libv8_libbase.a' +``` + +::: + @@ -864,10 +908,10 @@ This demo was last tested in the following deployments: | Architecture | V8 Crate | Date | |:-------------|:---------|:-----------| | `darwin-x64` | `0.89.0` | 2024-04-04 | -| `darwin-arm` | `0.82.0` | 2023-12-01 | +| `darwin-arm` | `0.92.0` | 2024-05-25 | | `win10-x64` | `0.89.0` | 2024-03-24 | | `linux-x64` | `0.91.0` | 2024-04-25 | -| `linux-arm` | `0.82.0` | 2023-12-01 | +| `linux-arm` | `0.92.0` | 2024-05-25 | ::: diff --git a/docz/docs/03-demos/42-engines/03-rhino.md b/docz/docs/03-demos/42-engines/03-rhino.md index 1aa6502..8ef963a 100644 --- a/docz/docs/03-demos/42-engines/03-rhino.md +++ b/docz/docs/03-demos/42-engines/03-rhino.md @@ -1,5 +1,6 @@ --- -title: Java + Rhino +title: Taming Data with Rhino +sidebar_label: Java + Rhino pagination_prev: demos/bigdata/index pagination_next: solutions/input --- @@ -11,11 +12,11 @@ import CodeBlock from '@theme/CodeBlock'; Rhino is an ES3+ engine in Java. -The [SheetJS Standalone scripts](/docs/getting-started/installation/standalone) -can be parsed and evaluated in a Rhino context. +[SheetJS](https://sheetjs.com) is a JavaScript library for reading and writing +data from spreadsheets. -This demo wraps workbooks and sheets into separate Java classes. The final -result is a JAR. +The ["Complete Example"](#complete-example) section includes a complete Java +command-line tool for reading data from spreadsheets and printing CSV rows. :::caution pass @@ -30,8 +31,19 @@ This demo was tested in the following deployments: | OpenJDK | Rhino | Date | |:--------|:---------|:-----------| | 22 | `1.7.14` | 2024-04-04 | -| 21.0.2 | `1.7.14` | 2024-04-25 | -| 17.0.10 | `1.7.14` | 2024-03-25 | +| 21.0.3 | `1.7.15` | 2024-05-24 | +| 20.0.2 | `1.7.15` | 2024-05-25 | +| 19.0.2 | `1.7.15` | 2024-05-25 | +| 18.0.2 | `1.7.15` | 2024-05-25 | +| 17.0.11 | `1.7.15` | 2024-05-25 | +| 16.0.1 | `1.7.15` | 2024-05-25 | +| 15.0.10 | `1.7.15` | 2024-05-25 | +| 14.0.2 | `1.7.15` | 2024-05-25 | +| 13.0.14 | `1.7.15` | 2024-05-25 | +| 12.0.2 | `1.7.15` | 2024-05-25 | +| 11.0.22 | `1.7.15` | 2024-05-25 | +| 10.0.2 | `1.7.15` | 2024-05-25 | +| 9 | `1.7.15` | 2024-05-25 | | 1.8.0 | `1.7.14` | 2024-04-25 | ::: @@ -49,6 +61,9 @@ context.setOptimizationLevel(-1); ::: +The [SheetJS Standalone scripts](/docs/getting-started/installation/standalone) +can be parsed and evaluated in a Rhino context. + Binary strings can be passed back and forth. _Initialize Rhino_ @@ -144,7 +159,7 @@ cd sheetjs-java 2) Download the Rhino JAR and rename to `rhino.jar`: ``` -curl -L -o rhino.jar https://repo1.maven.org/maven2/org/mozilla/rhino/1.7.14/rhino-1.7.14.jar +curl -L -o rhino.jar https://repo1.maven.org/maven2/org/mozilla/rhino/1.7.15/rhino-1.7.15.jar ``` 3) Download the SheetJS Standalone script and the test file. Save both files in diff --git a/docz/docs/03-demos/42-engines/04-jsc.md b/docz/docs/03-demos/42-engines/04-jsc.md index 45afab5..6680bbc 100644 --- a/docz/docs/03-demos/42-engines/04-jsc.md +++ b/docz/docs/03-demos/42-engines/04-jsc.md @@ -9,6 +9,9 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import CodeBlock from '@theme/CodeBlock'; +export const r = {style: {color:"red"}}; +export const B = {style: {fontWeight:"bold"}}; + [JavaScriptCore](https://developer.apple.com/documentation/javascriptcore) (JSC) is the JavaScript engine powering the Safari web browser. @@ -389,6 +392,7 @@ This demo was tested in the following environments: | `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 | +| `linux-arm` | `7618.2.12.11.7` | 2024-05-25 | ::: @@ -503,10 +507,50 @@ env CFLAGS="-Wno-error=dangling-reference -Wno-dangling-reference" CXXFLAGS="-Wn cd .. ``` -:::danger pass +:::caution pass When this was last tested on the Steam Deck, the build ran for 24 minutes! +::: + +:::danger pass + +When this demo was last tested on ARM64, there was a dangling pointer error: + +
+WebKitBuild/JSCOnly/Release/WTF/Headers/wtf/SentinelLinkedList.h:61:55: error: storing the address of local variable ‘toBeRemoved’ in ‘{"*"}MEM[(struct BasicRawSentinelNode {"*"} const &)this_4(D) + 96].WTF::BasicRawSentinelNode<JSC::CallLinkInfoBase>::m_next’ [-Werror=dangling-pointer=]
+{"   61 |"}     void setNext(BasicRawSentinelNode* next) {"{"} m_next = next; {"}"}
+{"      |"}                                                ~~~~~~~^~~~~~
+
+ +The error can be suppressed with a preprocessor pragma: + +```cpp title="WebKitBuild/JSCOnly/Release/WTF/Headers/wtf/SentinelLinkedList.h (add highlighted lines)" + BasicRawSentinelNode() = default; + +// highlight-start +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdangling-pointer" +// highlight-end + + void setPrev(BasicRawSentinelNode* prev) { m_prev = prev; } + void setNext(BasicRawSentinelNode* next) { m_next = next; } + +// highlight-next-line +#pragma GCC diagnostic pop + + + T* prev() const { return static_cast(PtrTraits::unwrap(m_prev)); } +``` + +After patching the header, JSC must be built without WebAssembly or JIT support: + +```bash +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 --no-jit --no-webassembly +cd .. +``` + :::
diff --git a/docz/docs/03-demos/42-engines/05-jint.md b/docz/docs/03-demos/42-engines/05-jint.md index 22652fc..328529f 100644 --- a/docz/docs/03-demos/42-engines/05-jint.md +++ b/docz/docs/03-demos/42-engines/05-jint.md @@ -161,14 +161,14 @@ System.IO.File.WriteAllBytes("SheetJSJint.xlsb", outfile); This demo was tested in the following deployments: -| Architecture | Jint Version | Date | -|:-------------|:------------------|:-----------| -| `darwin-x64` | `3.0.1` | 2024-03-15 | -| `darwin-arm` | `3.0.0-beta-2056` | 2023-12-01 | -| `win10-x64` | `3.1.0` | 2024-04-17 | -| `win11-arm` | `3.0.0-beta-2056` | 2023-12-01 | -| `linux-x64` | `3.1.0` | 2024-04-25 | -| `linux-arm` | `3.0.0-beta-2056` | 2023-12-01 | +| Architecture | Jint | Date | +|:-------------|:--------|:-----------| +| `darwin-x64` | `3.0.1` | 2024-03-15 | +| `darwin-arm` | `3.1.2` | 2024-05-25 | +| `win10-x64` | `3.1.0` | 2024-04-17 | +| `win11-arm` | `3.1.2` | 2024-05-25 | +| `linux-x64` | `3.1.0` | 2024-04-25 | +| `linux-arm` | `3.1.2` | 2024-05-25 | ::: @@ -248,7 +248,7 @@ dotnet run ```bash dotnet nuget add source https://www.myget.org/F/jint/api/v3/index.json -dotnet add package Jint --version 3.1.0 +dotnet add package Jint --version 3.1.2 ``` To verify Jint is installed, replace `Program.cs` with the following: diff --git a/docz/docs/03-demos/42-engines/06-goja.md b/docz/docs/03-demos/42-engines/06-goja.md index aa47a87..4c2b046 100644 --- a/docz/docs/03-demos/42-engines/06-goja.md +++ b/docz/docs/03-demos/42-engines/06-goja.md @@ -97,9 +97,9 @@ This demo was tested in the following deployments: | `darwin-x64` | `e401ed4` | `1.21.7` | 2024-04-25 | | `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 | +| `win11-arm` | `ccbae20` | `1.22.3` | 2024-05-25 | | `linux-x64` | `e401ed4` | `1.22.1` | 2024-03-21 | -| `linux-arm` | `b396bb4` | `1.21.4` | 2023-12-01 | +| `linux-arm` | `ccbae20` | `1.19.8` | 2024-05-25 | At the time of writing, Goja did not have proper version numbers. Versions are identified by Git commit hashes. diff --git a/docz/docs/03-demos/42-engines/07-nashorn.md b/docz/docs/03-demos/42-engines/07-nashorn.md index db35194..ba62882 100644 --- a/docz/docs/03-demos/42-engines/07-nashorn.md +++ b/docz/docs/03-demos/42-engines/07-nashorn.md @@ -106,7 +106,7 @@ This demo was tested in the following deployments: | OpenJDK | Nashorn | Date | |:--------|:----------------|:-----------| | 22 | 15.4 standalone | 2024-03-23 | -| 21.0.2 | 15.4 standalone | 2024-03-23 | +| 21.0.3 | 15.4 standalone | 2024-05-24 | | 20.0.2 | 15.4 standalone | 2024-03-23 | | 19.0.2 | 15.4 standalone | 2024-03-23 | | 18.0.2 | 15.4 standalone | 2024-03-23 | diff --git a/docz/docs/03-demos/42-engines/08-quickjs.md b/docz/docs/03-demos/42-engines/08-quickjs.md index e509a14..76d83d7 100644 --- a/docz/docs/03-demos/42-engines/08-quickjs.md +++ b/docz/docs/03-demos/42-engines/08-quickjs.md @@ -266,9 +266,9 @@ This demo was tested in the following deployments: | `darwin-x64` | `6a89d7c` | 2024-03-15 | | `darwin-arm` | `d378a9f` | 2024-05-23 | | `win10-x64` | `9e561d5` | 2024-03-04 | -| `win11-arm` | `03cc5ec` | 2023-12-01 | +| `win11-arm` | `d378a9f` | 2024-05-25 | | `linux-x64` | `3b45d15` | 2024-04-25 | -| `linux-arm` | `03cc5ec` | 2023-12-01 | +| `linux-arm` | `d378a9f` | 2024-05-25 | When the demo was tested, `d378a9f` was the HEAD commit on the `master` branch. diff --git a/docz/docs/03-demos/42-engines/09-hermes.md b/docz/docs/03-demos/42-engines/09-hermes.md index a8e1a8c..d69cc8d 100644 --- a/docz/docs/03-demos/42-engines/09-hermes.md +++ b/docz/docs/03-demos/42-engines/09-hermes.md @@ -367,7 +367,7 @@ This demo was tested in the following deployments: | `darwin-x64` | `d070c74` | 2024-04-25 | | `darwin-arm` | `d070c74` | 2024-05-23 | | `linux-x64` | `d217af8` | 2024-03-21 | -| `linux-arm` | `84732b3` | 2023-12-01 | +| `linux-arm` | `d070c74` | 2024-05-25 | The main Hermes source tree does not have Windows support. The `hermes-windows` fork, which powers React Native for Windows, does have built-in support[^5] @@ -405,6 +405,12 @@ On Debian and Ubuntu: sudo apt install cmake git ninja-build libicu-dev python zip libreadline-dev ``` +:::note pass + +When using virtual machines, Linux builds require at least 8 GB memory. + +::: + 1) Make a project directory: diff --git a/docz/docs/03-demos/42-engines/15-rb.md b/docz/docs/03-demos/42-engines/15-rb.md index c386e7c..46baa48 100644 --- a/docz/docs/03-demos/42-engines/15-rb.md +++ b/docz/docs/03-demos/42-engines/15-rb.md @@ -71,13 +71,15 @@ This demo was tested in the following deployments: | Platform | Ruby | ExecJS | Date | |:-------------|:---------|:--------|:-----------| | `darwin-x64` | `2.6.10` | `2.9.1` | 2024-04-25 | -| `darwin-arm` | `2.6.10` | `2.9.1` | 2023-12-01 | +| `darwin-arm` | `2.6.10` | `2.9.1` | 2024-05-25 | | `win10-x64` | `3.2.3` | `2.9.1` | 2024-03-10 | -| `win11-arm` | `3.0.2` | `2.9.1` | 2023-12-01 | +| `win11-arm` | `3.0.2` | `2.9.1` | 2024-05-25 | | `linux-x64` | `3.0.5` | `2.9.1` | 2024-03-21 | -| `linux-arm` | `2.7.4` | `2.9.1` | 2023-12-01 | +| `linux-arm` | `3.1.2` | `2.9.1` | 2024-05-25 | -**Note: The Windows 11 ARM64 test used the Ruby version that ships with WSL.** +When the demo was last tested, there was no official Ruby release for Windows +on ARM. The `win11-arm` test was run in WSL. The `win10-x64` test used the +official Ruby for Windows x64 release. ::: diff --git a/docz/docs/03-demos/42-engines/21-boa.md b/docz/docs/03-demos/42-engines/21-boa.md index c858028..b204524 100644 --- a/docz/docs/03-demos/42-engines/21-boa.md +++ b/docz/docs/03-demos/42-engines/21-boa.md @@ -123,9 +123,21 @@ This demo was tested in the following deployments: | `darwin-x64` | `0.18.0` | 2024-04-25 | | `darwin-arm` | `0.18.0` | 2024-05-23 | | `win10-x64` | `0.18.0` | 2024-04-25 | -| `win11-arm` | `0.17.3` | 2023-12-01 | +| `win11-arm` | `0.18.0` | 2024-05-25 | | `linux-x64` | `0.18.0` | 2024-03-21 | -| `linux-arm` | `0.17.3` | 2023-12-01 | +| `linux-arm` | `0.18.0` | 2024-05-25 | + +::: + +0) Install Rust. + +:::caution pass + +Boa `0.18.0` requires Rust version `1.67` or later. + +Debian 12 (Bullseye) ships with Rust version `1.63.0`. + +It is strongly recommended to install Rust from the official distribution. ::: diff --git a/docz/docs/03-demos/42-engines/22-perl.md b/docz/docs/03-demos/42-engines/22-perl.md index a7bd3a5..a6a3768 100644 --- a/docz/docs/03-demos/42-engines/22-perl.md +++ b/docz/docs/03-demos/42-engines/22-perl.md @@ -102,14 +102,21 @@ write_file("SheetJE.fods", $fods); :::note Tested Deployments -This demo was tested on 2024-02-13 against JE 0.066 +This demo was tested in the following deployments: + +| Architecture | Version | Date | +|:-------------|:--------|:-----------| +| `darwin-x64` | `0.066` | 2024-02-13 | +| `darwin-arm` | `0.066` | 2024-05-25 | +| `linux-x64` | `0.066` | 2024-02-13 | +| `linux-arm` | `0.066` | 2024-05-25 | ::: -1) Install `JE` through CPAN: +1) Install `JE` and `File::Slurp` through CPAN: ```bash -cpan install JE +cpan install JE File::Slurp ``` 2) Download the [ExtendScript build](/docs/getting-started/installation/extendscript): diff --git a/docz/docs/03-demos/42-engines/23-jerryscript.md b/docz/docs/03-demos/42-engines/23-jerryscript.md index 09b5dfe..307e9bb 100644 --- a/docz/docs/03-demos/42-engines/23-jerryscript.md +++ b/docz/docs/03-demos/42-engines/23-jerryscript.md @@ -36,12 +36,12 @@ This demo was tested in the following environments: | Architecture | Commit | Date | |:-------------|:----------|:-----------| -| `darwin-x64` | `47bd5d4` | 2024-04-25 | -| `darwin-arm` | `ef4cb2b` | 2023-12-08 | +| `darwin-x64` | `35465ed` | 2024-05-25 | +| `darwin-arm` | `35465ed` | 2024-05-25 | | `win10-x64` | `47bd5d4` | 2024-04-14 | -| `win11-arm` | `ef4cb2b` | 2023-12-08 | +| `win11-arm` | `35465ed` | 2024-05-25 | | `linux-x64` | `cefd391` | 2024-03-21 | -| `linux-arm` | `ef4cb2b` | 2023-12-08 | +| `linux-arm` | `35465ed` | 2024-05-25 | The Windows tests were run in WSL. @@ -413,17 +413,6 @@ as a Base64 string and directly add it to an amalgamated script. 0) Build the library and command line tool with required options. -:::info pass - -The "Integration Example" builds JerryScript. The CLI test must be run from the -repo folder. - -```bash -cd jerryscript -``` - -::: - If the "Integration Example" was not tested, run the following commands: ```bash @@ -432,6 +421,12 @@ cd jerryscript python3 tools/build.py --error-messages=ON --logging=ON --mem-heap=8192 --cpointer-32bit=ON ``` +If the "Integration Example" was tested, enter the `jerryscript` folder: + +```bash +cd jerryscript +``` + 1) Download the SheetJS Standalone script, shim script and test file. Move all three files to the `jerryscript` cloned repo directory: diff --git a/docz/docs/03-demos/42-engines/24-graaljs.md b/docz/docs/03-demos/42-engines/24-graaljs.md index 4dc806e..61ad0ad 100644 --- a/docz/docs/03-demos/42-engines/24-graaljs.md +++ b/docz/docs/03-demos/42-engines/24-graaljs.md @@ -54,9 +54,12 @@ This demo was tested in the following deployments: | OpenJDK | GraalJS | Date | |:--------|:--------|:-----------| -| 22 | 24.0.0 | 2024-03-23 | -| 21.0.2 | 24.0.0 | 2024-03-23 | -| 17.0.8 | 24.0.1 | 2024-05-23 | +| 22 | 24.0.1 | 2024-05-25 | +| 21.0.3 | 24.0.1 | 2024-05-25 | +| 20.0.2 | 24.0.1 | 2024-05-25 | +| 19.0.2 | 24.0.1 | 2024-05-25 | +| 18.0.2 | 24.0.1 | 2024-05-25 | +| 17.0.10 | 24.0.1 | 2024-05-25 | ::: diff --git a/docz/docs/03-demos/42-engines/25-mujs.md b/docz/docs/03-demos/42-engines/25-mujs.md index d8e9a75..2e8c3a8 100644 --- a/docz/docs/03-demos/42-engines/25-mujs.md +++ b/docz/docs/03-demos/42-engines/25-mujs.md @@ -322,9 +322,10 @@ This demo was tested in the following deployments: | Architecture | Version | Date | |:-------------|:--------|:-----------| -| `darwin-x64` | `1.3.4` | 2024-04-21 | +| `darwin-x64` | `1.3.4` | 2024-05-25 | | `darwin-arm` | `1.3.4` | 2024-05-23 | | `linux-x64` | `1.3.4` | 2024-04-21 | +| `linux-arm` | `1.3.4` | 2024-05-25 | ::: diff --git a/docz/static/reactnative/rnw.png b/docz/static/reactnative/rnw.png index 01a7226..fc834fb 100644 Binary files a/docz/static/reactnative/rnw.png and b/docz/static/reactnative/rnw.png differ diff --git a/tests/engines-boa.sh b/tests/engines-boa.sh new file mode 100755 index 0000000..faec581 --- /dev/null +++ b/tests/engines-boa.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# https://docs.sheetjs.com/docs/demos/engines/boa + +cd /tmp +rm -rf sheetjs-boa + +cargo new sheetjs-boa +cd sheetjs-boa +cargo run; echo $? + +cargo add boa_engine + +curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js +curl -LO https://sheetjs.com/pres.xlsx + +curl -L -o src/main.rs https://docs.sheetjs.com/boa/main.rs +cargo run --release; echo $? \ No newline at end of file diff --git a/tests/engines-execjs.sh b/tests/engines-execjs.sh new file mode 100755 index 0000000..09d7094 --- /dev/null +++ b/tests/engines-execjs.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# https://docs.sheetjs.com/docs/demos/engines/rb +cd /tmp +rm -rf sheetjs-rb +mkdir -p sheetjs-rb +cd sheetjs-rb + +curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js +curl -LO https://sheetjs.com/pres.numbers + +curl -LO https://docs.sheetjs.com/execjs/ExecSheetJS.rb + +ruby ExecSheetJS.rb pres.numbers; echo $? \ No newline at end of file diff --git a/tests/engines-goja.sh b/tests/engines-goja.sh new file mode 100755 index 0000000..97aef42 --- /dev/null +++ b/tests/engines-goja.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# https://docs.sheetjs.com/docs/demos/engines/goja + +cd /tmp +rm -rf SheetGoja + +mkdir SheetGoja +cd SheetGoja +go mod init SheetGoja +go get github.com/dop251/goja + +curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/shim.min.js +curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js +curl -LO https://sheetjs.com/pres.numbers + +curl -LO https://docs.sheetjs.com/goja/SheetGoja.go + +go build SheetGoja.go + +./SheetGoja pres.numbers diff --git a/tests/engines-graaljs.sh b/tests/engines-graaljs.sh new file mode 100755 index 0000000..2ad0f0f --- /dev/null +++ b/tests/engines-graaljs.sh @@ -0,0 +1,38 @@ +#!/bin/bash +# https://docs.sheetjs.com/docs/demos/engines/graaljs +cd /tmp +rm -rf sheetjs-graaljs +mkdir -p sheetjs-graaljs +cd sheetjs-graaljs + +curl -LO "https://repo1.maven.org/maven2/org/graalvm/js/js-scriptengine/24.0.1/js-scriptengine-24.0.1.jar" +curl -LO "https://repo1.maven.org/maven2/org/graalvm/js/js-language/24.0.1/js-language-24.0.1.jar" +curl -LO "https://repo1.maven.org/maven2/org/graalvm/polyglot/polyglot/24.0.1/polyglot-24.0.1.jar" +curl -LO "https://repo1.maven.org/maven2/org/graalvm/sdk/collections/24.0.1/collections-24.0.1.jar" +curl -LO "https://repo1.maven.org/maven2/org/graalvm/truffle/truffle-api/24.0.1/truffle-api-24.0.1.jar" +curl -LO "https://repo1.maven.org/maven2/org/graalvm/sdk/nativeimage/24.0.1/nativeimage-24.0.1.jar" +curl -LO "https://repo1.maven.org/maven2/org/graalvm/shadowed/icu4j/24.0.1/icu4j-24.0.1.jar" +curl -LO "https://repo1.maven.org/maven2/org/graalvm/regex/regex/24.0.1/regex-24.0.1.jar" + +curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js +curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/shim.min.js +curl -LO https://sheetjs.com/pres.xlsx + +curl -LO https://docs.sheetjs.com/nashorn/SheetJSNashorn.java + +for n in {17..22}; do + export JAVA_HOME=`/usr/libexec/java_home -v $n` + java -version + rm -fr SheetJSNashorn.class SheetJSNashorn.jar sheethorn + javac SheetJSNashorn.java + + java -cp ".:js-scriptengine-24.0.1.jar:js-language-24.0.1.jar:polyglot-24.0.1.jar:collections-24.0.1.jar:truffle-api-24.0.1.jar:nativeimage-24.0.1.jar:icu4j-24.0.1.jar:regex-24.0.1.jar" -Dpolyglot.js.nashorn-compat=true SheetJSNashorn pres.xlsx + + jar -cf SheetJSNashorn.jar SheetJSNashorn.class xlsx.full.min.js shim.min.js + + mkdir -p sheethorn + cp *.jar pres.xlsx sheethorn + cd sheethorn + java -cp ".:js-scriptengine-24.0.1.jar:js-language-24.0.1.jar:polyglot-24.0.1.jar:collections-24.0.1.jar:truffle-api-24.0.1.jar:nativeimage-24.0.1.jar:icu4j-24.0.1.jar:regex-24.0.1.jar:SheetJSNashorn.jar" -Dpolyglot.js.nashorn-compat=true SheetJSNashorn pres.xlsx + cd - +done \ No newline at end of file diff --git a/tests/engines-hermes.sh b/tests/engines-hermes.sh new file mode 100755 index 0000000..d768070 --- /dev/null +++ b/tests/engines-hermes.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# https://docs.sheetjs.com/docs/demos/engines/hermes + +cd /tmp +rm -rf sheetjs-hermes +mkdir -p sheetjs-hermes +cd sheetjs-hermes + +curl -LO https://docs.sheetjs.com/hermes/Makefile +curl -LO https://docs.sheetjs.com/hermes/sheetjs-hermes.cpp + +make init + +make sheetjs-hermes + +curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js +curl -LO https://sheetjs.com/pres.numbers + +cp ./build_release/API/hermes/libhermes.* . +cp ./build_release/jsi/libjsi.* . + +./sheetjs-hermes pres.numbers; echo $? diff --git a/tests/engines-jerryscript.sh b/tests/engines-jerryscript.sh new file mode 100755 index 0000000..979f6dd --- /dev/null +++ b/tests/engines-jerryscript.sh @@ -0,0 +1,37 @@ +#!/bin/bash +# https://docs.sheetjs.com/docs/demos/engines/jerryscript +cd /tmp +rm -rf SheetJSJerry +mkdir -p SheetJSJerry +cd SheetJSJerry + +git clone --depth=1 https://github.com/jerryscript-project/jerryscript.git +cd jerryscript +python3 tools/build.py --error-messages=ON --logging=ON --mem-heap=8192 --cpointer-32bit=ON +cd .. + +curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js +curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/shim.min.js +curl -LO https://sheetjs.com/pres.xlsx + +# Integration Example +curl -LO https://docs.sheetjs.com/jerryscript/sheetjs.jerry.c + +gcc -o sheetjs.jerry -Ijerryscript/jerry-ext/include -Ijerryscript/jerry-math/include -Ijerryscript/jerry-core/include sheetjs.jerry.c -ljerry-core -ljerry-ext -ljerry-port -lm -Ljerryscript/build/lib -Wno-pointer-sign +./sheetjs.jerry pres.xlsx; echo $? + +# CLI Test +node -e "fs.writeFileSync('payload.js', 'var payload = \"' + fs.readFileSync('pres.xlsx').toString('base64') + '\";')" + +cat >global.js <jerry.js < xlsx.jerry.js +jerryscript/build/bin/jerry xlsx.jerry.js; echo $? \ No newline at end of file diff --git a/tests/engines-mujs.sh b/tests/engines-mujs.sh new file mode 100755 index 0000000..243e52c --- /dev/null +++ b/tests/engines-mujs.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# https://docs.sheetjs.com/docs/demos/engines/mujs + +cd /tmp +rm -rf sheetjs-mu + +mkdir sheetjs-mu +cd sheetjs-mu + +curl -LO https://mujs.com/downloads/mujs-1.3.4.zip +unzip mujs-1.3.4.zip +cd mujs-1.3.4 +make release +cd .. + +cp mujs-1.3.4/build/release/libmujs.a mujs-1.3.4/mujs.h . + +curl -LO https://docs.sheetjs.com/mujs/SheetJSMu.c + +gcc -o SheetJSMu SheetJSMu.c -L. -lmujs -lm -lc -std=c89 -Wall + +curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/shim.min.js +curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js +curl -LO https://sheetjs.com/pres.xlsb + +./SheetJSMu pres.xlsb diff --git a/tests/engines-rhino.sh b/tests/engines-rhino.sh new file mode 100755 index 0000000..4314929 --- /dev/null +++ b/tests/engines-rhino.sh @@ -0,0 +1,54 @@ +#!/bin/bash +# https://docs.sheetjs.com/docs/demos/engines/rhino + +cd /tmp +rm -rf sheetjs-java +mkdir -p sheetjs-java +cd sheetjs-java + +curl -L -o rhino.jar https://repo1.maven.org/maven2/org/mozilla/rhino/1.7.15/rhino-1.7.15.jar + +curl -LO https://cdn.sheetjs.com/xlsx-0.20.2/package/dist/xlsx.full.min.js +curl -LO https://docs.sheetjs.com/pres.xlsx + +curl -LO https://docs.sheetjs.com/rhino/SheetJSRhino.zip +unzip SheetJSRhino.zip + +cat >SheetJSRhino.java <