From a4303aa63226cda3ac99a04b61987c9009fe0824 Mon Sep 17 00:00:00 2001 From: hugohil Date: Mon, 24 Aug 2026 18:42:57 +0200 Subject: [PATCH 1/3] Update README.md * being more descriptive as to the differences between mewnala and libprocessing * add more explicitf steps to the mewnala install procedure * add note on the submodule installation --- README.md | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/README.md b/README.md index 8119f8c9..8be2b584 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,10 @@ You can learn more about this project from this [talk at LibreGraphicsMeeting 20 ## Getting started +There is two different things at work here : +- libprocessing (this repo) is the low-level cross-platform library for the core Processing API. It's written in Rust, and thus lets write Processing sketches in Rust. +- mewnala is a Python package built directly from libprocessing, providing Python bindings for the library. It's available as any other Python package out there and lets you write Processing sketches in a Python environment, regardless of you having libprocessing or Rust installed. + ### mewnala (the python library) Inside of our `processing_pyo3` crate we have created a python package that you can easily install with pip. @@ -28,21 +32,65 @@ powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | ie ``` #### Install a mewnala + +We're going to create a folder named `mewnala-sketchbook` and install the `mewnala` package inside: + ```bash # Initialize a project with uv uv init mewnala-sketchbook && cd mewnala-sketchbook # add the package uv add mewnala +``` + +Now create a file named `sketchh.py` at the root of `mewnala-sketchbook`. + +You can use this code to test + +```python +from mewnala import * + +def setup(): + size(400, 400) + background(255) + +def draw(): + push_matrix() + translate(mouse_x, mouse_y) + fill(255, 100, 200) + circle(0, 0, 50) + pop_matrix() + +run() +``` + +Now run your sketch using: +```bash # run a sketch uv run sketch.py ``` +_Note: you can use any file name you want for your sketch_ + ### Rust (libprocessing) You'll need to install the Rust toolchain to work on this project. Most users will want to install Rust via [`rustup`](https://rustup.rs/), which helps manage Rust toolchain versions. +### Clone the project and its submodules + +When cloning this repo (or your fork), don't forget to install its submodules (eg. Lygia) + +```bash +git clone --recurse-submodules git@github.com:processing/libprocessing.git +``` + +if you already cloned the repo without `--recurse-submodules`, you can run + +```bash +git submodule update --init +``` + ### Build commands This project uses [just](https://github.com/casey/just) as a command runner: @@ -84,6 +132,7 @@ This outputs the package to `target/wasm/`. ```bash just wasm-serve ``` +_Note: you'll need python installed on your machine to run this command_ ## Contributing From f10c4f793ac375850c685ac29d91f88b8d8e98b4 Mon Sep 17 00:00:00 2001 From: hugohil Date: Mon, 24 Aug 2026 20:58:17 +0200 Subject: [PATCH 2/3] Fix typo in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8be2b584..9a4b6c03 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ uv init mewnala-sketchbook && cd mewnala-sketchbook uv add mewnala ``` -Now create a file named `sketchh.py` at the root of `mewnala-sketchbook`. +Now create a file named `sketch.py` at the root of `mewnala-sketchbook`. You can use this code to test From 48dee8d7134864dc133682d3ad12743349e525ba Mon Sep 17 00:00:00 2001 From: hugohil Date: Tue, 25 Aug 2026 11:48:06 +0200 Subject: [PATCH 3/3] Update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 9a4b6c03..c54ee6f5 100644 --- a/README.md +++ b/README.md @@ -113,6 +113,12 @@ Install [wasm-pack](https://rustwasm.github.io/wasm-pack/): cargo install wasm-pack ``` +On Windows, you'll need to manually install `wasm-opt` + +```bash +cargo install wasm-opt +``` + You'll also need the wasm32 target: ```bash