Skip to content

Update json5 crate dependency from 0.4.1 to 1.3.1#755

Open
notpeter wants to merge 1 commit into
rust-cli:mainfrom
notpeter:bump_json5
Open

Update json5 crate dependency from 0.4.1 to 1.3.1#755
notpeter wants to merge 1 commit into
rust-cli:mainfrom
notpeter:bump_json5

Conversation

@notpeter
Copy link
Copy Markdown

@notpeter notpeter commented May 13, 2026

This updates the JSON5 dependency from v0.4.1 (2021-09-21) to v1.3.1 (2026-02-27).

If you look at the diff of 0.4.1...1.3.1 you can see v1.0.0 was a clean rewrite which switched licenses (ISC to MIT) and switched from a PEST.rs generated backend to a hand-written one.

This results in a smaller download (net -1.7MB when dependencies included) and a slightly faster build (1-3% when building config-rs with default features on my M5 Pro Macbook).

According to the author, performance is ~20x better:

google/serde_json5 was a fork of the Pest version of serde_json5

serde_json5 benchmarks

@epage
Copy link
Copy Markdown
Contributor

epage commented May 13, 2026

See

  error[E0658]: `let` expressions in this position are unstable
     --> /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/json5-1.3.1/src/de.rs:271:15
      |
  271 |         while let Some((o, c)) = self.peek()
      |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |
      = note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information

I had previously looked at this in #741.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants