Skip to content

Update json5 crate dependency from 0.4.1 to 1.3.1 - #755

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

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

Conversation

@notpeter

@notpeter notpeter commented May 13, 2026 •

Copy link
Copy Markdown

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

epage commented May 13, 2026

Copy link
Copy Markdown
Contributor

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.

@hwright

hwright commented Sep 21, 2026

Copy link
Copy Markdown

I would also like to see this upgrade happen. What are the chances we could bump the MSRV to 1.88 so that this would be possible?

@epage epage mentioned this pull request Sep 21, 2026
@epage epage closed this in #774 Sep 21, 2026
hwright pushed a commit to hwright/config-rs that referenced this pull request Sep 21, 2026
### What does this PR try to solve?

Closes rust-cli#755

### Notes to reviewers

LLM involvement: none
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.

3 participants