Skip to content

Commit b0feb71

Browse files
tychedeliacatilac
andauthored
Add processing_node using napi. (#262)
Co-authored-by: moon davé <moon@softmoon.world>
1 parent 581e9dd commit b0feb71

7 files changed

Lines changed: 3554 additions & 6 deletions

File tree

‎.gitignore‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,8 @@
33
crates/processing_ffi/include/
44
crates/processing_pyo3/processing_py/*.pyi
55
.DS_Store
6-
.ipynb_checkpoints/
6+
.ipynb_checkpoints/
7+
crates/processing_node/node_modules/
8+
crates/processing_node/*.node
9+
crates/processing_node/index.js
10+
crates/processing_node/index.d.ts

‎Cargo.lock‎

Lines changed: 144 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎crates/processing_node/Cargo.toml‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
[package]
2+
name = "processing_node"
3+
version = "0.0.5"
4+
edition = "2024"
5+
6+
[lints]
7+
workspace = true
8+
9+
[lib]
10+
crate-type = ["cdylib"]
11+
12+
[features]
13+
default = []
14+
wayland = ["processing/wayland", "processing_glfw/wayland"]
15+
x11 = ["processing/x11", "processing_glfw/x11"]
16+
webcam = ["processing/webcam"]
17+
cuda = ["processing/cuda"]
18+
19+
[dependencies]
20+
processing = { workspace = true }
21+
processing_glfw = { workspace = true, features = ["static-link"] }
22+
bevy = { workspace = true }
23+
half = "2.7"
24+
napi = { version = "3", default-features = false, features = ["napi6"] }
25+
napi-derive = "3"
26+
27+
[build-dependencies]
28+
napi-build = "2"

‎crates/processing_node/build.rs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn main() {
2+
napi_build::setup();
3+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "processing-node",
3+
"version": "0.0.5",
4+
"description": "Node.js bindings for libprocessing",
5+
"main": "index.js",
6+
"types": "index.d.ts",
7+
"private": true,
8+
"files": [
9+
"index.js",
10+
"index.d.ts",
11+
"*.node"
12+
],
13+
"napi": {
14+
"binaryName": "processing"
15+
},
16+
"scripts": {
17+
"build": "napi build --platform --release",
18+
"build:debug": "napi build --platform"
19+
},
20+
"devDependencies": {
21+
"@napi-rs/cli": "^3.6.2"
22+
}
23+
}

0 commit comments

Comments
 (0)