Commit 784b175
authored
feat(serde-feather): implement phase 3 named-struct derive MVP (#187)
## Summary
- implement Phase 3 MVP derive support for `serde-feather`
- stabilize and expose `FeatherSerialize` / `FeatherDeserialize` behind
the `derive` feature
- enforce `derive` => `std`, and keep no-std derive out of scope for
this phase
- add compile-time validation for unsupported inputs (enums, tuple
structs, generics, unsupported serde attrs)
- add runtime + compile-fail tests for MVP contract coverage
- update `docs/project-serde-feather.md` and `crates/AGENTS.md` to align
contracts with implementation
## Implementation details
- runtime crate:
- re-export stable derive macros
- add compile-time guard message for invalid feature configuration
- macro crate:
- add `#[proc_macro_derive(FeatherSerialize, attributes(serde))]`
- add `#[proc_macro_derive(FeatherDeserialize, attributes(serde))]`
- support only non-generic named structs
- support attrs:
- container: `rename`
- field: `rename`, `default`, `skip`, `skip_serializing`,
`skip_deserializing`
- ignore unknown fields during deserialization
- resolve crate path robustly via `proc-macro-crate`
## Validation
- `cargo fmt --all`
- `cargo check -p serde-feather`
- `cargo check -p serde-feather-macros`
- `cargo check -p serde-feather --features derive`
- `cargo check -p serde-feather --no-default-features`
- `cargo check -p serde-feather --no-default-features --features derive`
- `cargo test -p serde-feather -p serde-feather-macros`
- `cargo test -p serde-feather --features derive`
- `cargo test`1 parent db8838f commit 784b175
23 files changed
Lines changed: 1087 additions & 35 deletions
File tree
- crates
- serde-feather-macros
- src
- serde-feather
- src
- tests
- ui
- docs
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 | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
0 commit comments