Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1276 commits
Select commit Hold shift + click to select a range
966e9cc
Merge pull request #2839 from dtolnay/pr2558
dtolnay Oct 22, 2024
a8cbc91
Ignore needless_lifetimes clippy lint in generated code
dtolnay Oct 22, 2024
5382ef3
Merge pull request #2840 from dtolnay/needlesslifetimes
dtolnay Oct 22, 2024
6a7de26
Ignore uninlined_format_args pedantic clippy lint
dtolnay Oct 22, 2024
991e344
Raise required compiler for serde_derive to 1.61
dtolnay Oct 22, 2024
d4486be
Format all ui tests from PR 2558 using rustfmt
dtolnay Oct 22, 2024
00460b8
Fix wording in comments from PR 2558
dtolnay Oct 22, 2024
ab4f3f3
Reduce scope of quote_spanned on SerializeWith wrapper
dtolnay Oct 22, 2024
830309f
Merge pull request #2841 from dtolnay/serializewith
dtolnay Oct 22, 2024
3393ad6
Make most of prepare_enum_variant_enum independent of variant_names_i…
dtolnay Oct 22, 2024
0a06af8
Rename field_names_idents -> field_idents_aliases
dtolnay Oct 22, 2024
c6a5be7
Rename variant_names_idents -> variant_idents_aliases
dtolnay Oct 22, 2024
1f9eb83
Merge pull request #2842 from dtolnay/identsaliases
dtolnay Oct 22, 2024
09f6d93
Collect field ident and aliases into a struct
dtolnay Oct 22, 2024
af4c388
Merge pull request #2843 from dtolnay/fieldwithaliases
dtolnay Oct 22, 2024
1b8310d
Release 1.0.211
dtolnay Oct 22, 2024
29d4f3e
Format regression tests with rustfmt
dtolnay Oct 22, 2024
0058c72
Add regression test for issue 2844
dtolnay Oct 22, 2024
1e36ef5
Fix hygiene of macro-generated local variable accesses in serde(with)…
dtolnay Oct 22, 2024
1ac054b
Merge pull request #2845 from dtolnay/withlocal
dtolnay Oct 22, 2024
7ae1b5f
Release 1.0.212
dtolnay Oct 22, 2024
49e11ce
Ignore trivially_copy_pass_by_ref pedantic clippy lint in test
dtolnay Oct 22, 2024
fdc36e5
Add regression test for issue 2846
dtolnay Oct 22, 2024
b60e409
Hygiene for macro-generated newtype struct deserialization with 'with…
dtolnay Oct 22, 2024
79925ac
Ignore dead_code warning in regression test
dtolnay Oct 22, 2024
ef0ed22
Merge pull request #2847 from dtolnay/newtypewith
dtolnay Oct 22, 2024
58a8d22
Release 1.0.213
dtolnay Oct 22, 2024
9cda015
Implement IntoDeserializer for all Deserializers in serde::de::value …
Mingun Aug 11, 2023
5f9fffa
Add checks for conflicts for aliases
Mingun Aug 8, 2023
210373b
Merge pull request #2568 from Mingun/into_deserializer-for-deserializers
dtolnay Oct 28, 2024
4180621
Release 1.0.214
dtolnay Oct 28, 2024
adf05a5
Merge pull request #2562 from Mingun/alias-check
oli-obk Nov 1, 2024
951ca5a
pacify clippy
oli-obk Nov 1, 2024
a95b0d3
Merge pull request #2853 from serde-rs/oli-obk-patch-1
oli-obk Nov 1, 2024
60ac737
Prevent upload-artifact step from causing CI failure
dtolnay Nov 9, 2024
3035d4f
Rename Name -> MultiName
dtolnay Nov 11, 2024
f0b5c4f
Move MultiName to a new module
dtolnay Nov 11, 2024
373edcd
Keep track of a span for alias strings
dtolnay Nov 11, 2024
7f1e697
Merge pull request #2855 from dtolnay/namespan
dtolnay Nov 11, 2024
c59e876
Produce a separate warning for every colliding name
dtolnay Nov 11, 2024
b1353a9
Merge pull request #2856 from dtolnay/dename
dtolnay Nov 11, 2024
a20e924
Revert "pacify clippy"
dtolnay Nov 11, 2024
edd6fe9
Revert "Add checks for conflicts for aliases"
dtolnay Nov 11, 2024
111ecc5
Update ui tests for warning on colliding aliases
dtolnay Nov 11, 2024
7d96352
Merge pull request #2857 from dtolnay/collide
dtolnay Nov 11, 2024
1a3cf4b
Update PR 2562 ui tests
dtolnay Nov 11, 2024
fa5d58c
Use ui test syntax that does not interfere with rustfmt
dtolnay Nov 11, 2024
8939af4
Release 1.0.215
dtolnay Nov 11, 2024
0307f60
Resolve question_mark clippy lint in build script
dtolnay Nov 16, 2024
c270e27
Use BuildHasher instead of Hasher in collection macros
dtolnay Nov 16, 2024
b9dbfcb
Switch out fnv in favor of foldhash in test
dtolnay Nov 16, 2024
e9c399c
Mark generated `impl de::Visitor` blocks as `#[automatically_derived]`
tdittr Dec 5, 2024
46e9ecf
Merge pull request #2866 from tdittr/mark-visitors-as-generated
oli-obk Dec 9, 2024
9497463
Mark all generated trait impls as #[automatically_derived]
dtolnay Dec 11, 2024
f91d2ed
Merge pull request #2868 from dtolnay/automaticallyderived
dtolnay Dec 11, 2024
ad8dd41
Release 1.0.216
dtolnay Dec 11, 2024
dbb9091
Replace #[start] with extern fn main
dtolnay Dec 20, 2024
8478a3b
Merge pull request #2871 from dtolnay/nostdstart
dtolnay Dec 20, 2024
eb5cd47
Drop #[lang = "eh_personality"] from no-std test
dtolnay Dec 20, 2024
b9f93f9
Add no-std CI on stable compiler
dtolnay Dec 20, 2024
2a5caea
Merge pull request #2872 from dtolnay/ehpersonality
dtolnay Dec 20, 2024
b6f339c
Resolve repr_packed_without_abi clippy lint in tests
dtolnay Dec 27, 2024
cb6eaea
Fix roundtrip inconsistency:
Mingun Aug 3, 2024
930401b
Release 1.0.217
dtolnay Dec 27, 2024
1e2f931
Remove **/*.rs.bk from project-specific gitignore
dtolnay Jan 23, 2025
dc3031b
Remove *.sw[po] from gitignore
dtolnay Jan 23, 2025
04ff3e8
More precise gitignore patterns
dtolnay Jan 23, 2025
7cd4d84
Update ui test suite to nightly-2025-02-07
dtolnay Feb 7, 2025
aaccac7
Unset doc-scrape-examples for lib target
dtolnay Feb 10, 2025
abe7194
Update ui test suite to nightly-2025-02-12
dtolnay Feb 12, 2025
85cb0c4
Convert html links to intra-doc links
dtolnay Feb 20, 2025
03dc0fc
Merge pull request #2894 from dtolnay/doclink
dtolnay Feb 20, 2025
2b44efb
Point standard library links to stable
dtolnay Feb 20, 2025
723a949
Merge pull request #2895 from dtolnay/stabledoc
dtolnay Feb 20, 2025
7bfd518
Release 1.0.218
dtolnay Feb 20, 2025
6a630cf
Also link to stable proc_macro
dtolnay Feb 20, 2025
e3eaa6a
Merge pull request #2896 from dtolnay/stabledoc
dtolnay Feb 20, 2025
f0d1ae0
Ignore elidable_lifetime_names pedantic clippy lint
dtolnay Mar 3, 2025
1c96013
Resolve mem_replace_with_default clippy lint
dtolnay Mar 3, 2025
a8bdd17
Remove unused Punctuated import
dtolnay Mar 3, 2025
13a33b3
Bump MSRV to 1.56
oli-obk Mar 5, 2025
6ac8049
clippy
oli-obk Mar 5, 2025
e3a4165
Switch all crates to edition 2021
oli-obk Mar 5, 2025
8b0e95b
clippy
oli-obk Mar 5, 2025
168b6cf
fix clippy absolute paths warning
davidzeng0 Mar 9, 2025
514848b
Merge pull request #2906 from davidzeng0/master
dtolnay Mar 9, 2025
40f1d19
Wrap dummy.rs to 80 columns
dtolnay Mar 9, 2025
49d098d
Release 1.0.219
dtolnay Mar 9, 2025
da0b473
Merge pull request #2901 from serde-rs/msrv-and-edition-bump
dtolnay Mar 9, 2025
aa5aa61
Touch up PR 2901
dtolnay Mar 9, 2025
d91f8ba
Drop unused no_float_copysign cfg
dtolnay Mar 9, 2025
88da17c
chore: fix the incorrect symbol
jimmycathy Mar 16, 2025
a685dcf
Merge pull request #2910 from jimmycathy/master
dtolnay Mar 16, 2025
b0e87ae
Drop trailing whitespace from CI job name
dtolnay Mar 26, 2025
b426ff8
Merge pull request #2913 from dtolnay/nightlywindows
dtolnay Mar 26, 2025
16af2d9
Update a Rust edition to 2021 across project files
vishal-kr-barnwal Apr 27, 2025
b9de365
Merge pull request #2919 from vishal-kr-barnwal/master
oli-obk Apr 27, 2025
da3998a
Pin nightly toolchain used for miri job
dtolnay May 17, 2025
ae38b27
add `#[allow(deprecated)]` to derive implementations
rcrisanti Jan 8, 2025
a1ddb18
Resolve new dead_code warnings in test suite
dtolnay May 31, 2025
2130ba5
Ignore mismatched_lifetime_syntaxes lint
dtolnay Jun 6, 2025
80b2f5f
Remove `actually_private::T`
Mingun Jun 6, 2025
ad6c548
Use associated type in signature to not repeat concrete type
Mingun Jun 6, 2025
babafa5
Merge pull request #2939 from Mingun/remove-actually-private
oli-obk Jun 6, 2025
f386930
feat: extract serde_core out of serde
osiewicz May 25, 2025
5fcfbed
review: Update license symlinks
osiewicz Jun 6, 2025
43f5eb5
review: Bring back old doc comment for serde_core
osiewicz Jun 6, 2025
3deb089
review: Gate Result impls behind a feature gate
osiewicz Jun 6, 2025
f9baf39
review: Update crates-io.md
osiewicz Jun 6, 2025
106da49
Fix temporary value lifetime in serialize_struct
aytey Aug 1, 2025
363deb8
Work around dead code warnings
oli-obk Aug 26, 2025
c85e424
Allow more dead code
oli-obk Aug 26, 2025
b4677fd
Bump outdated test dependency
oli-obk Aug 26, 2025
94acfe1
Format with rustfmt 1.8.0-nightly
dtolnay Sep 13, 2025
723fcac
Merge pull request #2608 from osiewicz/extract_serde_core
dtolnay Sep 13, 2025
3e1cf11
Organize on_unimplemented ui test into directory
dtolnay Sep 13, 2025
908f321
Add ui test of unimplemented trait required by dependency
dtolnay Sep 13, 2025
4bddf1b
Override diagnostic::on_unimplemented message of all serde_core traits
dtolnay Sep 13, 2025
66c5d2b
Merge pull request #2963 from dtolnay/diagnosticpath
dtolnay Sep 13, 2025
4da055a
Fix broken link in serde_core crates.io readme
dtolnay Sep 13, 2025
6c4cae6
Point API documentation to docs.rs/serde
dtolnay Sep 13, 2025
51f8b0c
Rewrite serde_core readme
dtolnay Sep 13, 2025
c1b2f43
Tweak explanation of "result" feature
dtolnay Sep 13, 2025
ac8b7ea
Update serde_core package.description in Cargo.toml
dtolnay Sep 13, 2025
79f3484
Merge pull request #2964 from dtolnay/serdecoredoc
dtolnay Sep 13, 2025
c069b5c
Forcibly enable serde_core/result when using serde
dtolnay Sep 13, 2025
1b89ff5
Merge pull request #2965 from dtolnay/enableresult
dtolnay Sep 13, 2025
3c747e4
Relocate serde_derive version constraint from serde to serde_core
dtolnay Sep 13, 2025
8909fc0
Enforce derive cannot be used against serde_core
dtolnay Sep 13, 2025
35c9631
Merge pull request #2966 from dtolnay/noserdecore
dtolnay Sep 13, 2025
b6c7ce8
Specify the cfg in which 'tri!' is used
dtolnay Sep 13, 2025
93f43ce
Merge pull request #2967 from dtolnay/tricfg
dtolnay Sep 13, 2025
f669f16
Restore __deserialize_content optimization
dtolnay Sep 13, 2025
7659fb6
Inline SeqDeserializer and MapDeserializer for Content
dtolnay Sep 13, 2025
260511d
Merge pull request #2968 from dtolnay/deserializecontent
dtolnay Sep 13, 2025
a168934
Make module for Content-related private code
dtolnay Sep 13, 2025
7f83122
Make from_utf8_lossy private
dtolnay Sep 13, 2025
f916ec6
Make size_hint private
dtolnay Sep 13, 2025
5ac3d84
Make InPlaceSeed private
dtolnay Sep 13, 2025
a9150aa
Make serde_core::Result private
dtolnay Sep 13, 2025
0990d97
Merge pull request #2969 from dtolnay/coreprivate
dtolnay Sep 13, 2025
7987ad7
Fix serde_core doc tests
dtolnay Sep 13, 2025
a1a82c3
Replace serde_core::* glob export
dtolnay Sep 13, 2025
6bea2e0
Move doc helper macros to serde_core
dtolnay Sep 13, 2025
69aa109
Merge pull request #2970 from dtolnay/coredoctest
dtolnay Sep 13, 2025
690785f
Add CI coverage of serde_core
dtolnay Sep 13, 2025
23dea60
Merge pull request #2971 from dtolnay/serdecoreci
dtolnay Sep 13, 2025
263a1db
Link to serde.rs without trailing slash
dtolnay Sep 13, 2025
be255d6
Release 1.0.220
dtolnay Sep 13, 2025
1051c5e
Enforce trybuild >= 1.0.108
dtolnay Sep 13, 2025
1ffbeb9
Patch serde_core at workspace level
dtolnay Sep 13, 2025
9cf3f2e
Merge pull request #2974 from dtolnay/patchserdecore
dtolnay Sep 14, 2025
900c922
Illustrate build timings in serde_core readme
dtolnay Sep 13, 2025
85bf29c
Merge pull request #2973 from dtolnay/timings
dtolnay Sep 14, 2025
3bea3b6
Move serde_if_integer128 macro to serde
dtolnay Sep 14, 2025
2f03899
Deprecate serde_if_integer128 macro
dtolnay Sep 14, 2025
10bcfc0
Merge pull request #2975 from dtolnay/integer128
dtolnay Sep 14, 2025
ff3aee4
Release 1.0.221
dtolnay Sep 14, 2025
cf141aa
Move Content's Clone impl from serde_core to serde
dtolnay Sep 14, 2025
00b1b6b
Move Content's Deserialize impl from serde_core to serde
dtolnay Sep 14, 2025
fd4decf
Merge pull request #2976 from dtolnay/content
dtolnay Sep 14, 2025
3f69251
Delete unneeded field of MapDeserializer
dtolnay Sep 14, 2025
bb58726
Merge pull request #2950 from aytey/fix_lifetime_issue_2024
dtolnay Sep 14, 2025
57e21a1
Release 1.0.222
dtolnay Sep 14, 2025
ed76364
Change serde_core's html_root_url to docs.rs/serde_core
dtolnay Sep 14, 2025
a4ac0c2
Merge pull request #2978 from dtolnay/htmlrooturl
dtolnay Sep 14, 2025
6c316d7
Release 1.0.223
dtolnay Sep 14, 2025
bf9ebea
Mark every trait impl for a private type with do_not_recommend
dtolnay Sep 15, 2025
840f6ec
Merge pull request #2979 from dtolnay/private
dtolnay Sep 15, 2025
1699882
Release 1.0.224
dtolnay Sep 15, 2025
957996f
Make all use of __private go through interpolation
dtolnay Sep 15, 2025
cbe98a9
Use differently named __private module per patch release
dtolnay Sep 15, 2025
b47f4df
Unify access to the serde namespace
Mingun May 24, 2025
5b37e8a
Merge pull request #2980 from dtolnay/private
dtolnay Sep 15, 2025
69072f2
Merge pull request 2931 from Mingun/unify-serde-access
dtolnay Sep 15, 2025
373b11d
Merge pull request 2879 from rcrisanti/fix/silence-deprecation-warnin…
dtolnay Sep 16, 2025
97168d3
Touch up PR 2879
dtolnay Sep 16, 2025
1d7899d
Release 1.0.225
dtolnay Sep 16, 2025
55615e8
Fix instructions for testing contributions
Mingun Sep 16, 2025
6f5eb7d
Merge pull request #2983 from Mingun/fix-test-instructions
dtolnay Sep 16, 2025
553a9ff
Document functions that are entry points for generating bodies of dif…
Mingun May 28, 2025
c451415
Do not duplicate variant deserialization code
Mingun May 28, 2025
2659b94
Create deserializer only when needed
Mingun May 28, 2025
6805bba
Inline variables that used only once
Mingun May 28, 2025
bfb020d
Use `variant` name for field instead of `field`
Mingun May 29, 2025
ee3c237
Opt in to generate-macro-expansion when building on docs.rs
dtolnay Sep 16, 2025
1c1a5d9
Reorder struct_ and newtype tests of adjacently_tagged enums to match…
Mingun Aug 3, 2024
a20e66e
Check serialization in flatten::enum_::internally_tagged::unit_enum_w…
Mingun Aug 3, 2024
fe7dcc4
Test all possible orders of map entries for enum-flatten-in-struct re…
Mingun Aug 3, 2024
c09e2bd
Add tests for flatten unit variant in adjacently tagged (tag + conten…
Mingun Aug 3, 2024
2316610
Merge pull request #2929 from Mingun/flatten-enum-tests
oli-obk Sep 18, 2025
defc24d
Remove "did not work" comment from test suite
dtolnay Sep 20, 2025
8a3c29f
Merge pull request #2986 from dtolnay/didnotwork
dtolnay Sep 20, 2025
2dbeefb
Merge pull request #2935 from Mingun/dedupe-adj-enums
dtolnay Sep 20, 2025
1799547
Release 1.0.226
dtolnay Sep 20, 2025
15be2a6
Remove confusing call to deserialize_untagged_variant in deserialize_…
Mingun Aug 10, 2024
6dffc0b
Remove one-line intermediate function
Mingun Jun 14, 2025
4855fb4
Move code for injecting tagged variants to untagged generator to the …
Mingun Jun 14, 2025
ddb7c4b
Convert `split_with_de_lifetime` to method of `Parameters`
Mingun Jun 14, 2025
ca79f61
`deserialize_internally_tagged_variant` always called with the same `…
Mingun Sep 19, 2025
3a682c9
`deserialize_untagged_variant` always called with the same `deseriali…
Mingun Sep 19, 2025
915686d
`deserialize_untagged_newtype_variant` always called with the same `d…
Mingun Sep 19, 2025
896d91f
TupleForm::Untagged always instantiated with the same deserializer, s…
Mingun Sep 19, 2025
c8184be
StructForm::Untagged always instantiated with the same deserializer, …
Mingun Sep 19, 2025
e04f0ba
StructForm::InternallyTagged always instantiated with the same deseri…
Mingun Sep 19, 2025
e60f62a
Move body generator for adjacently tagged enums to its own module
Mingun Jun 14, 2025
85d0b9c
Move body generator for externally tagged enums to its own module
Mingun Jun 14, 2025
ae00c4a
Move body generator for internally tagged enums to its own module
Mingun Jun 14, 2025
ec13eb4
Move body generator for untagged enums to its own module
Mingun Jun 14, 2025
19956e6
Move body generator for enums to its own module
Mingun Sep 19, 2025
2d607de
Move body generator for structs to its own module
Mingun Jun 14, 2025
c4986f1
Move body generator for tuple structs to its own module
Mingun Sep 19, 2025
c4a07ed
Move body generator for unit structs to its own module
Mingun Sep 19, 2025
fa298c9
Move generator for identifiers to its own module
Mingun Sep 19, 2025
88b6a9a
Rename functions and run `cargo fmt`
Mingun Sep 19, 2025
8c3445e
Group some functions that used together
Mingun Sep 19, 2025
027112e
Visibility fix for Rust 1.61
Mingun Sep 21, 2025
502a065
Merge pull request #2987 from Mingun/split-de-generator
dtolnay Sep 25, 2025
c78f7d2
Rename Parameters::generics -> generics_with_de_lifetime
dtolnay Sep 25, 2025
e219a0d
Replace unnecessary use of generics_with_de_lifetime
dtolnay Sep 25, 2025
dec153b
Adjust comments
dtolnay Sep 25, 2025
ad2b064
Adjust variable names
dtolnay Sep 25, 2025
20fc31c
Rename identifier::generate_body -> deserialize_custom
dtolnay Sep 25, 2025
a437ff6
Rename identifier::generate_identifier -> deserialize_generated
dtolnay Sep 25, 2025
b395215
Rename all other generate_body -> deserialize
dtolnay Sep 25, 2025
8047570
Rename generate_body_in_place -> deserialize_in_place
dtolnay Sep 25, 2025
11ce440
Rename enum_untagged::generate_variant -> deserialize_variant
dtolnay Sep 25, 2025
3a7c11c
Rename enum_untagged::generate_newtype_variant -> deserialize_newtype…
dtolnay Sep 25, 2025
aa2d9b2
Merge pull request #2989 from dtolnay/pr2987
dtolnay Sep 25, 2025
7c83691
No longer macro_use integer128 module
dtolnay Sep 25, 2025
b7dbf7e
Merge pull request #2990 from dtolnay/integer128
dtolnay Sep 25, 2025
f8137c7
Inline serde_core into serde in docsrs mode
dtolnay Sep 25, 2025
2fb6748
Remove InPlaceSeed public re-export
dtolnay Sep 25, 2025
9d3410e
Merge pull request #2992 from dtolnay/inplaceseed
dtolnay Sep 25, 2025
7c58427
Merge pull request #2991 from dtolnay/inlinecoredoc
dtolnay Sep 25, 2025
415d9fc
Release 1.0.227
dtolnay Sep 25, 2025
ab58178
Workaround for RUSTDOCFLAGS='--cfg=docsrs'
dtolnay Sep 27, 2025
5adc9e8
Merge pull request #2995 from dtolnay/rustdocflags
dtolnay Sep 27, 2025
a866b33
Release 1.0.228
dtolnay Sep 27, 2025
9f9a1ea
Do not use ? operator in the generated code where possible
Mingun May 29, 2025
4e27870
Merge pull request #2936 from Mingun/remove-fixme
dtolnay Sep 28, 2025
086353c
refactor: remove 1 level of nesting
nik-rev Oct 17, 2025
b517ec9
Merge pull request #3001 from nik-contrib/refactor
dtolnay Oct 17, 2025
d656b4d
Raise required compiler for serde_derive to Rust 1.65
dtolnay Oct 19, 2025
fae23fe
Resolve manual_let_else pedantic clippy lint
dtolnay Oct 19, 2025
5a44519
Raise required compiler for serde_derive to Rust 1.68
dtolnay Oct 19, 2025
56c29b3
Update name of empty_enum clippy lint
dtolnay Nov 2, 2025
e42684f
Update ui test suite to nightly-2025-11-02
dtolnay Nov 2, 2025
1c396d2
Update actions/checkout@v4 -> v5
dtolnay Nov 20, 2025
f7fc3e0
Update actions/checkout@v5 -> v6
dtolnay Nov 20, 2025
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
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: dtolnay
196 changes: 107 additions & 89 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,161 +3,179 @@ name: CI
on:
push:
pull_request:
workflow_dispatch:
schedule: [cron: "40 1 * * *"]

permissions:
contents: read

env:
RUSTFLAGS: -Dwarnings

jobs:
test:
name: Test suite
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@nightly
- run: cd test_suite && cargo test --features unstable
- uses: actions/upload-artifact@v4
if: always()
with:
name: Cargo.lock
path: Cargo.lock
continue-on-error: true

windows:
name: Test suite (windows)
runs-on: windows-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@nightly
- run: cd test_suite && cargo test --features unstable -- --skip ui --exact

stable:
name: Rust stable
name: Rust ${{matrix.rust}}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust: [stable, beta]
timeout-minutes: 45
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@stable
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.rust}}
- run: cd serde && cargo build --features rc
- run: cd serde && cargo build --no-default-features
- run: cd serde_test && cargo build
- run: cd serde_test && cargo test --features serde/derive,serde/rc

beta:
name: Rust beta
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@beta
- run: cd serde && cargo build --features rc
- run: cd test_suite && cargo test
- run: cd test_suite/no_std && cargo build

nightly:
name: Rust nightly ${{matrix.os == 'windows' && '(windows)' || ''}}
name: Rust nightly${{matrix.os == 'windows' && ' (windows)' || ''}}
runs-on: ${{matrix.os}}-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu, windows]
timeout-minutes: 45
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@nightly
- run: cd serde && cargo build
- run: cd serde && cargo build --no-default-features
- run: cd serde && cargo build --no-default-features --features alloc
- run: cd serde && cargo build --no-default-features --features rc,alloc
- run: cd serde && cargo test --features derive,rc,unstable
- run: cd serde && cargo build --no-default-features --features unstable
- run: cd serde_core && cargo test --features rc,unstable
- run: cd test_suite/no_std && cargo build
if: matrix.os != 'windows'

msrv:
name: Rust 1.13.0
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/[email protected]
- name: Get timestamp for cache
id: date
run: echo ::set-output name=yearmo::$(date +%Y%m)
- uses: actions/cache@v1
with:
path: ~/.cargo/registry/index
key: cargo-registry-index-${{steps.date.outputs.yearmo}}
- run: cd serde && cargo build --features rc
- run: cd serde && cargo build --no-default-features
- run: cd serde_test && cargo build
- run: cd serde_derive && cargo check --tests
env:
RUSTFLAGS: --cfg exhaustive ${{env.RUSTFLAGS}}
if: matrix.os != 'windows'

build:
name: Rust ${{matrix.rust}}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust: [1.19.0, 1.20.0, 1.21.0, 1.25.0, 1.26.0, 1.34.0]
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.rust}}
- run: cd serde && cargo build --no-default-features
- run: cd serde && cargo build

more:
name: Rust ${{matrix.rust}}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust: [1.27.0, 1.28.0]
rust: [1.56.0, 1.60.0]
timeout-minutes: 45
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.rust}}
# Work around failing to parse manifest because editions are unstable.
- run: sed -i /test_suite/d Cargo.toml
- run: sed -i '/"test_suite"/d' Cargo.toml
- run: cd serde && cargo build --features rc
- run: cd serde && cargo build --no-default-features
- run: cd serde && cargo build --no-default-features --features alloc
- run: cd serde && cargo build

derive:
name: Rust 1.31.0
name: Rust 1.68.0
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v2
- uses: dtolnay/[email protected]
- uses: actions/checkout@v6
- uses: dtolnay/[email protected]
- run: |
sed -i 's/proc-macro2 = { workspace = true/proc-macro2 = { version = "1"/' serde_derive*/Cargo.toml
sed -i 's/quote = { workspace = true/quote = { version = "1"/' serde_derive*/Cargo.toml
sed -i 's/syn = { workspace = true/syn = { version = "2"/' serde_derive*/Cargo.toml
- run: cd serde && cargo check --no-default-features
- run: cd serde && cargo check
- run: cd serde_derive && cargo check

alloc:
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: cd serde && cargo build --no-default-features --features alloc
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@nightly
- run: cargo generate-lockfile -Z minimal-versions
- run: cargo check --locked --workspace

emscripten:
name: Emscripten
doc:
name: Documentation
runs-on: ubuntu-latest
timeout-minutes: 45
env:
RUSTDOCFLAGS: -Dwarnings
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@nightly
- uses: actions/setup-node@v1
with:
node-version: 9
- name: Install cargo-web
run: |
CARGO_WEB_RELEASE=$(curl -L -s -H Accept:application/json https://github.com/koute/cargo-web/releases/latest)
CARGO_WEB_VERSION=$(echo "${CARGO_WEB_RELEASE}" | jq -r .tag_name)
CARGO_WEB_URL="https://github.com/koute/cargo-web/releases/download/${CARGO_WEB_VERSION}/cargo-web-x86_64-unknown-linux-gnu.gz"
mkdir -p ~/.cargo/bin
curl -L "${CARGO_WEB_URL}" | gzip -d > ~/.cargo/bin/cargo-web
chmod +x ~/.cargo/bin/cargo-web
- run: cd test_suite && cargo web test --target=asmjs-unknown-emscripten --nodejs
continue-on-error: true
- run: cd test_suite && cargo web test --target=wasm32-unknown-emscripten --nodejs
continue-on-error: true
- uses: dtolnay/install@cargo-docs-rs
- run: cargo docs-rs -p serde
- run: cargo docs-rs -p serde_core
- run: cargo docs-rs -p serde_derive
- run: cargo docs-rs -p serde_derive_internals

clippy:
name: Clippy
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
timeout-minutes: 45
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@clippy
# The need for -Aredundant_field_names here is a Clippy bug.
# https://github.com/rust-lang/rust-clippy/issues/5356
- run: cd serde && cargo clippy --features rc,unstable -- -D clippy::all -A clippy::redundant_field_names
- run: cd serde_derive && cargo clippy -- -D clippy::all
- run: cd serde_test && cargo clippy -- -D clippy::all -A clippy::redundant_field_names
- run: cd test_suite && cargo clippy --tests --features unstable -- -D clippy::all -A clippy::redundant_field_names
- run: cd test_suite/no_std && cargo clippy -- -D clippy::all -A clippy::redundant_field_names
- run: cd serde && cargo clippy --features rc,unstable -- -Dclippy::all -Dclippy::pedantic
- run: cd serde_core && cargo clippy --features rc,unstable -- -Dclippy::all -Dclippy::pedantic
- run: cd serde_derive && cargo clippy -- -Dclippy::all -Dclippy::pedantic
- run: cd serde_derive_internals && cargo clippy -- -Dclippy::all -Dclippy::pedantic
- run: cd test_suite && cargo clippy --tests --features unstable -- -Dclippy::all -Dclippy::pedantic
- run: cd test_suite/no_std && cargo clippy -- -Dclippy::all -Dclippy::pedantic

miri:
name: Miri
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@miri
with:
toolchain: nightly-2025-05-16 # https://github.com/rust-lang/miri/issues/4323
- run: cargo miri setup
- run: cd serde_core && cargo miri test --features rc,unstable
env:
MIRIFLAGS: -Zmiri-strict-provenance
- run: cd test_suite && cargo miri test --features unstable
env:
MIRIFLAGS: -Zmiri-strict-provenance

outdated:
name: Outdated
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
timeout-minutes: 45
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- uses: dtolnay/install@cargo-outdated
- run: cargo outdated --workspace --exit-code 1
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
target/
**/*.rs.bk
*.sw[po]
Cargo.lock
/target/
/Cargo.lock
16 changes: 5 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,29 +27,23 @@ pull request with your changes. If anything does not pass, typically it will be
easier to iterate and fix it locally than waiting for the CI servers to run
tests for you.

##### In the [`serde`] directory
##### In the [`serde_core`] directory

```sh
# Test all the example code in Serde documentation
cargo test
```

##### In the [`test_suite/deps`] directory

```sh
# This is a prerequisite for running the full test suite
cargo clean && cargo update && cargo build
```

##### In the [`test_suite`] directory

```sh
# Run the full test suite, including tests of unstable functionality
cargo test --features unstable
cargo +nightly test --features unstable
```

[`serde`]: https://github.com/serde-rs/serde/tree/master/serde
[`test_suite/deps`]: https://github.com/serde-rs/serde/tree/master/test_suite/deps
Note that this test suite currently only supports running on a nightly compiler.

[`serde_core`]: https://github.com/serde-rs/serde/tree/master/serde_core
[`test_suite`]: https://github.com/serde-rs/serde/tree/master/test_suite

## Conduct
Expand Down
13 changes: 12 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
[workspace]
members = [
"serde",
"serde_core",
"serde_derive",
"serde_derive_internals",
"serde_test",
"test_suite",
]
resolver = "2"

[patch.crates-io]
serde = { path = "serde" }
serde_core = { path = "serde_core" }
serde_derive = { path = "serde_derive" }

[workspace.dependencies]
proc-macro2 = { version = "1.0.74", default-features = false }
quote = { version = "1.0.35", default-features = false }
syn = { version = "2.0.81", default-features = false }
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