Skip to content

Commit fe0aba1

Browse files
committed
update README
1 parent 50fdc58 commit fe0aba1

1 file changed

Lines changed: 4 additions & 31 deletions

File tree

README.md

Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Dynamic SSZ is a Go library for SSZ encoding/decoding with support for dynamic f
2222
## Production Readiness
2323

2424
- **✅ Reflection-based dynamic marshaling/unmarshaling/HTR**: Production ready - battle-tested in various toolings and stable
25-
- **🚧 Code generator**: Feature complete but in beta stage - hasn't been extensively tested in production environments
25+
- ** Code generator**: Production ready - feature complete and functionally verified through extensive fuzz testing, though less battle-tested in production environments compared to the reflection code paths
2626

2727
## Quick Start
2828

@@ -62,11 +62,8 @@ root, err := ds.HashTreeRoot(myObject)
6262

6363
### Using Code Generation (Recommended for Production)
6464

65-
For maximum performance, use code generation. You can use either the CLI tool or the programmatic API:
65+
For maximum performance, use code generation with the `dynssz-gen` CLI tool:
6666

67-
#### Option 1: CLI Tool (Recommended)
68-
69-
Install the CLI tool:
7067
```bash
7168
go install github.com/pk910/dynamic-ssz/dynssz-gen@latest
7269
```
@@ -80,32 +77,7 @@ dynssz-gen -package . -types "MyStruct,OtherType" -output generated.go
8077
dynssz-gen -package github.com/example/types -types "Block" -output block_ssz.go
8178
```
8279

83-
#### Option 2: Programmatic API
84-
85-
For integration with build systems:
86-
87-
```go
88-
//go:generate go run codegen.go
89-
90-
// codegen.go
91-
package main
92-
93-
import (
94-
"github.com/pk910/dynamic-ssz/codegen"
95-
"reflect"
96-
)
97-
98-
func main() {
99-
generator := codegen.NewCodeGenerator(nil)
100-
generator.BuildFile(
101-
"generated.go",
102-
codegen.WithReflectType(reflect.TypeOf(MyStruct{})),
103-
)
104-
generator.Generate()
105-
}
106-
```
107-
108-
Both approaches generate optimized SSZ methods that are faster than reflection-based encoding.
80+
Generated code produces optimized SSZ methods that are faster than reflection-based encoding. See the [Code Generation Guide](docs/code-generator.md) for advanced usage including the programmatic API, cross-reference handling, and build system integration.
10981

11082
## Performance
11183

@@ -127,6 +99,7 @@ The library includes comprehensive testing infrastructure:
12799

128100
- **Unit Tests**: Fast, isolated tests for core functionality
129101
- **Spec Tests**: Ethereum consensus specification compliance tests
102+
- **Fuzz Testing**: Continuous fuzzing via CI that generates random SSZ type structures and verifies correctness by comparing reflection and codegen implementations across marshal, unmarshal, hash tree root, and streaming operations
130103
- **Examples**: Working examples that are automatically tested
131104
- **Performance Tests**: Benchmarking and regression testing
132105

0 commit comments

Comments
 (0)