concurrent-c-node 0.16.0__tar.gz → 0.17.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: concurrent-c-node
3
- Version: 0.16.0
3
+ Version: 0.17.0
4
4
  Summary: JavaScript and npm packages from Python over the Concurrent-C bridge: one spawned Node child per domain, host-controlled lifetime.
5
5
  License: MIT
6
6
  Project-URL: Repository, https://github.com/sreekotay/concurrent-c
@@ -71,23 +71,23 @@ python -m cc_node.benchmarks.multi_domain
71
71
  | same 8MB as JSON list | 499ms (~52×) |
72
72
 
73
73
  Wire: line-JSON on dedicated fds (stdio stays yours). Bulk spill: private
74
- 0700 dir, 0600 files, removed with the bridge. Crash isolation, not a
75
- sandbox — don’t eval untrusted JS.
74
+ 0700 dir, 0600 files, removed with the bridge.
76
75
 
77
76
  ## Surface
78
77
 
79
78
  - Plain data (numbers, str, bool, `None`, lists, non-empty dicts) by
80
- value. Empty `{}` stays a live handle. Else: domain-owned handle
81
- (attrs, calls, `str()` → `String()`). Non-finite floats are tagged.
82
- - Handles stay in one domain. `stats()` / `release()` / idempotent
83
- `destroy()`; after close: `bridge is closed`. Teardown is cooperative;
84
- CPU-bound JS isn’t cancelable wait or kill
79
+ value; else a domain-owned handle (attrs, calls, `str()` →
80
+ `String()`). Non-finite floats are tagged.
81
+ - Handles are per-domain. `stats()` / `release()` / idempotent
82
+ `destroy()`; afterwards: `bridge is closed`.
83
+ - Crash isolation, not a sandbox. `destroy()` is cooperative; an
84
+ in-flight CPU-bound call finishes or you kill the child
85
85
  ([`bridge_stress.md`](https://github.com/sreekotay/concurrent-c/blob/main/stress/bridge/bridge_stress.md)).
86
86
 
87
87
  ### Promises
88
88
 
89
89
  Awaited in the child before the reply — no `async`/`await` on the
90
- Python side:
90
+ Python side (opposite of `concurrent-c-python` isolated):
91
91
 
92
92
  ```python
93
93
  fetchish = js.eval('async (x) => { return { doubled: x * 2 } }')
@@ -120,12 +120,11 @@ total(array.array('d', range(1_000_000)))
120
120
  process cwd (`node_modules` next to your program), not from this wheel’s
121
121
  site-packages. `npm install lodash` in the project directory is the fix;
122
122
  or `create(node=…)` / `CC_NODE_BIN` when the wrong Node is on `PATH`.
123
- Missing-module errors name that cwd rule.
124
123
 
125
124
  ### Empty `{}` stays a handle
126
125
 
127
126
  An empty object has to stay on the Node side — a materialized Python
128
- `{}`/`dict` would lose later property use that matches Node. So
127
+ `dict` would lose later property use that matches Node. So
129
128
  `js.eval('({})')` returns a live handle:
130
129
 
131
130
  ```python
@@ -135,12 +134,7 @@ js.eval('({a: 1})') # {'a': 1} — data return
135
134
  ```
136
135
 
137
136
  Non-empty plain objects still cross as Python `dict`s. Same-domain
138
- handles chain (`h.update(…).digest(…)`); foreign-domain handles do not.
139
-
140
- **Thenables settle in the child.** Promise-based npm APIs need no
141
- `async`/`await` on the Python side — the call blocks until settle (or
142
- raises on reject). Opposite of `concurrent-c-python` isolated, where
143
- every call is already a JS Promise you must await.
137
+ handles chain (`h.update(…).digest(…)`).
144
138
 
145
139
  **Wire cost vs tiny work.** Round trip is ~100µs; a one-line JS helper
146
140
  on three numbers loses to pure Python. Prefer Python (or a native CC
@@ -148,10 +142,6 @@ module) for small/hot work; use the bridge when Node/npm owns the kernel.
148
142
  Multi-core: `python -m cc_node.benchmarks.multi_domain` (~2.8× on 3
149
143
  domains here).
150
144
 
151
- **Crash isolation, not a sandbox.** The child inherits your environment
152
- — don’t eval untrusted JS. `destroy()` is cooperative; CPU-bound JS is
153
- not preemptible (wait or kill + new domain).
154
-
155
145
  ## Choosing node
156
146
 
157
147
  1. `create(node='/path/to/node')`
@@ -188,5 +178,5 @@ gh workflow run publish-cc-node.yml
188
178
 
189
179
  Examples: `use_node`, `bench_wire`, `benchmarks.multi_domain`.
190
180
  Stress: [`stress/bridge/`](https://github.com/sreekotay/concurrent-c/tree/main/stress/bridge).
191
- Own hot path in C/CC → native module (40–90ns) instead of the wire
181
+ Own hot path in C/CC → native module (40–90ns) —
192
182
  [JS / Python interop](https://github.com/sreekotay/concurrent-c/blob/main/docs/js-py-modules.md).
@@ -60,23 +60,23 @@ python -m cc_node.benchmarks.multi_domain
60
60
  | same 8MB as JSON list | 499ms (~52×) |
61
61
 
62
62
  Wire: line-JSON on dedicated fds (stdio stays yours). Bulk spill: private
63
- 0700 dir, 0600 files, removed with the bridge. Crash isolation, not a
64
- sandbox — don’t eval untrusted JS.
63
+ 0700 dir, 0600 files, removed with the bridge.
65
64
 
66
65
  ## Surface
67
66
 
68
67
  - Plain data (numbers, str, bool, `None`, lists, non-empty dicts) by
69
- value. Empty `{}` stays a live handle. Else: domain-owned handle
70
- (attrs, calls, `str()` → `String()`). Non-finite floats are tagged.
71
- - Handles stay in one domain. `stats()` / `release()` / idempotent
72
- `destroy()`; after close: `bridge is closed`. Teardown is cooperative;
73
- CPU-bound JS isn’t cancelable wait or kill
68
+ value; else a domain-owned handle (attrs, calls, `str()` →
69
+ `String()`). Non-finite floats are tagged.
70
+ - Handles are per-domain. `stats()` / `release()` / idempotent
71
+ `destroy()`; afterwards: `bridge is closed`.
72
+ - Crash isolation, not a sandbox. `destroy()` is cooperative; an
73
+ in-flight CPU-bound call finishes or you kill the child
74
74
  ([`bridge_stress.md`](https://github.com/sreekotay/concurrent-c/blob/main/stress/bridge/bridge_stress.md)).
75
75
 
76
76
  ### Promises
77
77
 
78
78
  Awaited in the child before the reply — no `async`/`await` on the
79
- Python side:
79
+ Python side (opposite of `concurrent-c-python` isolated):
80
80
 
81
81
  ```python
82
82
  fetchish = js.eval('async (x) => { return { doubled: x * 2 } }')
@@ -109,12 +109,11 @@ total(array.array('d', range(1_000_000)))
109
109
  process cwd (`node_modules` next to your program), not from this wheel’s
110
110
  site-packages. `npm install lodash` in the project directory is the fix;
111
111
  or `create(node=…)` / `CC_NODE_BIN` when the wrong Node is on `PATH`.
112
- Missing-module errors name that cwd rule.
113
112
 
114
113
  ### Empty `{}` stays a handle
115
114
 
116
115
  An empty object has to stay on the Node side — a materialized Python
117
- `{}`/`dict` would lose later property use that matches Node. So
116
+ `dict` would lose later property use that matches Node. So
118
117
  `js.eval('({})')` returns a live handle:
119
118
 
120
119
  ```python
@@ -124,12 +123,7 @@ js.eval('({a: 1})') # {'a': 1} — data return
124
123
  ```
125
124
 
126
125
  Non-empty plain objects still cross as Python `dict`s. Same-domain
127
- handles chain (`h.update(…).digest(…)`); foreign-domain handles do not.
128
-
129
- **Thenables settle in the child.** Promise-based npm APIs need no
130
- `async`/`await` on the Python side — the call blocks until settle (or
131
- raises on reject). Opposite of `concurrent-c-python` isolated, where
132
- every call is already a JS Promise you must await.
126
+ handles chain (`h.update(…).digest(…)`).
133
127
 
134
128
  **Wire cost vs tiny work.** Round trip is ~100µs; a one-line JS helper
135
129
  on three numbers loses to pure Python. Prefer Python (or a native CC
@@ -137,10 +131,6 @@ module) for small/hot work; use the bridge when Node/npm owns the kernel.
137
131
  Multi-core: `python -m cc_node.benchmarks.multi_domain` (~2.8× on 3
138
132
  domains here).
139
133
 
140
- **Crash isolation, not a sandbox.** The child inherits your environment
141
- — don’t eval untrusted JS. `destroy()` is cooperative; CPU-bound JS is
142
- not preemptible (wait or kill + new domain).
143
-
144
134
  ## Choosing node
145
135
 
146
136
  1. `create(node='/path/to/node')`
@@ -177,5 +167,5 @@ gh workflow run publish-cc-node.yml
177
167
 
178
168
  Examples: `use_node`, `bench_wire`, `benchmarks.multi_domain`.
179
169
  Stress: [`stress/bridge/`](https://github.com/sreekotay/concurrent-c/tree/main/stress/bridge).
180
- Own hot path in C/CC → native module (40–90ns) instead of the wire
170
+ Own hot path in C/CC → native module (40–90ns) —
181
171
  [JS / Python interop](https://github.com/sreekotay/concurrent-c/blob/main/docs/js-py-modules.md).
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: concurrent-c-node
3
- Version: 0.16.0
3
+ Version: 0.17.0
4
4
  Summary: JavaScript and npm packages from Python over the Concurrent-C bridge: one spawned Node child per domain, host-controlled lifetime.
5
5
  License: MIT
6
6
  Project-URL: Repository, https://github.com/sreekotay/concurrent-c
@@ -71,23 +71,23 @@ python -m cc_node.benchmarks.multi_domain
71
71
  | same 8MB as JSON list | 499ms (~52×) |
72
72
 
73
73
  Wire: line-JSON on dedicated fds (stdio stays yours). Bulk spill: private
74
- 0700 dir, 0600 files, removed with the bridge. Crash isolation, not a
75
- sandbox — don’t eval untrusted JS.
74
+ 0700 dir, 0600 files, removed with the bridge.
76
75
 
77
76
  ## Surface
78
77
 
79
78
  - Plain data (numbers, str, bool, `None`, lists, non-empty dicts) by
80
- value. Empty `{}` stays a live handle. Else: domain-owned handle
81
- (attrs, calls, `str()` → `String()`). Non-finite floats are tagged.
82
- - Handles stay in one domain. `stats()` / `release()` / idempotent
83
- `destroy()`; after close: `bridge is closed`. Teardown is cooperative;
84
- CPU-bound JS isn’t cancelable wait or kill
79
+ value; else a domain-owned handle (attrs, calls, `str()` →
80
+ `String()`). Non-finite floats are tagged.
81
+ - Handles are per-domain. `stats()` / `release()` / idempotent
82
+ `destroy()`; afterwards: `bridge is closed`.
83
+ - Crash isolation, not a sandbox. `destroy()` is cooperative; an
84
+ in-flight CPU-bound call finishes or you kill the child
85
85
  ([`bridge_stress.md`](https://github.com/sreekotay/concurrent-c/blob/main/stress/bridge/bridge_stress.md)).
86
86
 
87
87
  ### Promises
88
88
 
89
89
  Awaited in the child before the reply — no `async`/`await` on the
90
- Python side:
90
+ Python side (opposite of `concurrent-c-python` isolated):
91
91
 
92
92
  ```python
93
93
  fetchish = js.eval('async (x) => { return { doubled: x * 2 } }')
@@ -120,12 +120,11 @@ total(array.array('d', range(1_000_000)))
120
120
  process cwd (`node_modules` next to your program), not from this wheel’s
121
121
  site-packages. `npm install lodash` in the project directory is the fix;
122
122
  or `create(node=…)` / `CC_NODE_BIN` when the wrong Node is on `PATH`.
123
- Missing-module errors name that cwd rule.
124
123
 
125
124
  ### Empty `{}` stays a handle
126
125
 
127
126
  An empty object has to stay on the Node side — a materialized Python
128
- `{}`/`dict` would lose later property use that matches Node. So
127
+ `dict` would lose later property use that matches Node. So
129
128
  `js.eval('({})')` returns a live handle:
130
129
 
131
130
  ```python
@@ -135,12 +134,7 @@ js.eval('({a: 1})') # {'a': 1} — data return
135
134
  ```
136
135
 
137
136
  Non-empty plain objects still cross as Python `dict`s. Same-domain
138
- handles chain (`h.update(…).digest(…)`); foreign-domain handles do not.
139
-
140
- **Thenables settle in the child.** Promise-based npm APIs need no
141
- `async`/`await` on the Python side — the call blocks until settle (or
142
- raises on reject). Opposite of `concurrent-c-python` isolated, where
143
- every call is already a JS Promise you must await.
137
+ handles chain (`h.update(…).digest(…)`).
144
138
 
145
139
  **Wire cost vs tiny work.** Round trip is ~100µs; a one-line JS helper
146
140
  on three numbers loses to pure Python. Prefer Python (or a native CC
@@ -148,10 +142,6 @@ module) for small/hot work; use the bridge when Node/npm owns the kernel.
148
142
  Multi-core: `python -m cc_node.benchmarks.multi_domain` (~2.8× on 3
149
143
  domains here).
150
144
 
151
- **Crash isolation, not a sandbox.** The child inherits your environment
152
- — don’t eval untrusted JS. `destroy()` is cooperative; CPU-bound JS is
153
- not preemptible (wait or kill + new domain).
154
-
155
145
  ## Choosing node
156
146
 
157
147
  1. `create(node='/path/to/node')`
@@ -188,5 +178,5 @@ gh workflow run publish-cc-node.yml
188
178
 
189
179
  Examples: `use_node`, `bench_wire`, `benchmarks.multi_domain`.
190
180
  Stress: [`stress/bridge/`](https://github.com/sreekotay/concurrent-c/tree/main/stress/bridge).
191
- Own hot path in C/CC → native module (40–90ns) instead of the wire
181
+ Own hot path in C/CC → native module (40–90ns) —
192
182
  [JS / Python interop](https://github.com/sreekotay/concurrent-c/blob/main/docs/js-py-modules.md).
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "concurrent-c-node"
7
- version = "0.16.0"
7
+ version = "0.17.0"
8
8
  description = "JavaScript and npm packages from Python over the Concurrent-C bridge: one spawned Node child per domain, host-controlled lifetime."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"