2 releases

0.1.3 Aug 22, 2020
0.1.0 Aug 10, 2020

#170 in #serialize

Download history 106/week @ 2025-10-21 63/week @ 2025-10-28 65/week @ 2025-11-04 47/week @ 2025-11-11 66/week @ 2025-11-18 76/week @ 2025-11-25 54/week @ 2025-12-02 48/week @ 2025-12-09 56/week @ 2025-12-16 69/week @ 2025-12-23 49/week @ 2025-12-30 19/week @ 2026-01-06 49/week @ 2026-01-13 59/week @ 2026-01-20 62/week @ 2026-01-27 54/week @ 2026-02-03

224 downloads per month

MIT/Apache

125KB
3.5K SLoC

RON is a simple config format which looks similar to Rust syntax.

Features

  • Data types
  • Structs, typename optional
  • Tuples
  • Enums
  • Lists
  • Maps
  • Units (())
  • Optionals
  • Primitives: booleans, numbers, string, char
  • Allows nested layout (similar to JSON)
  • Supports comments
  • Trailing commas
  • Pretty serialization

Syntax example

Game(
title: "Hello, RON!",
level: Level( // We could just leave the `Level` out
buildings: [
(
size: (10, 20),
color: Yellow, // This as an enum variant
owner: None,
),
(
size: (20, 25),
color: Custom(0.1, 0.8, 1.0),
owner: Some("guy"),
),
],
characters: {
"guy": (
friendly: true,
),
},
),
)

Usage

Just add it to your Cargo.toml:

[dependencies]
ron = "*"

Serializing / Deserializing is as simple as calling to_string / from_str.

!


This is a temporary fork of the ron crate for bevy engine.

Dependencies

~0.6–1.5MB
~31K SLoC