Commit 64f316d
Felix Obenhuber
feat(anng): migrate to NNG v2 API
Major update to support NNG v2.0:
API changes:
- Use typed nng_err enum instead of raw u32 error constants
- Rename socket functions: nng_close → nng_socket_close,
nng_send_aio → nng_socket_send, nng_recv_aio → nng_socket_recv
- Update nng_strerror signature to take nng_err enum
- Add NNG initialization via nng_init() (required by NNG 2.0)
Dependency changes:
- Update nng-sys from 0.3.0 to 0.4.0-v2pre.1
- Remove build.rs version detection (no longer needed)
- Remove #[cfg(nng_110)] gates as NNG 2.0 is now baseline
Error handling:
- Use nng_err::NNG_* variants with pattern guards
- Format transport errors directly (NNG doesn't resolve them)
- Consistent 'err' naming in match patterns
Test updates:
- Adjust error kind expectations for NNG 2 behavior
- Update inproc address format expectations
- Enable pubsub tests unconditionally1 parent 28cbe87 commit 64f316d
File tree
18 files changed
+330
-322
lines changed- .github/workflows
- anng
- src
- protocols
- tests
18 files changed
+330
-322
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
140 | | - | |
141 | 139 | | |
142 | 140 | | |
143 | 141 | | |
144 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
145 | 150 | | |
146 | 151 | | |
147 | 152 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
32 | | - | |
| 30 | + | |
| 31 | + | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
| |||
This file was deleted.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
29 | | - | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | | - | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
131 | 132 | | |
132 | 133 | | |
133 | 134 | | |
134 | | - | |
135 | | - | |
| 135 | + | |
| 136 | + | |
136 | 137 | | |
137 | 138 | | |
138 | | - | |
| 139 | + | |
139 | 140 | | |
140 | 141 | | |
141 | | - | |
| 142 | + | |
142 | 143 | | |
143 | 144 | | |
144 | | - | |
| 145 | + | |
145 | 146 | | |
146 | | - | |
147 | | - | |
148 | | - | |
| 147 | + | |
149 | 148 | | |
150 | | - | |
| 149 | + | |
151 | 150 | | |
152 | | - | |
153 | | - | |
154 | | - | |
| 151 | + | |
155 | 152 | | |
156 | | - | |
| 153 | + | |
157 | 154 | | |
158 | | - | |
159 | | - | |
160 | | - | |
| 155 | + | |
161 | 156 | | |
162 | 157 | | |
163 | 158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
| 103 | + | |
| 104 | + | |
110 | 105 | | |
111 | 106 | | |
112 | 107 | | |
| |||
262 | 257 | | |
263 | 258 | | |
264 | 259 | | |
265 | | - | |
| 260 | + | |
266 | 261 | | |
267 | 262 | | |
268 | 263 | | |
| |||
288 | 283 | | |
289 | 284 | | |
290 | 285 | | |
291 | | - | |
| 286 | + | |
292 | 287 | | |
293 | 288 | | |
294 | 289 | | |
| |||
326 | 321 | | |
327 | 322 | | |
328 | 323 | | |
329 | | - | |
330 | | - | |
| 324 | + | |
| 325 | + | |
331 | 326 | | |
332 | 327 | | |
333 | | - | |
| 328 | + | |
334 | 329 | | |
335 | 330 | | |
336 | | - | |
| 331 | + | |
337 | 332 | | |
338 | 333 | | |
339 | | - | |
| 334 | + | |
340 | 335 | | |
341 | | - | |
342 | | - | |
343 | | - | |
| 336 | + | |
344 | 337 | | |
345 | | - | |
| 338 | + | |
346 | 339 | | |
347 | | - | |
348 | | - | |
349 | | - | |
| 340 | + | |
350 | 341 | | |
351 | | - | |
| 342 | + | |
352 | 343 | | |
353 | | - | |
354 | | - | |
355 | | - | |
| 344 | + | |
356 | 345 | | |
357 | 346 | | |
358 | 347 | | |
| |||
370 | 359 | | |
371 | 360 | | |
372 | 361 | | |
373 | | - | |
| 362 | + | |
374 | 363 | | |
375 | 364 | | |
376 | 365 | | |
| |||
527 | 516 | | |
528 | 517 | | |
529 | 518 | | |
530 | | - | |
| 519 | + | |
531 | 520 | | |
532 | 521 | | |
533 | 522 | | |
| |||
538 | 527 | | |
539 | 528 | | |
540 | 529 | | |
541 | | - | |
542 | | - | |
| 530 | + | |
| 531 | + | |
543 | 532 | | |
544 | 533 | | |
545 | 534 | | |
| |||
0 commit comments