5 Commits

Author SHA1 Message Date
05cc505ef4 Optimize numeric array conversion and serialize directly into Python bytes
Some checks failed
Build / wheels (x86_64, ubuntu-latest) (push) Failing after 1s
Build / source (push) Failing after 1s
Build / lint (push) Failing after 1s
Build / wheels (aarch64, ubuntu-24.04-arm) (push) Has been cancelled
Build / wheels (arm64, macos-15) (push) Has been cancelled
2026-09-21 22:48:21 -05:00
Adeeb Shihadeh
5befba15f3 Minimal pycapnp 2026-09-21 18:57:37 -07:00
Rowan Reeve
a5c29a74d2 Schema loading from the wire
Cap'n Proto provides a schema loader, which can be used to dynamically
load schemas during runtime. To port this functionality to pycapnp,
a new class is provided `C_SchemaLoader`, which exposes the Cap'n
Proto C++ interface, and `SchemaLoader`, which is part of the pycapnp
library.

The specific use case for this is when a capnp message contains
a Node.Reader: The schema for a yet unseen message can be loaded
dynamically, allowing the future message to be properly processed.

If the message is a struct containing other structs, all the schemas for
every struct must be loaded to correctly parse the message. See
https://github.com/DaneSlattery/capnp_generic_poc for a
proof-of-concept.

Add docs and cleanup

Add more docs

Reduce changes

Fix flake8 formatting

Fix get datatype
2023-06-12 14:10:13 +02:00
Jason Paryani
9f06f0f3e8 Fix bug in to_bytes_packed when packed size > unpacked size. 2014-02-24 14:06:28 -08:00
Jason Paryani
aa317e7324 Change to_bytes_packed() to be more efficient 2014-01-15 22:43:19 -08:00