Skip to content

Releases

v1.1.0

Choose a tag to compare

@github-actions github-actions released this 14 Nov 18:58

Highlights

  • Strict ron-rs compatibility. The parser is a port of ron-rs 0.12.3 value parsing and is checked in CI against ron-rs itself (about 1,300 corpus documents plus differential fuzzing).
  • Faster decoding. Unmarshal decodes straight from the text without an intermediate tree: on par with encoding/json, and Parse is about twice as fast as encoding/json into any. Format is faster too.
  • Comment preserving edits. ParseEditable with Get, Set, SetRON, Delete, Insert and Append by path.
  • Field naming. NamingStrategy (camelCase, PascalCase, ...), SetFieldNaming, and a per-struct rename_all= option.
  • Pretty printing. PrettyConfig and MarshalWithConfig, modelled on ron-rs's PrettyConfig.
  • Raw values and generics. rustyon.Raw, UnmarshalAs[T], DecodeAs[T].
  • Enum representations. Internally tagged, adjacently tagged and untagged enums via RegisterEnumWith, plus a flatten tag option.
  • Options structs. EncodeOptions/MarshalWith and DecodeOptions/UnmarshalWith.
  • Composite Value types print as compact RON with fmt.

Behaviour changes

These follow from matching ron-rs exactly:

  • Nesting is limited like ron-rs: 64 nested collections, 128 nested Some(.
  • Unsuffixed integers beyond 128 bits become floats instead of an error.
  • Ranges (1..2, 1..=2, ..) and #![type = "..."] / #![schema = "..."] attributes are accepted.
  • isize/usize suffixes, 0X/0O/0B prefixes and the \b, \f, \/ escapes are rejected.
  • ( ) is an empty tuple and () is unit.
  • On a decode error the target may be partially modified; UnmarshalRON/UnmarshalText hooks run at most once per value.
  • Decoding a non-comparable key into map[any]T returns an error instead of panicking.

CLI

The CLI is now its own module with its own tags; see the cmd/rustyon/v1.1.0 release for binaries:

go install github.com/peltonapp/rustyon-go/cmd/rustyon@latest

Docs: https://github.com/peltonapp/rustyon-go/wiki

v1.0.0

Choose a tag to compare

@github-actions github-actions released this 14 Nov 14:30

Changelog

  • ec14b78 Add CI workflows with tests, lint, fuzz and DCO check
  • 40912c4 Add Go module and gitignore
  • c833ed8 Add GoReleaser release workflow and Dependabot
  • 0df098d Add Marshal, Unmarshal and enum registry
  • 98a62d5 Add README with logo and badges
  • 154dde0 Add RON lexer, parser and value tree
  • e32117e Add comment preserving formatter
  • 7409df4 Add contributing guide, DCO, code of conduct and security policy
  • 83f0d52 Add fuzz tests and benchmarks
  • 1599fc8 Add performance summary to README
  • 35bb5fe Add ronjson package for RON and JSON conversion
  • b2d9188 Add rustyon CLI with fmt, validate and JSON conversion
  • 50b4932 Bump GitHub Actions and exempt bots from the DCO check
  • 2e3bb67 Fix gofmt alignment in fields test
  • e69b9ff Fix lint findings and reduce formatter allocations
  • 7afe1a6 Fix map key ordering, enforce 128-bit and explicit_struct_names limits, clarify errors
  • 955b15d Initial commit
  • c404922 Move lexer, formatter and struct reflection into internal packages
  • 2373e1e Outline logo text so the SVG needs no web font
  • b2332a2 Shrink formatter tokens and nodes to cut allocations by 70 percent
  • 3ae3129 Speed up encoding and decoding with cached type checks and lock free enum lookups
  • e29dd65 Switch license to BSD-3-Clause
  • b090c0c Use errors.As in lexer error resolution

rustyon CLI v1.1.0

Choose a tag to compare

@github-actions github-actions released this 14 Nov 19:03