Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from serde-rs:master #10

Open
wants to merge 575 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
575 commits
Select commit Hold shift + click to select a range
f482ed3
Add CI job using minimal-versions
dtolnay Jul 4, 2023
8f8a2b1
Eliminate syn 1 from minimal-versions
dtolnay Jul 4, 2023
897f913
No pre_ci in this repo
dtolnay Jul 4, 2023
d2fce19
Release 1.0.100
dtolnay Jul 4, 2023
5def336
Update to 2021 edition
dtolnay Jul 6, 2023
4514365
Fix bare trait in to_value doc example code
dtolnay Jul 6, 2023
f74b422
Return error on non-finite float keys
overdrivenpotato Jul 9, 2023
9963405
Print map float keys with `CompactFormatter`
overdrivenpotato Jul 9, 2023
22a5e9b
Deserialize float keys using `deserialize_number`
overdrivenpotato Jul 9, 2023
324c5b5
Fix formatting
overdrivenpotato Jul 9, 2023
18e1b59
Fix builds without `std` feature
overdrivenpotato Jul 9, 2023
5762701
Use `ryu` directly when formatting float keys
overdrivenpotato Jul 9, 2023
7760a1a
Remove extra variable
overdrivenpotato Jul 9, 2023
b0dbac7
Parse `Value::Map` numeric keys using `crate::from_str`
overdrivenpotato Jul 9, 2023
468a94a
Use Deserializer::* methods instead of `.parse()` for integer keys
overdrivenpotato Jul 9, 2023
a4e2719
Return error if numeric key starts with whitespace
overdrivenpotato Jul 10, 2023
b8d8d10
Merge pull request #1027 from overdrivenpotato/float-key
dtolnay Jul 11, 2023
76555ac
Improve error message on invalid numeric key
dtolnay Jul 11, 2023
d796aaa
Merge pull request #1035 from dtolnay/numkey
dtolnay Jul 11, 2023
bb60990
Resolve unnested_or_patterns pedantic clippy lint
dtolnay Jul 11, 2023
666b9cd
Buggy ptr_arg lint has been fixed in clippy
dtolnay Jul 11, 2023
66d28a8
Buggy iter_not_returning_iterator lint has been fixed in clippy
dtolnay Jul 11, 2023
f80ce0f
Enforce no use of question-mark operator
dtolnay Jul 11, 2023
f899904
Remove pre-NLL borrow checker workarounds
dtolnay Jul 11, 2023
6c8523f
Merge pull request #1036 from dtolnay/nll
dtolnay Jul 11, 2023
7933880
Delete dedicated whitespace-in-key error message
dtolnay Jul 11, 2023
de897a0
Straighten control flow of deserialize_numeric_key
dtolnay Jul 11, 2023
e8e5342
Deduplicate a bunch of identical deserialize_numeric_key expansions
dtolnay Jul 11, 2023
9604317
Rewrap PR 1027 comments to 80 columns and reword
dtolnay Jul 11, 2023
d816a2e
Merge adjacent integer key tests
dtolnay Jul 11, 2023
af242a1
Add optional trailing commas in treemap macro
dtolnay Jul 11, 2023
51b1bd0
Add test of trailing whitespace in integer key
dtolnay Jul 11, 2023
468547f
Make number deserialization usable on text that lives shorter than in…
dtolnay Jul 11, 2023
98c4db1
Add test of leading and trailing whitespace in integer key in from_value
dtolnay Jul 11, 2023
f1a28a3
Inline de::from_trait into deserialize_numeric_key
dtolnay Jul 11, 2023
0770869
Delete str fallback for Value numeric key methods
dtolnay Jul 11, 2023
defa896
Directly use caller's Visitor to deserialize numeric key from Value
dtolnay Jul 11, 2023
9f4c4af
Insert check for whitespace surrounding numeric map key
dtolnay Jul 11, 2023
0c4a7f8
Merge pull request #1037 from dtolnay/numkey
dtolnay Jul 11, 2023
1e1bfa8
Release 1.0.101
dtolnay Jul 11, 2023
3ddda75
Format PR 1037 with rustfmt
dtolnay Jul 11, 2023
55a7f5c
Inline Serializer::serialize_seq into serialize_bytes
dtolnay Jul 11, 2023
1b72f2b
Inline SerializeSeq::serialize_element into serialize_bytes
dtolnay Jul 11, 2023
0e2c949
Inline SerializeSeq::end into serialize_bytes
dtolnay Jul 11, 2023
44b4a6c
Simplify serialize_bytes
dtolnay Jul 11, 2023
6ad5495
Inline u8::serialize into serialize_bytes
dtolnay Jul 11, 2023
857b010
Inline Serializer::serialize_u8 into serialize_bytes
dtolnay Jul 11, 2023
a1ca32a
Factor out byte array serialization to a new Formatter method
dtolnay Jul 11, 2023
42dbd00
Merge pull request #1039 from dtolnay/writebytearray
dtolnay Jul 12, 2023
658689d
Release 1.0.102
dtolnay Jul 12, 2023
d1a07e2
Fix rustdoc::bare_urls lint in lexical code
dtolnay Jul 15, 2023
9c2879a
Opt in to generate-link-to-definition when building on docs.rs
dtolnay Jul 15, 2023
54bcb4d
Release 1.0.103
dtolnay Jul 15, 2023
8f90eac
Delete inline attributes throughout test suite
dtolnay Jul 17, 2023
8e8db8c
Implement IntoDeserializer for &Value
zetanumbers Jul 26, 2023
f6cc4f3
Merge pull request #1045 from ZetaNumbers/value-ref-into-deserializer
dtolnay Jul 26, 2023
ab08483
Release 1.0.104
dtolnay Jul 26, 2023
8652bf2
Resolve ignored_unit_patterns pedantic clippy lint
dtolnay Aug 12, 2023
58dd8d9
Add test for boolean keys in map
dtolnay Aug 15, 2023
283a68b
Support serializing bool in map keys
dtolnay Aug 15, 2023
68a5582
Support deserializing bool in map keys
dtolnay Aug 15, 2023
9b69f16
Delete test_serialize_rejects_bool_keys
dtolnay Aug 15, 2023
59d9f96
Merge pull request #1055 from dtolnay/boolkey
dtolnay Aug 15, 2023
0daacdd
Release 1.0.105
dtolnay Aug 15, 2023
d0c979a
chore: Remove no_btreemap_retain feature from build.rs
osiewicz Sep 3, 2023
716cb8f
chore: Remove no_btreemap_get_key_value and no_btreemap_remove_entry.
osiewicz Sep 3, 2023
c754f03
Remove limb_width32 and limb_width64 features
osiewicz Sep 3, 2023
16e04ce
fixup! Remove limb_width32 and limb_width64 features
Sep 3, 2023
6525ffa
Update actions/checkout@v3 -> v4
dtolnay Sep 5, 2023
4cc9ea7
adds `as_str` to `Number` if `arbitrary_precision` is enabled
chanced Sep 6, 2023
99bc2df
adds missing cfg attr to as_str
chanced Sep 6, 2023
029fda0
improves `Number::as_str` doc example
chanced Sep 7, 2023
1786de2
removes `println!` from example
chanced Sep 7, 2023
b438004
adds `as_number` to `Value`
chanced Sep 7, 2023
2cd5d59
minor cleanup of documentation for `Value::as_number`
chanced Sep 7, 2023
cf433e9
removes `unwrap` from assertions in `Value::as_number`
chanced Sep 7, 2023
c308779
Merge pull request 1069 from chanced/add-as_number-to-value
dtolnay Sep 9, 2023
de39b2a
Delete trailing whitespace from PR 1069
dtolnay Sep 9, 2023
6a5fef9
Wrap as_number documentation to 80 columns
dtolnay Sep 9, 2023
5a39516
Reorder Value::as_number after is_number
dtolnay Sep 9, 2023
95c5d6c
Fix documentation typo from PR 1069
dtolnay Sep 9, 2023
11b603c
Resolve rustdoc::redundant_explicit_links lint
dtolnay Sep 9, 2023
db75c22
Fix unintended u8 link inferred by intra doc link
dtolnay Sep 9, 2023
028b643
Merge pull request #1067 from chanced/add-as_str-to-number
dtolnay Sep 9, 2023
fc8dd13
Touch up PR 1067
dtolnay Sep 9, 2023
f16cad6
Add cfg banner to documentation of Number::as_str
dtolnay Sep 9, 2023
f346308
Elaborate on documentation of Number::as_str
dtolnay Sep 9, 2023
45f10ec
Release 1.0.106
dtolnay Sep 9, 2023
89a2741
Revert "Remove limb_width32 and limb_width64 features"
osiewicz Sep 11, 2023
83bdc5f
Omit return keyword in `remove_entry`
osiewicz Sep 11, 2023
04f7758
fixup! chore: Remove no_btreemap_get_key_value and no_btreemap_remove…
osiewicz Sep 11, 2023
2c22077
Merge pull request #1062 from osiewicz/remove_build_rs
dtolnay Sep 11, 2023
fe30766
Support deserializing from &RawValue
dtolnay Sep 13, 2023
4ea34a2
Merge pull request #1072 from dtolnay/rawvalue
dtolnay Sep 13, 2023
b9d296f
IntoDeserializer for &RawValue
dtolnay Sep 13, 2023
00626a0
Merge pull request #1073 from dtolnay/rawvalue
dtolnay Sep 13, 2023
b6e113f
Release 1.0.107
dtolnay Sep 13, 2023
57d529b
Test docs.rs documentation build in CI
dtolnay Sep 24, 2023
9d86391
Remove a few unnecessary lifetimes
dimo414 Oct 6, 2023
5bb6960
Merge pull request #1075 from dimo414/master
dtolnay Oct 6, 2023
39f5ad1
Remove 'remember to update' reminder from Cargo.toml
dtolnay Oct 18, 2023
421a70d
Fix unused imports
dtolnay Oct 25, 2023
4e091d5
Add test of negative NaN and negative infinity
dtolnay Oct 25, 2023
f56053d
Merge pull request #1080 from serde-rs/negativenan
dtolnay Oct 25, 2023
ebaf617
fixed typos
fritzrehde Oct 30, 2023
a8e6f75
Merge pull request #1081 from fritzrehde/master
dtolnay Oct 30, 2023
0f072fa
Improve Value From and FromIterator docs
dtolnay Oct 30, 2023
1454eac
Merge pull request #1082 from dtolnay/fromdoc
dtolnay Oct 30, 2023
4bc1eaa
Release 1.0.108
dtolnay Oct 30, 2023
05196ca
Update ui test suite to nightly-2023-11-19
dtolnay Nov 19, 2023
fe031cd
Delete trace_macros! functionality from test
dtolnay Dec 28, 2023
7ff6c9e
Use random hasher state for number hashing test
dtolnay Dec 28, 2023
b9bcbad
Use BuildHasher::hash_one
dtolnay Dec 28, 2023
b328ee7
Eliminate hash closure in favor of calling hash_one directly
dtolnay Dec 28, 2023
c367091
Merge pull request #1095 from dtolnay/hashtest
dtolnay Dec 28, 2023
df36d10
Restore doc cfg on re-exports
dtolnay Jan 1, 2024
bb62c73
Merge pull request #1097 from serde-rs/doccfg
dtolnay Jan 1, 2024
f88bf1f
Release 1.0.109
dtolnay Jan 1, 2024
c35856a
Pull in proc-macro2 sccache fix
dtolnay Jan 2, 2024
df5cf21
Release 1.0.110
dtolnay Jan 2, 2024
c80dbaf
Set limb width to 64 for loongarch64
heiher Jan 4, 2024
96ecfad
Merge pull request #1100 from heiher/limb-64-la64
dtolnay Jan 4, 2024
0131ac6
Release 1.0.111
dtolnay Jan 4, 2024
6d44b9f
Ignore unconditional_recursion clippy lint due to false positive
dtolnay Jan 12, 2024
2909b0b
fix: Correct spelling error
keienWang Jan 26, 2024
e56cc69
Merge pull request #1105 from keienWang/master
dtolnay Jan 26, 2024
296fafb
Factor out JSON-specific Display impl for serde::de::Unexpected
dtolnay Jan 26, 2024
62ca3e4
Handle Unexpected::Unit in Error::invalid_value
dtolnay Jan 26, 2024
107c2d1
Merge pull request #1106 from serde-rs/invalidvalue
dtolnay Jan 26, 2024
83d7bad
Format f64 in error messages using ryu
dtolnay Jan 26, 2024
6a6d2bb
Merge pull request #1107 from serde-rs/unexpectedfloat
dtolnay Jan 26, 2024
7fece96
Release 1.0.112
dtolnay Jan 26, 2024
ca3c2ca
Add swap_remove and shift_remove methods on Map
dtolnay Jan 29, 2024
5aeab4e
Merge pull request #1109 from serde-rs/remove
dtolnay Jan 29, 2024
09d865b
Release 1.0.113
dtolnay Jan 29, 2024
ca05f69
Remove unused Float::is_sign_negative trait method
dtolnay Feb 8, 2024
34a04c5
Ignore incompatible_msrv clippy false positives in test
dtolnay Feb 10, 2024
6fb7026
Work around prelude redundant import warnings
dtolnay Feb 19, 2024
e1b3a6d
Release 1.0.114
dtolnay Feb 20, 2024
fedf834
Ignore non_local_definitions false positive in test
dtolnay Feb 26, 2024
a25f6c6
Remove conditional on repr(transparent)
dtolnay Mar 22, 2024
8e7b37b
Merge pull request #1118 from serde-rs/transparent
dtolnay Mar 22, 2024
d2dbbf7
Ignore dead code lint in tests
dtolnay Mar 24, 2024
4a0be88
Format regression tests with rustfmt
dtolnay Mar 24, 2024
3a3f61b
Temporarily disable miri on doctests
dtolnay Mar 25, 2024
840da8e
Fix missing backticks in doc comments
titaniumtraveler Mar 25, 2024
218770b
Explicitly install a Rust toolchain for cargo-outdated job
dtolnay Mar 26, 2024
c3dc153
Merge pull request #1119 from titaniumtraveler/pr
dtolnay Mar 26, 2024
b1ebf38
Release 1.0.115
dtolnay Mar 26, 2024
0baba28
Resolve legacy_numeric_constants clippy lints
dtolnay Apr 6, 2024
2e15e3d
Revert "Temporarily disable miri on doctests"
dtolnay Apr 8, 2024
25dc750
Replace `features_check` mod with a call to `std::compile_error!`. F…
mleonhard Apr 15, 2024
051ce97
Merge pull request 1124 from mleonhard/master
dtolnay Apr 16, 2024
12c8ee0
Hide "non-exhaustive patterns" errors when crate fails to compile
dtolnay Apr 16, 2024
a3f62bb
Release 1.0.116
dtolnay Apr 16, 2024
16eb872
impl `Hash` for `Value`
edwardycl Apr 25, 2024
98f1a24
Resolve unexpected_cfgs warning
dtolnay May 7, 2024
b4fc245
Merge pull request #1130 from serde-rs/checkcfg
dtolnay May 7, 2024
fdf99c7
Combine number PartialEq tests
dtolnay May 7, 2024
4517c7a
PartialEq is not implemented between Value and 128-bit ints
dtolnay May 8, 2024
0ae247c
Release 1.0.117
dtolnay May 8, 2024
8e475f1
Rely on docs.rs to define --cfg=docsrs by default
dtolnay May 19, 2024
62839b7
Merge pull request #1136 from dtolnay/docsrs
dtolnay May 19, 2024
18e9b89
Resolve needless_raw_string_hashes pedantic clippy lint in test
dtolnay Jun 2, 2024
b83d243
Ignore large_digit_groups pedantic clippy lint in test
dtolnay Jun 2, 2024
c9b9f88
Run more of test suite in preserve_order mode
dtolnay Jun 2, 2024
fa8aa22
Fill in ignore reasons in all #[ignore] attributes
dtolnay Jun 2, 2024
4c894ea
Delete unused associated constant from lexical
dtolnay Jun 8, 2024
24d868f
Another lexical const that is unused, though not in test
dtolnay Jun 8, 2024
eb0330a
Merge pull request #1127 from edwardycl/hash
dtolnay Jun 25, 2024
0af2bda
Resolve semicolon_if_nothing_returned pedantic clippy lint from PR 1127
dtolnay Jun 25, 2024
5e7bedc
Touch up PR 1127
dtolnay Jun 25, 2024
51d94eb
Combine Map's Hash into one impl
dtolnay Jun 25, 2024
c4f24f3
Release 1.0.118
dtolnay Jun 25, 2024
a83fe96
chore: remove repeat words
haouvw Jun 26, 2024
a9e089a
Merge pull request #1146 from haouvw/master
dtolnay Jun 26, 2024
309ef6b
Add Map::shift_insert()
joshka Jun 30, 2024
c17e63f
Merge pull request #1149 from joshka/master
dtolnay Jun 30, 2024
352b7ab
Document the cfg required for Map::shift_insert to exist
dtolnay Jun 30, 2024
8878cd7
Make shift_insert available for inlining like other Map methods
dtolnay Jun 30, 2024
b48b9a3
Release 1.0.119
dtolnay Jun 30, 2024
3480fed
fix: indexmap minimal version with Map::shift_insert()
cforycki Jul 1, 2024
962c0fb
Merge pull request #1152 from cforycki/fix/index-map-minimal-version
dtolnay Jul 1, 2024
bcedc3d
Release 1.0.120
dtolnay Jul 1, 2024
fcb5e83
Correct documentation URL for Value's Index impl.
dpathakj Jul 2, 2024
3fd6f5f
Merge pull request #1153 from dpathakj/master
dtolnay Jul 3, 2024
3f1c6de
Ignore byte_char_slices clippy lint in test
dtolnay Jul 12, 2024
6a306e6
Move call to tri! out of check_recursion!
purplesyringa Jul 26, 2024
40dd7f5
Merge pull request #1159 from iex-rs/fix-recursion
dtolnay Jul 26, 2024
b1edc7d
Optimize position search in error path
purplesyringa Jul 26, 2024
b0d678c
Merge pull request #1160 from iex-rs/efficient-position
dtolnay Jul 28, 2024
eca2658
Release 1.0.121
dtolnay Jul 28, 2024
3faae03
Vectorize string parsing
purplesyringa Jul 29, 2024
03ceee9
Replace ESCAPE array with is_escape fn
purplesyringa Jul 29, 2024
63cb04d
Bring MSRV down
purplesyringa Jul 29, 2024
3063d69
Add better tests
purplesyringa Jul 29, 2024
7633cb7
Eliminate local_inner_macros in favor of non-ident macro paths
dtolnay Aug 1, 2024
611b2a4
Merge pull request #1165 from serde-rs/jsonmac
dtolnay Aug 1, 2024
6827c7b
Fix json! invocations when std prelude is not in scope
dtolnay Aug 1, 2024
49d7d66
Merge pull request #1166 from dtolnay/allocvec
dtolnay Aug 1, 2024
16fb6e0
Work around buggy rust-analyzer behavior
dtolnay Aug 1, 2024
54381d6
Release 1.0.122
dtolnay Aug 1, 2024
5496579
Inline memchr2 logic into Mycroft's algorithm
purplesyringa Aug 11, 2024
a95d6df
Big endian support
purplesyringa Aug 11, 2024
1f0dcf7
Allow clippy::items_after_statements
purplesyringa Aug 11, 2024
8389d8a
Don't run the slow algorithm from the beginning
purplesyringa Aug 11, 2024
e43da5e
Immediately bail-out on empty strings
purplesyringa Aug 11, 2024
859ead8
Merge pull request #1161 from iex-rs/vectorized-string-parsing
dtolnay Aug 11, 2024
346189a
Fix needless_borrow clippy lint in new control character test
dtolnay Aug 11, 2024
2cab07e
Release 1.0.123
dtolnay Aug 11, 2024
8eba786
Fix skip_to_escape on BE architectures
purplesyringa Aug 11, 2024
8b314a7
Merge pull request #1173 from iex-rs/fix-big-endian
dtolnay Aug 11, 2024
cf771a0
Release 1.0.124
dtolnay Aug 11, 2024
81b1b61
Test on BE and 32-bit platforms on CI via Miri
purplesyringa Aug 11, 2024
86d0e11
Parse \uXXXX escapes faster
purplesyringa Aug 11, 2024
a38dbf3
Mark \u parsing as cold
purplesyringa Aug 12, 2024
0e90b61
Format UTF-8 strings manually
purplesyringa Aug 12, 2024
2f28d10
Use the same UTF-8/WTF-8 impl for surrogates
purplesyringa Aug 12, 2024
236cc82
Simplify unicode escape handling
purplesyringa Aug 12, 2024
96ae604
Correct WTF-8 parsing
purplesyringa Aug 12, 2024
8073fc1
Merge pull request #1174 from iex-rs/miri-on-ci
dtolnay Aug 12, 2024
94a2aad
Improve job names for miri jobs
dtolnay Aug 12, 2024
b4bc643
Merge pull request #1176 from dtolnay/miriname
dtolnay Aug 12, 2024
d8921cd
Merge pull request #1172 from iex-rs/faster-hex
dtolnay Aug 12, 2024
0f942e5
Merge pull request 1175 from iex-rs/faster-backslash-u
dtolnay Aug 15, 2024
cc7a160
Touch up PR 1175
dtolnay Aug 15, 2024
6130f9b
Release 1.0.125
dtolnay Aug 15, 2024
9ffb43a
Optimize Unicode decoding by 1%
purplesyringa Aug 19, 2024
50c4328
Merge pull request #1178 from iex-rs/tiny-bit-faster-hex
dtolnay Aug 19, 2024
0ceb9d8
Add `OccupiedEntry::remove_entry()` (and shift/swap versions)
GREsau Aug 19, 2024
11fc61c
Add `OccupiedEntry::shift_remove()` and `swap_remove()`
GREsau Aug 19, 2024
3d837e1
Ensure the SWAR chunks are 64-bit in more cases
CryZe Aug 23, 2024
fec0376
Merge pull request #1182 from CryZe/chunk-64bit
dtolnay Aug 23, 2024
f268173
Unify chunk size choice between float and string parsing
dtolnay Aug 23, 2024
4b1048d
Merge pull request #1183 from serde-rs/arithmetic
dtolnay Aug 23, 2024
ffc4a43
Improve cfg names for fast arithmetic
dtolnay Aug 23, 2024
e6282b0
Merge pull request #1184 from serde-rs/fastarithmetic
dtolnay Aug 23, 2024
ec980b0
Release 1.0.126
dtolnay Aug 23, 2024
f287a3b
Merge pull request 1179 from GREsau/patch-1
dtolnay Aug 23, 2024
5ebf65c
Release 1.0.127
dtolnay Aug 23, 2024
27a4ca9
Upload CI Cargo.lock for reproducing failures
dtolnay Aug 25, 2024
5416cee
feat: add support for 128 bit HashMap key serialization
Mrreadiness Sep 4, 2024
599228d
Merge pull request #1188 from Mrreadiness/feat/add-hashmap-key-128-se…
dtolnay Sep 4, 2024
d96b1d9
Release 1.0.128
dtolnay Sep 4, 2024
59112ae
Replace f64::to_string with ryu
dtolnay Sep 4, 2024
4921906
Replace integer to_string with itoa
dtolnay Sep 4, 2024
3f4e30a
Replace char::to_string with encode_utf8
dtolnay Sep 4, 2024
d254281
Replace str::to_string with to_owned
dtolnay Sep 4, 2024
1faf3a1
Replace bool::to_string with if
dtolnay Sep 4, 2024
309cfc9
Resolve empty_line_after_doc_comments clippy lint in lexical
dtolnay Sep 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
133 changes: 104 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,15 @@ name: CI
on:
push:
pull_request:
workflow_dispatch:
schedule: [cron: "40 1 * * *"]

permissions:
contents: read

env:
RUSTFLAGS: -Dwarnings

jobs:
test:
name: Rust nightly ${{matrix.os == 'windows' && '(windows)' || ''}}
Expand All @@ -13,8 +20,9 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu, windows]
timeout-minutes: 45
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- run: cargo test
- run: cargo test --features preserve_order --tests -- --skip ui --exact
Expand All @@ -23,62 +31,129 @@ jobs:
- run: cargo test --features float_roundtrip,arbitrary_precision --tests -- --skip ui --exact
- run: cargo test --features raw_value --tests -- --skip ui --exact
- run: cargo test --features unbounded_depth --tests -- --skip ui --exact
- uses: actions/upload-artifact@v4
if: matrix.os == 'ubuntu' && always()
with:
name: Cargo.lock
path: Cargo.lock

build:
name: Rust ${{matrix.rust}} ${{matrix.os == 'windows' && '(windows)' || ''}}
runs-on: ${{matrix.os}}-latest
strategy:
fail-fast: false
matrix:
rust: [beta, stable, 1.45.0, 1.40.0, 1.36.0, 1.31.0]
rust: [beta, 1.64.0, 1.56.1]
os: [ubuntu]
include:
- rust: stable
os: ubuntu
target: aarch64-unknown-none
- rust: stable
os: windows
timeout-minutes: 45
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.rust}}
- run: cargo check
- run: cargo check --features preserve_order
if: matrix.rust != '1.31.0'
- run: cargo check --features float_roundtrip
- run: cargo check --features arbitrary_precision
- run: cargo check --features raw_value
- run: cargo check --features unbounded_depth
targets: ${{matrix.target}}
- run: cargo check --manifest-path tests/crate/Cargo.toml
- run: cargo check --manifest-path tests/crate/Cargo.toml --features float_roundtrip
- run: cargo check --manifest-path tests/crate/Cargo.toml --features arbitrary_precision
- run: cargo check --manifest-path tests/crate/Cargo.toml --features raw_value
- run: cargo check --manifest-path tests/crate/Cargo.toml --features unbounded_depth
- run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features --features alloc
- run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features --features alloc,arbitrary_precision
- run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features --features alloc,raw_value
- run: cargo check --manifest-path tests/crate/Cargo.toml --features serde_json/preserve_order
if: matrix.rust != '1.56.1'
- run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features --features alloc,serde_json/preserve_order
if: matrix.rust != '1.56.1'
- name: Build without std
run: |
rustup target add aarch64-unknown-none
cargo check \
--manifest-path tests/crate/Cargo.toml \
--target aarch64-unknown-none \
--no-default-features \
--features alloc
if: matrix.rust == 'stable' && matrix.os == 'ubuntu'
run: cargo check --manifest-path tests/crate/Cargo.toml --target ${{matrix.target}} --no-default-features --features alloc
if: matrix.target

nostd:
name: Rust 1.36.0
minimal:
name: Minimal versions
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v2
- uses: dtolnay/[email protected]
- run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features --features alloc
- run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features --features alloc,preserve_order
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- run: cargo generate-lockfile -Z minimal-versions
- run: cargo check --locked

miri:
name: Miri (${{matrix.name}})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: 64-bit little endian
target: x86_64-unknown-linux-gnu
- name: 64-bit big endian
target: powerpc64-unknown-linux-gnu
- name: 32-bit little endian
target: i686-unknown-linux-gnu
- name: 32-bit big endian
target: mips-unknown-linux-gnu
env:
MIRIFLAGS: -Zmiri-strict-provenance
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@miri
- run: sudo apt-get install gcc-powerpc-linux-gnu
if: matrix.target == 'powerpc64-unknown-linux-gnu'
- run: sudo apt-get install gcc-mips-linux-gnu
if: matrix.target == 'mips-unknown-linux-gnu'
- run: cargo miri setup
- run: cargo miri test --target ${{matrix.target}}
- run: cargo miri test --target ${{matrix.target}} --features preserve_order,float_roundtrip,arbitrary_precision,raw_value

clippy:
name: Clippy
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
timeout-minutes: 45
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@clippy
- run: cargo clippy
- run: cargo clippy --tests -- -Dclippy::all -Dclippy::pedantic
- run: cargo clippy --all-features --tests -- -Dclippy::all -Dclippy::pedantic

doc:
name: Documentation
runs-on: ubuntu-latest
timeout-minutes: 45
env:
RUSTDOCFLAGS: -Dwarnings
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- uses: dtolnay/install@cargo-docs-rs
- run: cargo docs-rs

fuzz:
name: Fuzz
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- run: cargo install cargo-fuzz --debug
- run: cargo fuzz build -O
- uses: dtolnay/install@cargo-fuzz
- run: cargo fuzz check

outdated:
name: Outdated
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: dtolnay/install@cargo-outdated
- run: cargo outdated --exit-code 1
- run: cargo outdated --manifest-path fuzz/Cargo.toml --exit-code 1
49 changes: 26 additions & 23 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,37 +1,41 @@
[package]
name = "serde_json"
version = "1.0.60" # remember to update html_root_url
version = "1.0.128"
authors = ["Erick Tryzelaar <[email protected]>", "David Tolnay <[email protected]>"]
license = "MIT OR Apache-2.0"
categories = ["encoding", "parser-implementations", "no-std"]
description = "A JSON serialization file format"
repository = "https://github.com/serde-rs/json"
documentation = "https://docs.serde.rs/serde_json/"
documentation = "https://docs.rs/serde_json"
edition = "2021"
keywords = ["json", "serde", "serialization"]
categories = ["encoding"]
readme = "README.md"
include = ["build.rs", "src/**/*.rs", "README.md", "LICENSE-APACHE", "LICENSE-MIT"]
edition = "2018"
license = "MIT OR Apache-2.0"
repository = "https://github.com/serde-rs/json"
rust-version = "1.56"

[dependencies]
serde = { version = "1.0.100", default-features = false }
indexmap = { version = "1.5", optional = true }
itoa = { version = "0.4.3", default-features = false }
indexmap = { version = "2.2.3", optional = true }
itoa = "1.0"
memchr = { version = "2", default-features = false }
ryu = "1.0"
serde = { version = "1.0.194", default-features = false }

[dev-dependencies]
automod = "1.0"
rustversion = "1.0"
serde_bytes = "0.11"
serde_derive = "1.0"
serde_stacker = "0.1"
trybuild = { version = "1.0.19", features = ["diff"] }
automod = "1.0.11"
indoc = "2.0.2"
ref-cast = "1.0.18"
rustversion = "1.0.13"
serde = { version = "1.0.194", features = ["derive"] }
serde_bytes = "0.11.10"
serde_derive = "1.0.166"
serde_stacker = "0.1.8"
trybuild = { version = "1.0.81", features = ["diff"] }

[workspace]
members = ["tests/crate"]
[lib]
doc-scrape-examples = false

[package.metadata.docs.rs]
features = ["raw_value", "unbounded_depth"]
features = ["preserve_order", "raw_value", "unbounded_depth"]
targets = ["x86_64-unknown-linux-gnu"]
rustdoc-args = ["--generate-link-to-definition"]

[package.metadata.playground]
features = ["raw_value"]
Expand All @@ -42,18 +46,17 @@ features = ["raw_value"]
[features]
default = ["std"]

std = ["serde/std"]
std = ["memchr/std", "serde/std"]

# Provide integration for heap-allocated collections without depending on the
# rest of the Rust standard library.
# NOTE: Disabling both `std` *and* `alloc` features is not supported yet.
# Available on Rust 1.36+.
alloc = ["serde/alloc"]

# Make serde_json::Map use a representation which maintains insertion order.
# This allows data to be read into a Value and written back to a JSON string
# while preserving the order of map keys in the input.
preserve_order = ["indexmap"]
preserve_order = ["indexmap", "std"]

# Use sufficient precision when parsing fixed precision floats from JSON to
# ensure that they maintain accuracy when round-tripped through JSON. This comes
Expand Down
25 changes: 0 additions & 25 deletions LICENSE-APACHE
Original file line number Diff line number Diff line change
Expand Up @@ -174,28 +174,3 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Loading