Skip to content

Conversation

@IvanIsCoding
Copy link
Collaborator

@IvanIsCoding IvanIsCoding commented May 19, 2025

Follow up combining #1420 and the wheels built on #1449. Edit: the diff is now smaller; we use pre-built wheels from pyodide-recipes

This PR:

  • Introduces jupyterlite-sphinx and jupyterlite-pyodide-kernel as dependencies
  • Creates a playground page with rustworkx, users can run it in the browser
  • The playground uses Pyodide from a CDN, Jupyterlite assets (around 16MB), and a rustworkx wheel that is from the Pyodide index

@IvanIsCoding
Copy link
Collaborator Author

Here's a look at the preview: Playground_Preview

We could come with more ideas for the demo to auto-execute. Moreover, we could start adding more interactive snippets throughout the documentation

I reverted to this state to keep the playground cleaner.

I think we could add an interactive Matplotlib section in a seaparate place. Maybe we could even have a page that interacts with Graphviz via https://www.npmjs.com/package/@hpcc-js/wasm-graphviz + Pyodide.

@IvanIsCoding IvanIsCoding modified the milestones: 0.17.0, 0.17.1 Jul 6, 2025
@IvanIsCoding IvanIsCoding modified the milestones: 0.17.1, 0.18.0 Oct 24, 2025
@IvanIsCoding
Copy link
Collaborator Author

IvanIsCoding commented Oct 24, 2025

This is not ready yet, but upon thinking:

  • I will try to make this depend on Add Pixi workflow to verify Pyodide build works #1449
  • There will be an environment variable: if the variable is set, we enable the interactive playground. If it is not, we ignore the page and jupyterlite-sphinx
  • For deployment to rustworkx.org and rustworkx.org/dev, we'll need to chain the Pixi workflow to the docs. Essentially, it will first build the WASM extension and then publish the docs

This way, we can avoid manually having to update the binary. We also won't have to check it in our Git tree.

@IvanIsCoding
Copy link
Collaborator Author

For the record: I am planning on re-working this PR as rustworkx is now shipped as a Pyodide recipe and the wheel can be installed with micropip:
image

We'll no longer have a binary.

@IvanIsCoding
Copy link
Collaborator Author

Nice this is working without the vendored file:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants