Chapter 46
stub/serialization
github.com/openfluke/welvet/stub/serialization🚧
Why it exists
Volumetric grids need JSON/ENTITY persist beyond transformer packs.
What it is
SerializeEntity/LoadEntity, SerializeGrid/GridFromSpec — native FormatNone bytes; packed via wire.
Go example
examples/46-stub-serialization/main.go
Run:
cd welvet/examples/46-stub-serialization && source ../env.sh && go run .package main
import (
"fmt"
"github.com/openfluke/welvet/architecture"
"github.com/openfluke/welvet/stub/serialization"
)
func main() {
g := architecture.NewGrid(1, 1, 1, 1)
raw, err := serialization.SerializeGrid(g)
fmt.Println(len(raw), err)
}