diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 000000000..4a6a1abdd --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,2 @@ +[resolver] +incompatible-rust-versions = "fallback" diff --git a/.woodpecker.yml b/.woodpecker.yml index e94b99ac0..142e8a8ce 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -75,7 +75,7 @@ steps: # store cargo data in repo folder so that it gets cached between steps CARGO_HOME: .cargo_home commands: - - rustup component add rustfmt + - rustup component add rustfmt --toolchain nightly - cargo +nightly fmt -- --check when: - event: pull_request diff --git a/Cargo.toml b/Cargo.toml index 15f2b7aaf..45399697b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,6 +6,7 @@ license = "AGPL-3.0" homepage = "https://join-lemmy.org/" documentation = "https://join-lemmy.org/docs/en/index.html" repository = "https://github.com/LemmyNet/lemmy" +rust-version = "1.81" [package] name = "lemmy_server" @@ -16,6 +17,7 @@ license.workspace = true homepage.workspace = true documentation.workspace = true repository.workspace = true +rust-version.workspace = true publish = false [lib] diff --git a/crates/api/Cargo.toml b/crates/api/Cargo.toml index cf8aa0b03..7dfb4fe19 100644 --- a/crates/api/Cargo.toml +++ b/crates/api/Cargo.toml @@ -8,6 +8,7 @@ license.workspace = true homepage.workspace = true documentation.workspace = true repository.workspace = true +rust-version.workspace = true [lib] name = "lemmy_api" diff --git a/crates/api_common/Cargo.toml b/crates/api_common/Cargo.toml index dc0138416..70c70d3dc 100644 --- a/crates/api_common/Cargo.toml +++ b/crates/api_common/Cargo.toml @@ -7,6 +7,7 @@ license.workspace = true homepage.workspace = true documentation.workspace = true repository.workspace = true +rust-version.workspace = true [lib] name = "lemmy_api_common" diff --git a/crates/api_crud/Cargo.toml b/crates/api_crud/Cargo.toml index 1e27c560c..e1fde84af 100644 --- a/crates/api_crud/Cargo.toml +++ b/crates/api_crud/Cargo.toml @@ -8,6 +8,7 @@ license.workspace = true homepage.workspace = true documentation.workspace = true repository.workspace = true +rust-version.workspace = true [lints] workspace = true diff --git a/crates/apub/Cargo.toml b/crates/apub/Cargo.toml index 9e35bd222..a6af730aa 100644 --- a/crates/apub/Cargo.toml +++ b/crates/apub/Cargo.toml @@ -8,6 +8,7 @@ license.workspace = true homepage.workspace = true documentation.workspace = true repository.workspace = true +rust-version.workspace = true [lib] name = "lemmy_apub" diff --git a/crates/apub_objects/Cargo.toml b/crates/apub_objects/Cargo.toml index e066bfe63..562120a73 100644 --- a/crates/apub_objects/Cargo.toml +++ b/crates/apub_objects/Cargo.toml @@ -8,6 +8,7 @@ license.workspace = true homepage.workspace = true documentation.workspace = true repository.workspace = true +rust-version.workspace = true [lib] name = "lemmy_apub_objects" diff --git a/crates/db_perf/Cargo.toml b/crates/db_perf/Cargo.toml index 643b96d1f..42a24b1fd 100644 --- a/crates/db_perf/Cargo.toml +++ b/crates/db_perf/Cargo.toml @@ -8,6 +8,7 @@ license.workspace = true homepage.workspace = true documentation.workspace = true repository.workspace = true +rust-version.workspace = true [lints] diff --git a/crates/db_schema/Cargo.toml b/crates/db_schema/Cargo.toml index 8c59404a5..4fb5a764f 100644 --- a/crates/db_schema/Cargo.toml +++ b/crates/db_schema/Cargo.toml @@ -7,6 +7,7 @@ license.workspace = true homepage.workspace = true documentation.workspace = true repository.workspace = true +rust-version.workspace = true [lib] name = "lemmy_db_schema" diff --git a/crates/db_schema_file/Cargo.toml b/crates/db_schema_file/Cargo.toml index 9c5b2c7e1..41bc9f33f 100644 --- a/crates/db_schema_file/Cargo.toml +++ b/crates/db_schema_file/Cargo.toml @@ -7,6 +7,7 @@ license.workspace = true homepage.workspace = true documentation.workspace = true repository.workspace = true +rust-version.workspace = true [lib] name = "lemmy_db_schema_file" diff --git a/crates/db_views/comment/Cargo.toml b/crates/db_views/comment/Cargo.toml index 9234d1174..e44663bc3 100644 --- a/crates/db_views/comment/Cargo.toml +++ b/crates/db_views/comment/Cargo.toml @@ -7,6 +7,7 @@ license.workspace = true homepage.workspace = true documentation.workspace = true repository.workspace = true +rust-version.workspace = true [lib] doctest = false diff --git a/crates/db_views/community/Cargo.toml b/crates/db_views/community/Cargo.toml index 5768e3197..7ef96ec90 100644 --- a/crates/db_views/community/Cargo.toml +++ b/crates/db_views/community/Cargo.toml @@ -7,6 +7,7 @@ license.workspace = true homepage.workspace = true documentation.workspace = true repository.workspace = true +rust-version.workspace = true [lib] doctest = false diff --git a/crates/db_views/community_follower/Cargo.toml b/crates/db_views/community_follower/Cargo.toml index 183a3c761..58d9770df 100644 --- a/crates/db_views/community_follower/Cargo.toml +++ b/crates/db_views/community_follower/Cargo.toml @@ -7,6 +7,7 @@ license.workspace = true homepage.workspace = true documentation.workspace = true repository.workspace = true +rust-version.workspace = true [lib] doctest = false diff --git a/crates/db_views/community_moderator/Cargo.toml b/crates/db_views/community_moderator/Cargo.toml index 9784af6f4..00668a26c 100644 --- a/crates/db_views/community_moderator/Cargo.toml +++ b/crates/db_views/community_moderator/Cargo.toml @@ -7,6 +7,7 @@ license.workspace = true homepage.workspace = true documentation.workspace = true repository.workspace = true +rust-version.workspace = true [lib] doctest = false diff --git a/crates/db_views/community_person_ban/Cargo.toml b/crates/db_views/community_person_ban/Cargo.toml index cea873e1f..bb413ae48 100644 --- a/crates/db_views/community_person_ban/Cargo.toml +++ b/crates/db_views/community_person_ban/Cargo.toml @@ -7,6 +7,7 @@ license.workspace = true homepage.workspace = true documentation.workspace = true repository.workspace = true +rust-version.workspace = true [lib] doctest = false diff --git a/crates/db_views/custom_emoji/Cargo.toml b/crates/db_views/custom_emoji/Cargo.toml index 25b40d399..beff9534f 100644 --- a/crates/db_views/custom_emoji/Cargo.toml +++ b/crates/db_views/custom_emoji/Cargo.toml @@ -7,6 +7,7 @@ license.workspace = true homepage.workspace = true documentation.workspace = true repository.workspace = true +rust-version.workspace = true [lib] doctest = false diff --git a/crates/db_views/inbox_combined/Cargo.toml b/crates/db_views/inbox_combined/Cargo.toml index af48fb0e9..58241bff7 100644 --- a/crates/db_views/inbox_combined/Cargo.toml +++ b/crates/db_views/inbox_combined/Cargo.toml @@ -7,6 +7,7 @@ license.workspace = true homepage.workspace = true documentation.workspace = true repository.workspace = true +rust-version.workspace = true [lib] doctest = false diff --git a/crates/db_views/local_image/Cargo.toml b/crates/db_views/local_image/Cargo.toml index 917cf3422..fe158bcaf 100644 --- a/crates/db_views/local_image/Cargo.toml +++ b/crates/db_views/local_image/Cargo.toml @@ -7,6 +7,7 @@ license.workspace = true homepage.workspace = true documentation.workspace = true repository.workspace = true +rust-version.workspace = true [lib] doctest = false diff --git a/crates/db_views/local_user/Cargo.toml b/crates/db_views/local_user/Cargo.toml index ce5d51e61..2811aec27 100644 --- a/crates/db_views/local_user/Cargo.toml +++ b/crates/db_views/local_user/Cargo.toml @@ -7,6 +7,7 @@ license.workspace = true homepage.workspace = true documentation.workspace = true repository.workspace = true +rust-version.workspace = true [lib] doctest = false diff --git a/crates/db_views/modlog_combined/Cargo.toml b/crates/db_views/modlog_combined/Cargo.toml index c66f545de..b21c8294d 100644 --- a/crates/db_views/modlog_combined/Cargo.toml +++ b/crates/db_views/modlog_combined/Cargo.toml @@ -7,6 +7,7 @@ license.workspace = true homepage.workspace = true documentation.workspace = true repository.workspace = true +rust-version.workspace = true [lib] doctest = false diff --git a/crates/db_views/person/Cargo.toml b/crates/db_views/person/Cargo.toml index 42ad477d3..5f0b5331a 100644 --- a/crates/db_views/person/Cargo.toml +++ b/crates/db_views/person/Cargo.toml @@ -7,6 +7,7 @@ license.workspace = true homepage.workspace = true documentation.workspace = true repository.workspace = true +rust-version.workspace = true [lib] doctest = false diff --git a/crates/db_views/person_content_combined/Cargo.toml b/crates/db_views/person_content_combined/Cargo.toml index e9c0de895..1ec7eddfd 100644 --- a/crates/db_views/person_content_combined/Cargo.toml +++ b/crates/db_views/person_content_combined/Cargo.toml @@ -7,6 +7,7 @@ license.workspace = true homepage.workspace = true documentation.workspace = true repository.workspace = true +rust-version.workspace = true [lib] doctest = false diff --git a/crates/db_views/person_liked_combined/Cargo.toml b/crates/db_views/person_liked_combined/Cargo.toml index 7064c4d81..daecd1e5a 100644 --- a/crates/db_views/person_liked_combined/Cargo.toml +++ b/crates/db_views/person_liked_combined/Cargo.toml @@ -7,6 +7,7 @@ license.workspace = true homepage.workspace = true documentation.workspace = true repository.workspace = true +rust-version.workspace = true [lib] doctest = false diff --git a/crates/db_views/person_saved_combined/Cargo.toml b/crates/db_views/person_saved_combined/Cargo.toml index f0ed45490..3006f8166 100644 --- a/crates/db_views/person_saved_combined/Cargo.toml +++ b/crates/db_views/person_saved_combined/Cargo.toml @@ -7,6 +7,7 @@ license.workspace = true homepage.workspace = true documentation.workspace = true repository.workspace = true +rust-version.workspace = true [lib] doctest = false diff --git a/crates/db_views/post/Cargo.toml b/crates/db_views/post/Cargo.toml index b4fc168be..a53e47fe8 100644 --- a/crates/db_views/post/Cargo.toml +++ b/crates/db_views/post/Cargo.toml @@ -7,6 +7,7 @@ license.workspace = true homepage.workspace = true documentation.workspace = true repository.workspace = true +rust-version.workspace = true [lib] doctest = false diff --git a/crates/db_views/private_message/Cargo.toml b/crates/db_views/private_message/Cargo.toml index 505e3f3b8..12224b216 100644 --- a/crates/db_views/private_message/Cargo.toml +++ b/crates/db_views/private_message/Cargo.toml @@ -7,6 +7,7 @@ license.workspace = true homepage.workspace = true documentation.workspace = true repository.workspace = true +rust-version.workspace = true [lib] doctest = false diff --git a/crates/db_views/registration_applications/Cargo.toml b/crates/db_views/registration_applications/Cargo.toml index ab1cffcf2..bab8afad8 100644 --- a/crates/db_views/registration_applications/Cargo.toml +++ b/crates/db_views/registration_applications/Cargo.toml @@ -7,6 +7,7 @@ license.workspace = true homepage.workspace = true documentation.workspace = true repository.workspace = true +rust-version.workspace = true [lib] doctest = false diff --git a/crates/db_views/report_combined/Cargo.toml b/crates/db_views/report_combined/Cargo.toml index fa68de01c..320cef065 100644 --- a/crates/db_views/report_combined/Cargo.toml +++ b/crates/db_views/report_combined/Cargo.toml @@ -7,6 +7,7 @@ license.workspace = true homepage.workspace = true documentation.workspace = true repository.workspace = true +rust-version.workspace = true [lib] doctest = false diff --git a/crates/db_views/reports/Cargo.toml b/crates/db_views/reports/Cargo.toml index 083dc3749..e15de3757 100644 --- a/crates/db_views/reports/Cargo.toml +++ b/crates/db_views/reports/Cargo.toml @@ -7,6 +7,7 @@ license.workspace = true homepage.workspace = true documentation.workspace = true repository.workspace = true +rust-version.workspace = true [lib] doctest = false diff --git a/crates/db_views/search_combined/Cargo.toml b/crates/db_views/search_combined/Cargo.toml index a47a9523d..85ffa1d1d 100644 --- a/crates/db_views/search_combined/Cargo.toml +++ b/crates/db_views/search_combined/Cargo.toml @@ -7,6 +7,7 @@ license.workspace = true homepage.workspace = true documentation.workspace = true repository.workspace = true +rust-version.workspace = true [lib] doctest = false diff --git a/crates/db_views/site/Cargo.toml b/crates/db_views/site/Cargo.toml index a3b0eece4..8e82b8be7 100644 --- a/crates/db_views/site/Cargo.toml +++ b/crates/db_views/site/Cargo.toml @@ -7,6 +7,7 @@ license.workspace = true homepage.workspace = true documentation.workspace = true repository.workspace = true +rust-version.workspace = true [lib] doctest = false diff --git a/crates/db_views/vote/Cargo.toml b/crates/db_views/vote/Cargo.toml index 896908998..4af4c3b6a 100644 --- a/crates/db_views/vote/Cargo.toml +++ b/crates/db_views/vote/Cargo.toml @@ -7,6 +7,7 @@ license.workspace = true homepage.workspace = true documentation.workspace = true repository.workspace = true +rust-version.workspace = true [lib] doctest = false diff --git a/crates/email/Cargo.toml b/crates/email/Cargo.toml index 6ef93fd92..944e9e375 100644 --- a/crates/email/Cargo.toml +++ b/crates/email/Cargo.toml @@ -8,6 +8,7 @@ license.workspace = true homepage.workspace = true documentation.workspace = true repository.workspace = true +rust-version.workspace = true [lib] name = "lemmy_email" diff --git a/crates/federate/Cargo.toml b/crates/federate/Cargo.toml index d1a55e1b8..3c39247af 100644 --- a/crates/federate/Cargo.toml +++ b/crates/federate/Cargo.toml @@ -8,6 +8,7 @@ license.workspace = true homepage.workspace = true documentation.workspace = true repository.workspace = true +rust-version.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/routes/Cargo.toml b/crates/routes/Cargo.toml index 72d325afd..dc639b781 100644 --- a/crates/routes/Cargo.toml +++ b/crates/routes/Cargo.toml @@ -8,6 +8,7 @@ license.workspace = true homepage.workspace = true documentation.workspace = true repository.workspace = true +rust-version.workspace = true [lib] doctest = false diff --git a/crates/utils/Cargo.toml b/crates/utils/Cargo.toml index 891090804..e7b449f12 100644 --- a/crates/utils/Cargo.toml +++ b/crates/utils/Cargo.toml @@ -7,6 +7,7 @@ license.workspace = true homepage.workspace = true documentation.workspace = true repository.workspace = true +rust-version.workspace = true [lib] name = "lemmy_utils" diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 000000000..4cef0b738 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,2 @@ +[toolchain] +channel = "1.81"