https://github.com/kije/construction
Con-struct-ion - Marcos for generating struct definitions
https://github.com/kije/construction
Last synced: 8 months ago
JSON representation
Con-struct-ion - Marcos for generating struct definitions
- Host: GitHub
- URL: https://github.com/kije/construction
- Owner: kije
- License: apache-2.0
- Created: 2023-05-24T17:08:19.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-24T17:32:28.000Z (about 3 years ago)
- Last Synced: 2025-10-06T20:50:30.366Z (8 months ago)
- Language: Rust
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# construction
Con-struct-ion - Marcos for generating struct definitions
WORK IN PROGRESS...
## Idea
Allow generation/definition of structs.
```rust
struct A {
foo: String,
bar: Option
}
#[construction(extend=A)]
struct B;
// generates:
struct B {
foo: String,
bar: Option
}
#[construction(extend=A)]
struct C {
baz: u64
}
// generates:
struct C {
foo: String,
bar: Option,
baz: u64
}
#[construction(extend=A, omit=[foo])]
struct D {
baz: u64
}
// generates:
struct D {
bar: Option,
baz: u64
}
```