Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a345489

Browse filesBrowse files
authored
N16: rkyv (rust-gamedev#368)
1 parent 2cda2b7 commit a345489
Copy full SHA for a345489

File tree

Expand file treeCollapse file tree

1 file changed

+38
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+38
-0
lines changed

‎content/posts/newsletter-016/index.md

Copy file name to clipboardExpand all lines: content/posts/newsletter-016/index.md
+38Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,44 @@ If needed, a section can be split into subsections with a "------" delimiter.
6767

6868
## Library & Tooling Updates
6969

70+
### [rkyv]
71+
72+
[rkyv] is a zero-copy deserialization framework for Rust. It's similar to
73+
FlatBuffers and Cap'n Proto and can be used for data storage and messaging.
74+
75+
It has a handful of features that make it stand out:
76+
77+
- No schema restrictions
78+
- HashMap support out of the box
79+
- Trait object support through the [`rkyv_dyn`] crate
80+
- Validation through the [`bytecheck`] crate, suitable for untrusted and
81+
potentially malicious data
82+
- Safe mutable archives with pinning
83+
84+
Reddit user [vlmutolo] also made a [toy benchmark] comparing rkyv against serde
85+
and bincode and found that rkyv had promising initial numbers:
86+
87+
```text
88+
serialize (bincode): 89 ns/iter
89+
serialize (rkyv): 86 ns/iter
90+
91+
deserialize (bincode): 118 ns/iter
92+
deserialize (rkyv): 16 ns/iter
93+
```
94+
95+
A write-up on the [architecture and internals of rkyv] is also available.
96+
97+
_Discussions:
98+
[/r/rust (v0.1)](https://www.reddit.com/r/rust/comments/jss6h4/rkyv_a_zerocopy_deserialization_framework_for_rust/),
99+
[/r/rust (v0.2)](https://www.reddit.com/r/rust/comments/jx32e8/rkyv_02_and_bytecheck_validation_mutable_archives/)_
100+
101+
[rkyv]: https://github.com/djkoloski/rkyv
102+
[`rkyv_dyn`]: https://docs.rs/rkyv_dyn
103+
[`bytecheck`]: https://github.com/djkoloski/bytecheck
104+
[vlmutolo]: https://www.reddit.com/r/rust/comments/jx32e8/rkyv_02_and_bytecheck_validation_mutable_archives/gcyfoqc
105+
[toy benchmark]: https://git.sr.ht/~vlmutolo/rkyv-bench/tree/master/src/main.rs
106+
[architecture and internals of rkyv]: https://davidkoloski.me/blog/rkyv-architecture/
107+
70108
### [gfx-rs] and [wgpu]
71109

72110
![gfx-picture](wgpu-big-picture.svg)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.