Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ron-rs/ron
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.8.1
Choose a base ref
...
head repository: ron-rs/ron
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.9.0
Choose a head ref

Commits on Aug 16, 2022

  1. Expected bytes error message and imports cleanup (#400)

    * Format expected bytes error with base64 as in ron
    
    * Reformat imports to be consistent
    juntyr authored Aug 16, 2022
    Copy the full SHA
    75ac75e View commit details

Commits on Aug 22, 2022

  1. Copy the full SHA
    fc6d4b8 View commit details

Commits on Aug 26, 2022

  1. Fix #277 and #405 with Value::Map IntoIter and extraneous item ch…

    …eck for `Value::Seq` (#406)
    juntyr authored Aug 26, 2022
    Copy the full SHA
    21833a8 View commit details

Commits on Sep 7, 2022

  1. Fixed raw struct name identifier parsing (#402)

    * Fixed raw struct name identifier parsing
    
    * Added more tests, raw identifier suggestion error, and invalid identifier error formatting
    
    * Even more empty identifier tests
    juntyr authored Sep 7, 2022
    Copy the full SHA
    a63b3c8 View commit details

Commits on Sep 12, 2022

  1. Implemented ron::value::RawValue (#407)

    * Implemented ron::value::RawValue
    
    * Added more test cases for full coverage
    juntyr authored Sep 12, 2022
    Copy the full SHA
    298f918 View commit details

Commits on Oct 4, 2022

  1. Copy the full SHA
    7a68926 View commit details

Commits on Oct 7, 2022

  1. Error instead of panic when deserializing non-identifier field name (#…

    …415)
    
    * Error instead of panic when deserializing non-identifier field name
    
    * Fix code coverage for tests
    
    * Added CHANGELOG entry
    juntyr authored Oct 7, 2022
    Copy the full SHA
    2b9a50c View commit details

Commits on Oct 8, 2022

  1. Copy the full SHA
    011a778 View commit details
  2. Copy the full SHA
    0c32f8d View commit details

Commits on Oct 12, 2022

  1. Add explicit recursion limits to avoid stack overflows (#420)

    * Explicit recursion limit during deserializing
    
    * Explicit recursion limit during serializing
    
    * Added CHANGELOG entry
    juntyr authored Oct 12, 2022
    Copy the full SHA
    562963f View commit details

Commits on Oct 18, 2022

  1. Copy the full SHA
    27d2de4 View commit details

Commits on Oct 21, 2022

  1. Copy the full SHA
    e06dc75 View commit details
  2. Copy the full SHA
    70e45d6 View commit details

Commits on Nov 21, 2022

  1. Copy the full SHA
    7900c71 View commit details
  2. Copy the full SHA
    b44711d View commit details

Commits on Nov 22, 2022

  1. Merge pull request #429 from DavidKorczynski/cifuzz-int

    ci: add CIFuzz integration
    torkleyy authored Nov 22, 2022
    Copy the full SHA
    0ce76f9 View commit details

Commits on Jan 10, 2023

  1. Copy the full SHA
    e2b0d97 View commit details
  2. Bump base64 to v0.21 (#433)

    juntyr authored Jan 10, 2023
    Copy the full SHA
    55ba26f View commit details

Commits on Feb 6, 2023

  1. Copy the full SHA
    d15bacc View commit details

Commits on Mar 13, 2023

  1. Copy the full SHA
    66ccded View commit details
  2. Depend on serde_derive separately for more compilation parallelism (#…

    …441)
    
    * depend on serde_derive separately for more compilation parallelism
    
    * add changelog entry
    jakobhellermann authored Mar 13, 2023
    Copy the full SHA
    5a407f3 View commit details

Commits on Apr 8, 2023

  1. Copy the full SHA
    2a57149 View commit details

Commits on Apr 19, 2023

  1. Copy the full SHA
    484fcab View commit details

Commits on May 1, 2023

  1. Add minimal support for #[serde(flatten)] roundtrips through maps (#455)

    * Detect flattened structs in `Deserializer::deserialize_map`
    
    * Add minimal and targeted support for `#[serde(flatten)]`
    
    * Fix the serde flatten canary for MSRV 1.57
    
    * Added extra tests for missing quotation marks in flattened struct field names
    
    * Clean up the serde flatten canary capture
    
    * Document the #[serde(flatten)] hack
    
    * Final small cleanup
    
    ---------
    
    Co-authored-by: Clouds Flowing <clouds.flowing@gmail.com>
    juntyr and clouds56 authored May 1, 2023
    Copy the full SHA
    c0d7421 View commit details
  2. Upgrade to bitflags 2.0 (#443)

    * Upgrade to bitflags 2.0
    
    * Update the fuzzer Cargo.lock
    juntyr authored May 1, 2023
    Copy the full SHA
    ec889b5 View commit details

Commits on May 21, 2023

  1. Copy the full SHA
    8fa9995 View commit details

Commits on Jun 28, 2023

  1. Copy the full SHA
    82536cf View commit details

Commits on Jul 2, 2023

  1. Copy the full SHA
    6e60e81 View commit details

Commits on Jul 6, 2023

  1. Copy the full SHA
    40c51a8 View commit details
  2. Copy the full SHA
    4388ff2 View commit details
  3. Add a fuzzer test that serialises and deserialises arbitrary typed se…

    …rde data + fix `&[u8]` de (#462)
    
    * Add a fuzzer test that serialises and deserialises arbitrary typed serde data + fix &[u8] de
    
    * Fix the byte slice serialising test
    juntyr authored Jul 6, 2023
    Copy the full SHA
    1e9113e View commit details

Commits on Jul 8, 2023

  1. Copy the full SHA
    94a5ce9 View commit details

Commits on Jul 17, 2023

  1. Add minimal support for internally tagged and untagged enums (#451)

    * Add minimal support for internally tagged and untagged enums
    
    * Edge cases over edge cases
    
    * Add CHANGELOG entry and update README
    
    * Fix the PR references in the README
    juntyr authored Jul 17, 2023
    Copy the full SHA
    b3128dd View commit details

Commits on Jul 18, 2023

  1. Fix "WASD" example in README (#466)

    * trim trailing whitespace in README 
    
    * fix 'wasd' key map in README example, very important
    tje authored Jul 18, 2023
    Copy the full SHA
    8840c9f View commit details

Commits on Jul 21, 2023

  1. Copy the full SHA
    f692c63 View commit details

Commits on Aug 6, 2023

  1. Update adjacent enum non-roundtrip tests to match serde-rs/serde#2505 (

    …#471)
    
    Update adjacent enum non-roundtrip tests to match serde-rs/serde#2505
    juntyr authored Aug 6, 2023
    Copy the full SHA
    d5a01dd View commit details

Commits on Aug 17, 2023

  1. Update CHANGELOG to v0.8.1

    juntyr committed Aug 17, 2023
    Copy the full SHA
    4c037bf View commit details
  2. Merge pull request #475 from juntyr/minimal-master-v0.8.1

    Update CHANGELOG to v0.8.1
    juntyr authored Aug 17, 2023
    Copy the full SHA
    ce4e397 View commit details

Commits on Aug 18, 2023

  1. Add a test to confirm that #217 is fixed (#476)

    Add a test to confirm that #217 is fixed
    juntyr authored Aug 18, 2023
    Copy the full SHA
    709486e View commit details
  2. Add a test to confirm that #357 is fixed (#477)

    Add a test to confirm that #357 is fixed
    juntyr authored Aug 18, 2023
    Copy the full SHA
    0d91151 View commit details
  3. Add a test to confirm that #254 is fixed (#478)

    Add a test to confirm that #254 is fixed
    
    Co-authored-by: Yarwin <yavinlecretin@gmail.com>
    juntyr and Yarwin authored Aug 18, 2023
    Copy the full SHA
    52f282d View commit details

Commits on Aug 20, 2023

  1. Add benchmarking using arbitrary fuzzing (#465)

    * Early prototyping with a typed arbitrary fuzzer (ser only so far) and reading in the corpus
    
    * Also fuzz the ser::PrettyConfig (identation-excluded)
    
    * Start implementing the arbitrary typed data deserialising fuzzing
    
    * Fix None inside stack of implicit Some-s
    
    * Detect problematic Some inside deserialize_any with unwrap_variant_newtypes
    
    * Fix clippy::useless_conversion lint
    
    * Another alternative: allow newtype variant unwrapping in deserialize_any, also for Some + Fix check_struct_type lookahead
    
    * Fix PartialOrd impls for Map and Float
    
    * Implement arbitrary tuple struct (static field names slice FIXME) fuzzing deserialisation
    
    * Fully fix Float comparison with total_ord
    
    * Fix clippy lints
    
    * Finished arbitrary struct and enum deserialisation fuzzing
    
    * Create CI workflow for benchmarking
    
    * Fix corpus download and unzip
    
    * Give benchmark the comparison branch name
    
    * Restrict the benchmark to unique cases (ty, value, ron)
    
    * Add test for the Serialize identifier validation
    
    * Add tests for further fuzzer-found bugs
    
    * Add the extensive CHANGELOG entry
    
    * Add the test and changelog entry from the subsumed #413
    
    * Add an early return + more tests for the expensive newtype or tuple check for unwrapping newtype variants
    juntyr authored Aug 20, 2023
    Copy the full SHA
    dea68fe View commit details
  2. Lossless Value::Number and allow +unsigned (#479)

    * First steps towards a lossless Value::Number
    
    * Allow parsing +unsigned as unsigned int
    
    * Add additional tests for number parsing
    
    * Added CHANGELOG entry
    
    * Improve coverage by running tests across all features
    
    * Refactor number parsing for better readability
    
    * Extend number tests to typed ser+de
    
    * Adjust #465 tests to lossless Value::Number
    juntyr authored Aug 20, 2023
    Copy the full SHA
    b7acecb View commit details

Commits on Aug 21, 2023

  1. Copy the full SHA
    13fa23b View commit details

Commits on Aug 22, 2023

  1. Copy the full SHA
    3f877c2 View commit details

Commits on Aug 23, 2023

  1. Copy the full SHA
    14734c1 View commit details
  2. Fix value explosion in arbitrary fuzzer (#485)

    * Fix value explosion in arbitrary fuzzer
    
    * Improve the fuzzing of arrays with a max spread
    juntyr authored Aug 23, 2023
    Copy the full SHA
    0982767 View commit details
  3. Add number suffixes and allow more number underscores (#481)

    * Allow Rusty float literals with underscores
    
    * Implement number suffixes
    
    * Add fuzzer support and fix fuzzer-found issue
    
    * Add CHANGELOG entry
    
    * Fix grammar and tests to include (inf|NaN)_f(32|64)
    
    * Clean up integer and float parsing
    
    * Honour grammar and accept `NaNf32` instead of `NaN_f32`
    juntyr authored Aug 23, 2023
    Copy the full SHA
    388cfe3 View commit details
  4. Improve code coverage CI with grcov HTML reports (#483)

    * Install pre-built grcov in CI
    
    * Self-host grcov's HTML report
    
    * Post codecov summary to job instead of PR
    juntyr authored Aug 23, 2023
    Copy the full SHA
    cead3cf View commit details
  5. Copy the full SHA
    a293382 View commit details
Showing with 20,474 additions and 2,382 deletions.
  1. +1 −1 .github/actions/setup/action.yml
  2. +119 −26 .github/workflows/ci.yaml
  3. +32 −0 .github/workflows/cibench.yml
  4. +26 −0 .github/workflows/cifuzz.yml
  5. +6 −0 .gitignore
  6. +63 −0 CHANGELOG.md
  7. +24 −11 Cargo.toml
  8. +94 −29 README.md
  9. +1 −2 clippy.toml
  10. +48 −4 docs/extensions.md
  11. +65 −14 docs/grammar.md
  12. +146 −0 examples/base64.rs
  13. +2 −1 examples/decode.rs
  14. +3 −2 examples/decode_file.rs
  15. +2 −1 examples/encode.rs
  16. +4 −4 fuzz/.gitignore
  17. +0 −109 fuzz/Cargo.lock
  18. +19 −5 fuzz/Cargo.toml
  19. +28 −0 fuzz/fuzz_targets/arbitrary.rs
  20. +6,094 −0 fuzz/fuzz_targets/bench/lib.rs
  21. +125 −0 fuzz/fuzz_targets/bench/main.rs
  22. +19 −1 fuzz/fuzz_targets/from_str.rs
  23. +1 −1 rustfmt.toml
  24. +47 −41 src/de/id.rs
  25. +453 −211 src/de/mod.rs
  26. +74 −74 src/de/tag.rs
  27. +446 −130 src/de/tests.rs
  28. +124 −23 src/de/value.rs
  29. +371 −72 src/error.rs
  30. +38 −8 src/extensions.rs
  31. +15 −1 src/lib.rs
  32. +85 −29 src/options.rs
  33. +1,399 −569 src/parse.rs
  34. +675 −247 src/ser/mod.rs
  35. +360 −0 src/ser/path_meta.rs
  36. +240 −0 src/ser/raw.rs
  37. +206 −46 src/ser/tests.rs
  38. +3 −3 src/ser/value.rs
  39. +0 −553 src/value.rs
  40. +287 −0 src/value/map.rs
  41. +502 −0 src/value/mod.rs
  42. +285 −0 src/value/number.rs
  43. +250 −0 src/value/raw.rs
  44. +351 −0 tests/115_minimal_flattening.rs
  45. +1 −1 tests/117_untagged_tuple_variant.rs
  46. +97 −43 tests/123_enum_representation.rs
  47. +3 −2 tests/147_empty_sets_serialisation.rs
  48. +11 −30 tests/152_bitflags.rs
  49. +1 −1 tests/203_error_positions.rs
  50. +1 −1 tests/207_adjacently_tagged_enum.rs
  51. +98 −0 tests/217_nested_untagged_enums.rs
  52. +51 −0 tests/238_array.rs
  53. +5 −7 tests/240_array_pretty.rs
  54. +32 −8 tests/250_variant_newtypes.rs
  55. +188 −0 tests/254_typetag.rs
  56. +13 −0 tests/256_comma_error.rs
  57. BIN tests/307_stack_overflow.rs
  58. +30 −0 tests/321_unicode_ident.rs
  59. +2 −2 tests/337_value_float_roundtrip.rs
  60. +33 −0 tests/357_untagged_enum_roundtrip.rs
  61. +36 −0 tests/367_implicit_some.rs
  62. +4 −22 tests/370_float_parsing.rs
  63. +2 −2 tests/393_serde_errors.rs
  64. +198 −0 tests/401_raw_identifier.rs
  65. +374 −0 tests/407_raw_value.rs
  66. +95 −0 tests/410_trailing_comma.rs
  67. +45 −0 tests/423_de_borrowed_identifier.rs
  68. +60 −0 tests/425_escape_strings.rs
  69. +102 −0 tests/436_untagged_bytes.rs
  70. +484 −0 tests/438_rusty_byte_strings.rs
  71. +39 −0 tests/447_compact_maps_structs.rs
  72. +353 −0 tests/449_tagged_enum.rs
  73. +22 −0 tests/462_bytes.rs
  74. +25 −0 tests/465_implicit_some_stack.rs
  75. +13 −0 tests/465_no_comment_char_value.rs
  76. +22 −0 tests/465_r_name_value.rs
  77. +34 −0 tests/465_ser_backslash_string.rs
  78. +44 −0 tests/465_unwrap_some_newtype_variant_value.rs
  79. +89 −0 tests/465_validate_ser_identifiers.rs
  80. +649 −0 tests/481_number_underscores_suffixes.rs
  81. +33 −0 tests/492_enum_in_untagged_enum.rs
  82. +3,078 −0 tests/502_known_bugs.rs
  83. +59 −0 tests/508_value_adjacently_tagged_bug.rs
  84. +76 −0 tests/511_deserialize_any_map_string_key.rs
  85. +109 −0 tests/522_explicit_struct_names.rs
  86. +54 −0 tests/526_flatten.rs
  87. +21 −0 tests/530_untagged_union.rs
  88. +129 −0 tests/544_path_meta.rs
  89. +19 −1 tests/comments.rs
  90. +3 −2 tests/depth_limit.rs
  91. +20 −3 tests/escape.rs
  92. +2 −1 tests/extensions.rs
  93. +7 −6 tests/large_number.rs
  94. +98 −0 tests/non_identifier_identifier.rs
  95. +143 −0 tests/non_string_tag.rs
  96. +4 −2 tests/numbers.rs
  97. +58 −3 tests/options.rs
  98. +3 −2 tests/preserve_sequence.rs
  99. +1 −1 tests/roundtrip.rs
  100. +0 −1 tests/struct_integers.rs
  101. +4 −2 tests/to_string_pretty.rs
  102. +50 −1 tests/unicode.rs
  103. +114 −20 tests/value.rs
2 changes: 1 addition & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ inputs:
runs:
using: composite
steps:
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
145 changes: 119 additions & 26 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -12,53 +12,118 @@ on:
- cron: '0 0 * * 0'

jobs:
lock:
name: Cargo.lock
runs-on: ubuntu-latest
steps:
- name: Checkout the Repository
uses: actions/checkout@v4
- name: Install the Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true
- name: Generate the minimum version lockfile
run: |
cargo update -Z minimal-versions
cargo update -Z direct-minimal-versions
mv Cargo.lock Cargo.lock.min
- name: Generate the current version lockfile
run: cargo update
- name: Upload the Cargo lockfiles
uses: actions/upload-artifact@v4
with:
name: Cargo.lock
path: |
Cargo.lock
Cargo.lock.min
tests:
name: Tests
runs-on: ubuntu-latest
needs: lock

strategy:
matrix:
rust: [1.56.0, stable, nightly]
rust: [1.64.0, stable, nightly]
lock: ["Cargo.lock", "Cargo.lock.min"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Download the Cargo lockfiles
uses: actions/download-artifact@v4
with:
name: Cargo.lock
- name: Rename ${{ matrix.lock }} to Cargo.lock
run: mv ${{ matrix.lock }} Cargo.lock
if: ${{ matrix.lock != 'Cargo.lock' }}
- uses: ./.github/actions/setup
with:
key: test-${{ matrix.rust }}
key: test-${{ matrix.rust }}-${{ matrix.lock }}
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
# Downgrade some dependencies for MSRV 1.64
- run: |
cargo update -p serde_bytes --precise 0.11.16
cargo update -p indexmap --precise 2.5.0
cargo update -p once_cell --precise 1.20.3
if: ${{ matrix.rust == '1.64.0' }}
- run: cargo test
- run: cargo test --features integer128
- run: cargo test --features indexmap
- run: cargo test --all-features

clippy:
name: "Clippy: stable"
name: "Clippy: MSRV"
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
with:
key: clippy-stable
key: clippy-msrv
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
toolchain: 1.64.0
profile: minimal
components: clippy
override: true
- uses: actions-rs/clippy-check@v1
# Downgrade some dependencies for MSRV 1.64
- run: |
cargo update -p serde_bytes --precise 0.11.16
cargo update -p indexmap --precise 2.5.0
cargo update -p once_cell --precise 1.20.3
- run: cargo clippy -- -D warnings
- run: cargo clippy --features integer128 -- -D warnings
- run: cargo clippy --features indexmap -- -D warnings
- run: cargo clippy --all-features -- -D warnings

clippy-fuzz:
name: "Clippy: Fuzzer"
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
with:
token: ${{ github.token }}
key: clippy-fuzz
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
components: clippy
override: true
- run: cd fuzz && cargo clippy --all -- -D warnings

rustfmt:
name: "Format: stable"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
with:
key: rustfmt-stable
@@ -68,39 +133,67 @@ jobs:
profile: minimal
components: rustfmt
override: true
- run: cargo fmt -- --check
- run: cargo fmt --all -- --check
- run: cd fuzz && cargo fmt --all -- --check

coverage:
name: "Coverage: nightly"
name: "Coverage: stable"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
with:
key: coverage
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
toolchain: stable
profile: minimal
components: llvm-tools-preview
override: true
- run: cargo install grcov --force --locked
env:
CARGO_TARGET_DIR: target/
- run: |
- name: Download grcov
run: |
curl -sL https://github.com/mozilla/grcov/releases/download/v0.8.18/grcov-x86_64-unknown-linux-gnu.tar.bz2 | tar jxf -
chmod +x ./grcov
- name: Generate the coverage data
run: |
cargo clean
cargo test --all-targets
cargo test --features integer128 --all-targets
cargo test --features indexmap --all-targets
cargo test --all-features --all-targets
grcov . -s . --binary-path ./target/debug/ \
-t cobertura -o cobertura.xml --branch \
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: -Cinstrument-coverage
RUSTDOCFLAGS: -Cinstrument-coverage
LLVM_PROFILE_FILE: coverage/coverage-%p-%m.profraw
- name: Generate the coverage reports
run: |
./grcov . -s . --binary-path ./target/debug/deps \
-t lcov -o coverage.lcov --branch \
--keep-only "src/*" \
--keep-only "tests/*" \
--ignore-not-existing \
--excl-line GRCOV_EXCL_LINE \
--excl-start GRCOV_EXCL_START \
--excl-stop GRCOV_EXCL_STOP
env:
RUSTFLAGS: -Cinstrument-coverage
RUSTDOCFLAGS: -Cinstrument-coverage
LLVM_PROFILE_FILE: codecov-%p-%m.profraw
- uses: codecov/codecov-action@v1
./grcov . -s . --binary-path ./target/debug/deps \
-t html --branch \
--keep-only "src/*" \
--keep-only "tests/*" \
--ignore-not-existing \
--excl-line GRCOV_EXCL_LINE \
--excl-start GRCOV_EXCL_START \
--excl-stop GRCOV_EXCL_STOP
rm -rf html/badges
# - name: Upload the coverage report to codecov.io
# uses: codecov/codecov-action@v1
# with:
# files: coverage.lcov
# fail_ci_if_error: true
- name: Deploy the code coverage report
uses: peaceiris/actions-gh-pages@v4
with:
fail_ci_if_error: true
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./html
destination_dir: coverage
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/master'
32 changes: 32 additions & 0 deletions .github/workflows/cibench.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CIBench
on: [pull_request]
jobs:
bench:
name: Benchmark
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
with:
key: bench
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Download the corpus
run: |
wget https://storage.googleapis.com/ron-backup.clusterfuzz-external.appspot.com/corpus/libFuzzer/ron_arbitrary/public.zip
mkdir -p fuzz/corpus/arbitrary
unzip public.zip -d fuzz/corpus/arbitrary
rm public.zip
- name: Generate benchmark seed
run: echo RON_FUZZ_BENCH_SEED=$(date +%s) >> $GITHUB_ENV
- uses: juntyr/criterion-compare-action@check-cargo-install
with:
cwd: fuzz
benchName: bench
branchName: ${{ github.base_ref }}
env:
RON_FUZZ_BENCH_CASES: 100
26 changes: 26 additions & 0 deletions .github/workflows/cifuzz.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: CIFuzz
on: [pull_request]
jobs:
Fuzzing:
runs-on: ubuntu-latest
steps:
- name: Build Fuzzers
id: build
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
with:
oss-fuzz-project-name: 'ron'
dry-run: false
language: rust
- name: Run Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
with:
oss-fuzz-project-name: 'ron'
fuzz-seconds: 300
dry-run: false
language: rust
- name: Upload Crash
uses: actions/upload-artifact@v4
if: failure() && steps.build.outcome == 'success'
with:
name: artifacts
path: ./out/artifacts
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -10,3 +10,9 @@
# Generated by Cargo
/target/
/Cargo.lock

# VSCode Extensions
/.trunk

# MacOS Shenanigans
.DS_Store
63 changes: 63 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -6,6 +6,69 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

## [0.9.0] - 2025-03-18

### API Changes

- Add `ron::value::RawValue` helper type which can (de)serialize any valid RON ([#407](https://github.com/ron-rs/ron/pull/407))
- Add `escape_strings` option to `PrettyConfig` to allow serialising with or without escaping ([#426](https://github.com/ron-rs/ron/pull/426))
- Add `compact_maps` and `compact_structs` options to `PrettyConfig` to allow serialising maps and structs on a single line ([#448](https://github.com/ron-rs/ron/pull/448))
- Add minimal support for `#[serde(flatten)]` with roundtripping through RON maps ([#455](https://github.com/ron-rs/ron/pull/455))
- Add minimal roundtripping support for `#[serde(tag = "tag")]`, `#[serde(tag = "tag", content = "content")]`, and `#[serde(untagged)]` enums ([#451](https://github.com/ron-rs/ron/pull/451))
- Breaking: Expand the `value::Number` enum to explicitly encode all possible number types ([#479](https://github.com/ron-rs/ron/pull/479))
- Add `number_suffixes` option to `PrettyConfig` to allow serialising numbers with their explicit type suffix, e.g. `42i32` ([#481](https://github.com/ron-rs/ron/pull/481))
- Allow `ron::value::RawValue` to capture any whitespace to the left and right of a ron value ([#487](https://github.com/ron-rs/ron/pull/487))
- Breaking: Enforce that ron always writes valid UTF-8 ([#488](https://github.com/ron-rs/ron/pull/488))
- Add convenient `Value::from` impls ([#498](https://github.com/ron-rs/ron/pull/498))
- Add new extension `explicit_struct_names` which requires that struct names are included during deserialization ([#522](https://github.com/ron-rs/ron/pull/522))
- Add new path-based field metadata serialization support via `PrettyConfig` ([#544](https://github.com/ron-rs/ron/pull/544))
- Breaking: Change `PrettyConfig` so that `new_line`, `indentor` and `separator` are all `Cow<'static, str>` instead of `String` ([#546](https://github.com/ron-rs/ron/pull/546))

### Format Changes

- [Non-API] Breaking: Treat `Some` like a newtype variant with `unwrap_variant_newtypes` ([#465](https://github.com/ron-rs/ron/pull/465))
- Allow parsing floating point literals with underscores ([#481](https://github.com/ron-rs/ron/pull/481))
- **Format-Breaking:** Switch from base64-encoded to Rusty byte strings, still allow base64 deserialising for now ([#438](https://github.com/ron-rs/ron/pull/438))
- Fix issue [#241](https://github.com/ron-rs/ron/issues/241) and allow parsing numbers with explicit type suffixes, e.g. `1u8` or `-1f32` ([#481](https://github.com/ron-rs/ron/pull/481))
- Add support for byte literals as strongly typed unsigned 8-bit integers ([#438](https://github.com/ron-rs/ron/pull/438))
- Fix issue [#321](https://github.com/ron-rs/ron/issues/321) and allow parsing UTF-8 identifiers ([#488](https://github.com/ron-rs/ron/pull/488))

### Bug Fixes

- Fix parsing `r` as a self-describing struct or variant name (and not the start of a raw string) ([#465](https://github.com/ron-rs/ron/pull/465))
- Fix serialising raw strings containing a literal backslash ([#465](https://github.com/ron-rs/ron/pull/465))
- Fix serialising `None` inside a stack of nested `Option`s with `#![enable(implicit_some)]` enabled ([#465](https://github.com/ron-rs/ron/pull/465))
- Fix deserialising deserialising `A('/')` into a `ron::Value` ([#465](https://github.com/ron-rs/ron/pull/465))
- Fix issue [#445](https://github.com/ron-rs/ron/issues/445) and allow parsing `+unsigned` as an unsigned int ([#479](https://github.com/ron-rs/ron/pull/479))
- Fix serialising reserved identifiers `true`, `false`, `Some`, `None`, `inf`[`f32`|`f64`], and `Nan`[`f32`|`f64`] ([#487](https://github.com/ron-rs/ron/pull/487))
- Disallow unclosed line comments at the end of `ron::value::RawValue` ([#489](https://github.com/ron-rs/ron/pull/489))
- Fix parsing of struct/variant names starting in `None`, `Some`, `true`, or `false` ([#499](https://github.com/ron-rs/ron/pull/499))
- Fix deserialising owned string field names in structs, allowing deserializing into `serde_json::Value`s ([#511](https://github.com/ron-rs/ron/pull/512))

### Miscellaneous

- Add CIFuzz GitHub action ([#429](https://github.com/ron-rs/ron/pull/429))
- Update the arbitrary fuzzer to check arbitrary serde data types, values, and `ron::ser::PrettyConfig`s ([#465](https://github.com/ron-rs/ron/pull/465))
- Add a benchmark for PRs that runs over the latest fuzzer corpus ([#465](https://github.com/ron-rs/ron/pull/465))
- Fuzz serde enum representations and collect current limitations in ron and serde ([#502](https://github.com/ron-rs/ron/pull/502))
- Update `base64` dependency to version 0.22 ([#529](https://github.com/ron-rs/ron/pull/529))
- Fix issue [#556](https://github.com/ron-rs/ron/issues/556) and update minium dependency versions ([#557](https://github.com/ron-rs/ron/pull/557))

## [0.8.1] - 2023-08-17

- Fix issues [#277](https://github.com/ron-rs/ron/issues/277) and [#405](https://github.com/ron-rs/ron/issues/405) with `Value::Map` `IntoIter` and extraneous item check for `Value::Seq` ([#406](https://github.com/ron-rs/ron/pull/406))
- Fix issue [#401](https://github.com/ron-rs/ron/issues/401) with correct raw struct name identifier parsing ([#402](https://github.com/ron-rs/ron/pull/402))
- Fix issue [#410](https://github.com/ron-rs/ron/issues/410) trailing comma parsing in tuples and `Some` ([#412](https://github.com/ron-rs/ron/pull/412))
- Error instead of panic when deserializing non-identifiers as field names ([#415](https://github.com/ron-rs/ron/pull/415))
- [Non-API] Breaking: Fix issue [#307](https://github.com/ron-rs/ron/issues/307) stack overflow with explicit recursion limits in serialising and deserialising ([#420](https://github.com/ron-rs/ron/pull/420))
- Fix issue [#423](https://github.com/ron-rs/ron/issues/423) deserialising an identifier into a borrowed str ([#424](https://github.com/ron-rs/ron/pull/424))
- Bump MSRV to 1.57.0 and bump dependency: `base64` to 0.20 ([#431](https://github.com/ron-rs/ron/pull/431))
- Bump dependency `base64` to 0.21 ([#433](https://github.com/ron-rs/ron/pull/433))
- Depend on `serde_derive` directly to potentially enable more compilation parallelism ([#441](https://github.com/ron-rs/ron/pull/441))
- [Non-API] Breaking: Bump `bitflags` dependency to 2.0, changes `serde` impls of `Extensions` ([#443](https://github.com/ron-rs/ron/pull/443))
- Add `Map::retain` method ([#460](https://github.com/ron-rs/ron/pull/460))
- Bump MSRV to 1.64.0 and bump dependency: `indexmap` to 2.0 ([#459](https://github.com/ron-rs/ron/pull/459))

## [0.8.0] - 2022-08-17

- Bump dependencies: `bitflags` to 1.3, `indexmap` to 1.9 ([#399](https://github.com/ron-rs/ron/pull/399))
Loading