Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: GitHub Pages
name: gh-pages

on:
push:
Expand Down
7 changes: 5 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
[package]
name = "superstruct"
version = "0.4.0"
version = "0.4.1"
edition = "2021"
description = "Proc-macro for versioned data types"
description = "Versioned data types with minimal boilerplate"
license = "Apache-2.0"
repository = "https://github.com/sigp/superstruct"
documentation = "https://sigp.github.io/superstruct/"
keywords = ["schema", "subtype", "backwards compatibility", "procedural macro"]
categories = ["rust-patterns"]

[lib]
name = "superstruct"
Expand Down
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@ SuperStruct
===========

![test status](https://github.com/sigp/superstruct/actions/workflows/test-suite.yml/badge.svg)
![crates.io](https://img.shields.io/crates/v/superstruct.svg)

SuperStruct is a library for working with a family of related struct _variants_, where each variant shares some common fields, and adds in unique fields of its own.

Its design is informed by the implementation of blockchain consensus upgrades, which often change core data structures by removing some old fields and replacing them with new ones.
For more information please see the [SuperStruct Guide](https://sigp.github.io/superstruct/).

Currently the library is unstable and evolving rapidly alongside [Lighthouse][] as it becomes hard-fork aware.
## Project Showcase

You can run `cargo expand --test basic` to see the code generated for `tests/basic.rs`.
SuperStruct is used in the following projects:

[Lighthouse]: https://github.com/sigp/lighthouse
* [`sigp/lighthouse`](https://github.com/sigp/lighthouse): Ethereum consensus client

## License

Apache 2.0