You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+55Lines changed: 55 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,10 @@ You can learn more about this project from this [talk at LibreGraphicsMeeting 20
9
9
10
10
## Getting started
11
11
12
+
There is two different things at work here :
13
+
- 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.
14
+
- 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.
15
+
12
16
### mewnala (the python library)
13
17
14
18
Inside of our `processing_pyo3` crate we have created a python package that you can easily install with pip.
Now create a file named `sketch.py` at the root of `mewnala-sketchbook`.
47
+
48
+
You can use this code to test
49
+
50
+
```python
51
+
from mewnala import*
37
52
53
+
defsetup():
54
+
size(400, 400)
55
+
background(255)
56
+
57
+
defdraw():
58
+
push_matrix()
59
+
translate(mouse_x, mouse_y)
60
+
fill(255, 100, 200)
61
+
circle(0, 0, 50)
62
+
pop_matrix()
63
+
64
+
run()
65
+
```
66
+
67
+
Now run your sketch using:
68
+
69
+
```bash
38
70
# run a sketch
39
71
uv run sketch.py
40
72
```
41
73
74
+
_Note: you can use any file name you want for your sketch_
75
+
42
76
### Rust (libprocessing)
43
77
44
78
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.
45
79
80
+
### Clone the project and its submodules
81
+
82
+
When cloning this repo (or your fork), don't forget to install its submodules (eg. Lygia)
0 commit comments