Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ jobs:
arch:
- x86_64
python-version:
- "3.13"
- "3.14"
node-version: [22.x]
steps:
- name: Checkout
Expand All @@ -526,17 +526,17 @@ jobs:
name: perspective-metadata
path: rust/

# Shares the `emscripten-wasm32` ccache prefix and `wasm32`
# emsdk sysroot with `build_js` — same toolchain, same target.
# Pyodide requires a newer Emscripten toolchain than the browser
# build, so its compiler and sysroot caches must remain separate.
- name: Initialize Build
id: init-step
uses: ./.github/actions/install-deps
with:
javascript: "false"
arch: ${{ matrix.arch }}
manylinux: "false"
ccache: "emscripten-wasm32"
emsdk_cache: "wasm32"
ccache: "pyodide-wasm32"
emsdk_cache: "pyodide-wasm32"
cargo_cache: "false"
cache_save: ${{ steps.config-step.outputs.SAVE_CACHE }}
skip_cache: ${{ steps.config-step.outputs.SKIP_CACHE }}
Expand Down Expand Up @@ -578,8 +578,8 @@ jobs:
for w in "${wheels[@]}"; do
echo "checking $w"
case "$w" in
*pyemscripten_2025_0_wasm32.whl) ;;
*) echo "::error::$w is not tagged pyemscripten_2025_0_wasm32"; exit 1 ;;
*pyemscripten_2026_0_wasm32.whl) ;;
*) echo "::error::$w is not tagged pyemscripten_2026_0_wasm32"; exit 1 ;;
esac
unzip -l "$w" | grep 'perspective/widget/static/perspective-anywidget.js' \
|| { echo "::error::$w is missing the anywidget JS bundle"; exit 1; }
Expand All @@ -605,7 +605,7 @@ jobs:
arch:
- x86_64
python-version:
- "3.13"
- "3.14"
node-version: [22.x]
steps:
- name: Checkout
Expand Down Expand Up @@ -1240,7 +1240,7 @@ jobs:

- uses: actions/download-artifact@v4
with:
name: perspective-python-dist-wasm32-emscripten-3.13
name: perspective-python-dist-wasm32-emscripten-3.14

- uses: actions/download-artifact@v4
with:
Expand Down
3 changes: 2 additions & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ this within a virtual environment.

To build for [Pyodide](https://pyodide.org/), select
`perspective-python (pyodide)` in `pnpm run setup` and install the pinned
Pyodide distribution with `pnpm run install_pyodide`.
Pyodide distribution with `pnpm run install_pyodide`. Pyodide builds use the
separate `pyodide_emscripten` version pinned in `package.json`.

### `perspective-jupyterlab`

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
},
"type": "module",
"emscripten": "4.0.9",
"pyodide_emscripten": "5.0.3",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to squash this. Perspective is only on emscripten 4.0.9 because of pyodide.

"binaryen": "version_132",
"llvm": "17.0.6",
"pyodide": "0.29.4",
"pyodide": "314.0.7",
"engines": {
"node": ">=16 <27"
},
Expand Down
8 changes: 4 additions & 4 deletions rust/perspective-python/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if (!!process.env.PSP_DEBUG) {
const is_pyodide = !!process.env.PSP_PYODIDE;

const python_version =
process.env.PSP_PYTHON_VERSION || (is_pyodide ? "3.13" : "3.12");
process.env.PSP_PYTHON_VERSION || (is_pyodide ? "3.14" : "3.12");

const version = pkg.version;

Expand All @@ -45,12 +45,12 @@ const env = { ...process.env };
let emsdk_prefix = "";
if (is_pyodide) {
const emsdkdir = path.resolve(__dirname, "../../.emsdk");
const { emscripten } = JSON.parse(
const { pyodide_emscripten } = JSON.parse(
fs.readFileSync(path.resolve(__dirname, "../../package.json")),
);
emsdk_prefix = `cd ${emsdkdir} && . ./emsdk_env.sh && ./emsdk activate ${emscripten} && cd ${cwd} && `;
emsdk_prefix = `cd ${emsdkdir} && . ./emsdk_env.sh && ./emsdk activate ${pyodide_emscripten} && cd ${cwd} && `;
env.MATURIN_PYEMSCRIPTEN_PLATFORM_VERSION =
process.env.MATURIN_PYEMSCRIPTEN_PLATFORM_VERSION || "2025_0";
process.env.MATURIN_PYEMSCRIPTEN_PLATFORM_VERSION || "2026_0";
}

// if not windows
Expand Down
1 change: 1 addition & 0 deletions rust/perspective-python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Framework :: Jupyter",
"Framework :: Jupyter :: JupyterLab",
"Framework :: Jupyter :: JupyterLab :: 3",
Expand Down
2 changes: 1 addition & 1 deletion rust/perspective-server/cpp/perspective/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ endif()
set(RAPIDJSON_BUILD_TESTS OFF CACHE BOOL "Disable rapidjson tests")

if(PSP_PYODIDE)
set(RELOCATABLE_FLAGS " -sRELOCATABLE=1 -sSIDE_MODULE=2 -fwasm-exceptions -sSUPPORT_LONGJMP=wasm \ ")
set(RELOCATABLE_FLAGS " -sSIDE_MODULE=2 -fwasm-exceptions -sSUPPORT_LONGJMP=wasm \ ")
string(APPEND CMAKE_EXE_LINKER_FLAGS "${RELOCATABLE_FLAGS} -sWASM_BIGINT=1 ")
string(APPEND CMAKE_C_FLAGS "${RELOCATABLE_FLAGS}")
string(APPEND CMAKE_CXX_FLAGS "${RELOCATABLE_FLAGS}")
Expand Down
4 changes: 3 additions & 1 deletion tools/scripts/install_emsdk.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ import "zx/globals";

const pkg = getWorkspacePackageJson();

const emscripten = pkg.emscripten;
const emscripten = process.env.PSP_PYODIDE
? pkg.pyodide_emscripten
: pkg.emscripten;

dotenv.config({ path: "./.perspectiverc", quiet: true });

Expand Down
2 changes: 1 addition & 1 deletion tools/scripts/workspace.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function getRustWheelsDir() {

export function getEmscriptenWheelPath() {
const pspVersion = getWorkspacePackageJson().version.replace("-", ".");
const wheeljunk = "cp311-abi3-pyemscripten_2025_0_wasm32";
const wheeljunk = "cp311-abi3-pyemscripten_2026_0_wasm32";
return path.join(
rustWheelsDir,
`perspective_python-${pspVersion}-${wheeljunk}.whl`,
Expand Down
Loading