-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serializing messages with no-alloc #440
Comments
You'll need to provide your own implementation of the capnproto-rust/capnp/src/message.rs Lines 370 to 404 in 20741d1
One way to do it would be to have a wrapper for a single |
Thank you @dwrensha for the quick reply! I will have a look at this. |
I opened #441, which adds |
Hi @dwrensha, First, many thanks for the quick new release! Unfortunately I still have issues to compile in my environment (no-std, no-alloc) something similar as the test case you added. The allocate_zeroed_vec() method returns a Vec which is not available, but it looks quite easy to fix, by passing to capnp::message::SingleSegmentAllocator::new() a reference to an aligned u8 slice. The other problem I have seems harder to solve:
Indeed, the struct Builder is decorated with #[cfg(feature = "alloc")], so it is not available in my environment. We can't simply remove it since it depends on BuilderArenaImpl which uses a Vec. |
Oops! We need a no-alloc version of |
I opened #442. |
Hello,
This is more a question than an issue.
I came across this crate recently and discovered that it has a no-alloc feature, which perfectly matches my environment. I've been able to implement a deserialization in my project, as it's done in example/wasm-hello-world/wasm-app/src/lib.rs, but I don't find a way to serialize a message.
Is it implemented for no-alloc? And if yes, would it be possible to have an example of use?
Thanks!
The text was updated successfully, but these errors were encountered: