Audit: Maximum number of fields in derived types in the ecosystem
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
Research direction
Start by reviewing the listed ecosystem projects and the cpuarch::VMSA type in coconut-svsm, which the issue identifies as having 120 fields. Record the largest derived types found and compare them with the supported field limit. Done means producing an evidence-backed recommendation for the limit.
Written by the indexing model from the issue text.
Description
TL;DR: 120 fields
We have upcoming work that will require a dedicated trait impl for each supported number of fields. Before choosing a limit, it would be useful to know how many fields real zerocopy users actually need.
I did a best-effort ecosystem scan for public Rust crates/projects that use zerocopy derives:
Users
signalapp/libsignallowRISC/opentitangoogle/crosvmtheseus-os/Theseusmanagarm/managarmoxidecomputer/hubrisbitflags/bitflagsawslabs/mountpoint-s3cberner/fusertailscale/tailscale-rsproject-oak/oakChainSafe/forestmicrosoft/liteboxkaspanet/rusty-kaspacoconut-svsm/svsmelodin-sys/elodinmessense/mupdf-rsbitshifter/glam-rssampsyo/brilrust-vmm/kvmsynacktiv/frinetzlfn/rust-gbtaks/esp32-nimblesupervc-stack/VectorChord-bm25memorysafety/rav1dworldcoin/orb-softwarecategory-labs/monad-bftSecureDNA/SecureDNAmicrosoft/openvmmrosenpass/rosenpassOpenDevicePartnership/patinan0-computer/iroh-willowrust-osdev/virtio-spec-rsNationalSecurityAgency/seabeeAyagamiDev/ayagamioxidecomputer/idolatryjiangzhe/doradbheinrich5991/libtw2rkyv/rendrust-osdev/fuse-abirust-osdev/endian-numDevExzh/litchiaranya-project/aranya-corelohvht/azothacore-rsplatform-system-interface/android-imagesivadeilra/pow2zhengxinchang/isopediaplatform-system-interface/intel_fwkdanecki/uma-filesystemmoehr1z/hermit-rsrcore-os/virtio-driversgoogle/safe-mmiomicrosoft/pdb-rschipsalliance/caliptra-dpebirkenfeld/ads-rscamshaft/codecRibirX/RibirSystemcluster/wrappeencounter/nodcbiffle/catiboKOBA789/qpKOBA789/rellywillglynn/taptapworldfnd/whirmonadplus/rust-playgroundgoogle/percore
The largest type I found is coconut-svsm/svsm's cpuarch::VMSA, with 120 fields:
#[repr(C, packed)]
#[derive(Debug, FromBytes)]
pub struct VMSA {
// ...
}
- Dominant language
- Rust
- Stars
- 2.6k
- Forks
- 194
- Avg merge
- 18h 15m
- Merged PRs (30d)
- 14
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from google/zerocopy
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Features to support optional defmt for the byteorder typesPossibly taken A pull request linked to this issue is open or already merged. Opencustomer-request
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
google/zerocopy#3914 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
google/zerocopy#3766 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
swc-project/swc-next-issues#533 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 5 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
eandualem/agent-interface#290 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day