Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
215 commits
Select commit Hold shift + click to select a range
20f466d
Remove temporary `Vec` usage in the `http` module (#2624, #2646)
GnomedDev Dec 3, 2023
004a1f6
Remove deprecated items (#2645)
GnomedDev Dec 3, 2023
8653544
Remove more deprecated items (#2651)
GnomedDev Dec 8, 2023
a128437
Remove `*_arc` methods (#2654)
GnomedDev Dec 8, 2023
7d93446
Clean up `ShardManager`/`ShardQueuer`/`ShardRunner` (#2653)
GnomedDev Dec 9, 2023
705e547
Put `Message::thread` behind a `Box` (#2658)
GnomedDev Dec 9, 2023
0beaec8
Replace `Vec` and `String` with `FixedArray` and `FixedString` for al…
GnomedDev Dec 10, 2023
f506838
Fix truncation when using `FixedString<u8>` where multibyte character…
GnomedDev Dec 14, 2023
ed0bdef
Encode timestamps in RFC3339 (#2665)
Kerollmops Dec 22, 2023
73883d0
Switch to `i64` in methods associated with `CreateCommandOption` (#2668)
ARandomDev99 Dec 22, 2023
7d99d8f
Get rid of the duplicate users cache (#2662)
GnomedDev Dec 28, 2023
9ceb7e7
Change `Embed::fields` to use `FixedArray` (#2674)
GnomedDev Dec 28, 2023
b003cf4
Use `FixedArray` and `FixedString` in model enums (#2675)
GnomedDev Dec 28, 2023
c275f10
Bitpack boolean fields using fancy proc macro (#2673)
GnomedDev Dec 31, 2023
87b0a28
Use `nonmax::NonMax*` types in `Option`s wherever possible (#2681)
GnomedDev Jan 2, 2024
4528746
Remove unused warning `#[allow(...)]`s (#2682)
GnomedDev Jan 2, 2024
775b745
Get rid of `unsafe` (#2686)
GnomedDev Jan 3, 2024
8f3c224
Swap Git dependencies for crates.io published versions (#2685)
GnomedDev Jan 3, 2024
f07ac63
Swap Id from `NonZero` to `NonMax` (#2689)
GnomedDev Jan 5, 2024
d905777
Rewrite builders to take `Cow`s (#2688)
GnomedDev Jan 6, 2024
e33bee9
Store `Request::params` as a slice instead of owning `ArrayVec` (#2694)
GnomedDev Jan 7, 2024
bfc55d8
Revert `Request::params` back to `Option` (#2695)
mkrasnitski Jan 7, 2024
c8aae25
Remove unnecessary `Vec` in `WsClient` (#2705)
GnomedDev Jan 10, 2024
ad85ff9
Feature gate `#[instrument]` macros (#2707)
GnomedDev Jan 10, 2024
ac5db87
Remove `impl Into<Option>` (#2701)
GnomedDev Jan 10, 2024
4e15608
Get rid of `IntoIterator` generics wherever they are inefficent (#2698)
GnomedDev Jan 10, 2024
66fbe1d
Clean up `Ratelimiter` (#2687)
GnomedDev Jan 10, 2024
372e776
Handle overflow checks in central locations (#2697)
GnomedDev Jan 10, 2024
9c9ef78
Shrink size and clean up `Error` (#2700)
GnomedDev Jan 10, 2024
7b2fa59
Remove manual `#[inline]` attributes (#2702)
GnomedDev Jan 10, 2024
f21dc94
Remove `Into<*Id>` and `AsRef<str>` (#2704)
GnomedDev Jan 11, 2024
4d61748
Remove `Event::Unknown` variant (#2708)
mkrasnitski Jan 12, 2024
b27f033
Use `NonMax` to signal builder range constraints (#2703)
GnomedDev Jan 14, 2024
6fc282c
Stop using `Value` in error parsing (#2710)
GnomedDev Jan 14, 2024
6c1f53c
Fix new clippy lints (#2713)
GnomedDev Jan 14, 2024
32128e5
Update to `small-fixed-array` v0.2 (#2711)
GnomedDev Jan 14, 2024
fb46029
Fix `@everyone` role deserialisation (#2716)
GnomedDev Jan 16, 2024
6a19a26
Fix `GuildChannel` deserialisation with `user_limit` (#2715)
GnomedDev Jan 16, 2024
1eba979
Fix maximum description length to the correct size (#2718)
Milo123459 Jan 16, 2024
0c7ccb5
Remove dashboard example (#2714)
GnomedDev Jan 16, 2024
a8088ae
Fix compilation from rebase
arqunis Jan 16, 2024
2afd217
Remove deprecated `absolute_ratelimits` feature (#2719)
GnomedDev Jan 16, 2024
28d958c
Implement `max_concurrency` support when starting shards (#2661)
mkrasnitski Jan 16, 2024
3af94eb
Remove typemap without making everything generic (#2720)
GnomedDev Jan 16, 2024
4f2751f
Provide `Arc<Data>` instead of `&Data` (#2722)
GnomedDev Jan 17, 2024
614a44d
Add `Client::try_data` to fallibly fetch the data type (#2723)
GnomedDev Jan 18, 2024
5723c8c
Fix voice manager initialisation (#2727)
GnomedDev Jan 21, 2024
e1108b7
Remove some pedantic lints from the whitelist (#2728)
mkrasnitski Jan 21, 2024
2ff5bb1
Reduce unknown events to debug level, again (#2730)
GnomedDev Jan 21, 2024
6585b9b
Fix compilation from rebase
arqunis Jan 22, 2024
b0522b5
Fix testing example
mkrasnitski Jan 22, 2024
6021eb8
Remove `PartialEq` implementations from all builders (#2734)
mkrasnitski Jan 22, 2024
bcc08ad
Remove various instances of `impl AsRef<T>` (#2736)
GnomedDev Jan 24, 2024
9c5bc18
Remove `simd-json` support (#2735)
GnomedDev Jan 24, 2024
431bb76
Fix massive code size of `client::dispatch` (#2739)
GnomedDev Jan 25, 2024
e2f7dbc
Fix RoleTags deserialisation after removal of simd-json (#2742)
GnomedDev Jan 26, 2024
e499619
Avoid cloning FullEvent in dispatch code (#2740)
GnomedDev Jan 27, 2024
4ce44e9
Remove the builder trait and only take required arguments (#2741)
GnomedDev Jan 27, 2024
97bfd68
Use Serializer::collect_seq in serialize impls (#2744)
GnomedDev Jan 28, 2024
8423f2d
Convert enum number into wrapper struct to save type sizes (#2746)
GnomedDev Jan 29, 2024
46a2c4d
Use Arc<str> to store the token (#2745)
GnomedDev Jan 29, 2024
245101b
Remove standard framework (#2731)
GnomedDev Jan 29, 2024
1399424
Re-add Secret to bot token (#2748)
GnomedDev Jan 29, 2024
720bf85
Take Arc<Http> in ClientBuilder::new_with_http (#2749)
GnomedDev Feb 3, 2024
fde6901
Remove duplicate content_safe implementation (#2759)
GnomedDev Feb 9, 2024
3d84967
Simplify the message cache (#2757)
GnomedDev Feb 9, 2024
3ee08b3
Upgrade to small-fixed-array 0.4 (#2755)
GnomedDev Feb 9, 2024
822ab5e
Avoid HashMap in ShardQueue (#2750)
GnomedDev Feb 11, 2024
e0cd6ef
Switch to a generic type argument for `ClientBuilder::data` (#2765)
vicky5124 Feb 11, 2024
e586e80
Fix `VoiceServerUpdate::guild_id` being wrapped in `Option` (#2766)
GnomedDev Feb 13, 2024
d3863f7
Improve MessageBuilder to fit with other builders (#2767)
GnomedDev Feb 15, 2024
e2c5e6d
Fill message cache with ChannelId::messages and ChannelId::pins (#2768)
GnomedDev Feb 15, 2024
f7e042e
Defer deserialisation of Dispatch to handle errors (#2764)
GnomedDev Feb 16, 2024
334275f
Remove `CreateAttachment::id` field (#2771)
mkrasnitski Feb 17, 2024
3c9d64f
Fix compilation from rebase
arqunis Mar 1, 2024
418c92a
Fix remaining clippy warnings
GnomedDev Mar 1, 2024
a31e5e5
Format unformatted code from rebase
arqunis Mar 1, 2024
ef9a939
Remove rebase artifacts in README
arqunis Mar 1, 2024
3808a64
Synchronise README example from the `current` branch
arqunis Mar 1, 2024
57de47a
Minor adjustments
mkrasnitski Mar 1, 2024
ec63cd7
Apply Strum derives for FullEvent and Event (#2788)
cheesycod Mar 10, 2024
2c2bd7a
Remove `Channel::name` (#2787)
GnomedDev Mar 10, 2024
f802818
Use join_to_string throughout serenity (#2785)
GnomedDev Mar 10, 2024
b674730
Use ToArrayString for int -> str (#2786)
GnomedDev Mar 10, 2024
208e1ae
Rename `unstable_discord_api` to `unstable` and disable it by default…
cheesycod Mar 10, 2024
801cd6b
Remove deprecated Channel::is_nsfw methods (#2792)
GnomedDev Mar 11, 2024
1b8dd2f
Replace manual Hash/Eq implementation on User/Role (#2793)
GnomedDev Mar 12, 2024
933003f
Remove useless method wrappers (#2795)
GnomedDev Mar 13, 2024
f142631
Fix unused variable warning from rebase
GnomedDev Mar 13, 2024
489e286
Remove deprecated mapped refs and Cache::channels (#2796)
GnomedDev Mar 13, 2024
a13c9c8
Use ExtractMap instead of HashMap when possible (#2797)
GnomedDev Mar 17, 2024
b4e3393
Remove examples and inaccurate docs from HTTP (#2805)
GnomedDev Mar 17, 2024
758dfdf
Use NonMax in HTTP function signatures (#2803)
GnomedDev Mar 17, 2024
a752bc1
Fix infinite loop in event deserialisation
arqunis Mar 19, 2024
580e70f
Make Guild::shard_id follow additive features (#2813)
GnomedDev Mar 21, 2024
bf0d892
Remove deprecated `Member` and `Guild` methods (#2817)
GnomedDev Mar 26, 2024
4a46565
Replace `CacheHttp` with `&Http` in more methods (#2818)
GnomedDev Mar 28, 2024
cba313f
Remove `serde_json::Value` from `Http` (#2806)
GnomedDev Mar 28, 2024
e2b5a5d
Add audit log reasons to remaining model methods (#2821)
GnomedDev Mar 29, 2024
c563eaf
Remove even more impl CacheHttp (#2822)
GnomedDev Mar 29, 2024
0884a5b
Remove `fs` feature for `tokio` by default (#2824)
UserIsntAvailable Mar 30, 2024
2349546
Update `reqwest` to v0.12 (#2826)
GnomedDev Apr 1, 2024
520346c
Only include `cache::Settings::time_to_live` if temp cache is enabled…
GnomedDev Apr 3, 2024
16a2cd2
Add resume_gateway_url support (#2832)
GnomedDev Apr 6, 2024
7d87a85
Correct documentation for `UserId::to_user` (#2809)
jamesbt365 Apr 9, 2024
6712ea3
Use CreateAttachment for EditGuild::banner (#2844)
NotNorom Apr 20, 2024
5e3045f
Fix AuditLogEntry::user_id (#2846)
GnomedDev Apr 20, 2024
b927d78
Restore match arm for `Error::Gateway` variant (#2847)
mkrasnitski Apr 22, 2024
e059d4b
Remove multiple event handler support (#2849)
GnomedDev Apr 24, 2024
8d3fb5e
Use RwLock for active collectors collection (#2851)
TheCataliasTNT2k Apr 26, 2024
fdc7bba
Provide old presence data from the cache on presence update (#2852)
jamesbt365 Apr 28, 2024
90ab55c
Allow filtering events before they are dispatched (#2853)
TheCataliasTNT2k Apr 28, 2024
ea9c973
Remove permission checks (#2855)
jamesbt365 May 1, 2024
a7a9c3e
Implement ToArrayString for Mention (#2857)
GnomedDev May 7, 2024
a358179
Add PartialGuild::greater_member_hierarchy + member_highest_role (#2856)
cheesycod May 8, 2024
11e97fa
Remove recently deprecated items
GnomedDev May 23, 2024
3c9ea5a
Update bool_to_bitflags to fix compilation without unstable
GnomedDev May 14, 2024
16f2d69
Remove RUSTFLAGS from .cargo/config.toml (#2875)
jamesbt365 May 23, 2024
1dacd67
Remove deprecated link_ensured method (#2898)
GnomedDev Jun 10, 2024
ac425d9
Add GuildId param to ChannelId::to_channel (#2895)
GnomedDev Jun 16, 2024
34f17bf
Clean up `Message::reply` (#2897)
GnomedDev Jun 16, 2024
ae0b959
Use `ArrayString` in more places via `aformat!` (#2902)
GnomedDev Jun 22, 2024
37ccefc
Bump MSRV to Rust 1.79 (#2916)
mkrasnitski Jul 11, 2024
debe6b7
Remove deprecated `CreateInteractionResponse::PremiumRequired` varian…
mkrasnitski Aug 5, 2024
a7ca62a
Add `OAuth2Token`, `OAuth2TokenRevocation`, and `OAuth2AuthorizationC…
valentinegb Aug 8, 2024
736e545
Allow setting both normal and raw event handlers (#2933)
tazz4843 Aug 16, 2024
34120b7
Merge `client` feature/module into `gateway` (#2947)
mkrasnitski Aug 22, 2024
ece7531
Remove methods on `ClientBulder` that don't serve a purpose (#2953)
mkrasnitski Aug 23, 2024
a75b284
Fix and make `edit_role_position` plural (#2954)
mkrasnitski Aug 23, 2024
8cb664a
Fix model functions using `SerializeIter` (#2955)
GnomedDev Aug 26, 2024
ee41d00
Remove `InternalEventHandler` (#2952)
mkrasnitski Aug 26, 2024
85d6a90
Truncate cache if `max_messages` is set to a lower value at runtime (…
ivinjabraham Aug 30, 2024
0a98ee5
Add enum for JSON error codes in `DiscordJsonError` (#2964)
ivinjabraham Sep 1, 2024
dc7ff35
Update to DashMap 6 (#2961)
GnomedDev Sep 9, 2024
ec0a773
Fix unused warnings when compiling without certain features (#2970)
mkrasnitski Sep 13, 2024
96c11c5
Fix public doctests that are marked `ignore` (#2976)
mkrasnitski Sep 20, 2024
606284b
Allow embeds to be optional in followup messages (#2968)
TapGhoul Oct 7, 2024
345b4ec
Swap `Vec<T>` for `Cow<[T]>` in `CreateActionRow::Buttons` (#2985)
GnomedDev Oct 7, 2024
a9de4c7
Remove more `json!` usage (#2986)
GnomedDev Oct 7, 2024
2504165
Replace outdated secrecy library with own impl (#2997)
GnomedDev Oct 21, 2024
155ead5
Check for lints which change public API (#2999)
GnomedDev Oct 21, 2024
a3d97d7
Stop using serde_json::Value in AutocompleteChoice::value (#3000)
GnomedDev Oct 21, 2024
3a4516f
feat: Make FullEvent serializable (#3010)
cheesycod Oct 31, 2024
a493ef1
Add `Context::data_ref` (#3017)
GnomedDev Nov 6, 2024
373d678
Delete passthrough methods (#3023)
GnomedDev Nov 11, 2024
1c4bf68
Swap CreateAttachment::data to Bytes (#3016)
GnomedDev Nov 11, 2024
731204f
Add `EditCommand` builder (#3028)
mkrasnitski Nov 12, 2024
932a8a4
Remove deprecated GuildChannel::permissions_for_user (#3033)
GnomedDev Nov 13, 2024
5431d5a
Improve some docs (#3027)
mkrasnitski Nov 13, 2024
7531612
Add config for the shard start wait time (#3031)
cheesycod Nov 13, 2024
ad59836
Remove Option around Interaction::app_permissions (#3034)
GnomedDev Nov 13, 2024
f0adb6c
Remove deprecated permissions methods (#3042)
GnomedDev Nov 16, 2024
d261b46
Update `tokio-tungstenite` dependency to 0.24 (#3048)
DPlayer234 Nov 18, 2024
8984def
Perform some misc TODO cleanups (#3050)
GnomedDev Nov 18, 2024
a82dd25
Transport compression support (#3036)
fgardt Nov 18, 2024
0599bf4
Get rid of redundant status argument in Http::wind (#3049)
GnomedDev Nov 18, 2024
73c3f1a
Perform some minor cleanups (#3051)
mkrasnitski Nov 19, 2024
d9613e0
Improve token semantics and clean up gateway feature gates (#3052)
mkrasnitski Nov 22, 2024
72e3258
Add Token to serenity::all (#3054)
GnomedDev Nov 22, 2024
84cb628
Use correct token prefix after parsing
arqunis Nov 23, 2024
98b12e2
Add guild_id to ReactionRemoveAll (#3058)
jamesbt365 Nov 25, 2024
f9fc3f6
Bump the discriminant of audit_log::Action to u16 (#3062)
GnomedDev Nov 25, 2024
8e6290e
Fix transport compression feature & add CI tests (#3067)
fgardt Nov 26, 2024
92d07f1
Factor out collector methods on models into traits (#3055)
mkrasnitski Nov 27, 2024
1634263
Remove unused `json.rs` file (#3071)
mkrasnitski Dec 2, 2024
7081f7b
Fix clippy warning on next (#3078)
mkrasnitski Dec 8, 2024
791a13d
Add a function for parsing a channel ID from a channel URL (#3075)
TheCataliasTNT2k Dec 8, 2024
3fca7db
Fix clippy warning (#3081)
mkrasnitski Dec 9, 2024
28da2cd
Add `newly_created` bool field to the `ThreadCreate` event (#3084)
jamesbt365 Dec 19, 2024
f8a593b
Fix deserialisation of `Token` type (#3086)
arqunis Jan 9, 2025
de20cf3
Fix issues from rebase
arqunis Jan 16, 2025
80efef3
Remove `ContentSafeOptions::show_discriminator`
arqunis Jan 16, 2025
d950aac
Change MessageUpdateEvent to just contain a full Message (#3061)
GnomedDev Jan 19, 2025
632bf9f
Improve gateway connection/resume logic (#3099)
mkrasnitski Jan 27, 2025
396bdba
Update `tokio-tungstenite` to v0.26.1
Cabbache Jan 30, 2025
1935712
Fix clippy
arqunis Feb 2, 2025
3610379
Fix disconnections on successful gateway resume (#3102)
mkrasnitski Feb 3, 2025
6c9f44a
Deserialise `Token` from `String`s instead of `&str`s (#3104)
Freyja-moth Feb 4, 2025
61aa4e7
Fix clippy
mkrasnitski Feb 8, 2025
cdf83d3
Fix compilation when the `tracing_instrument` feature is enabled (#3110)
mkrasnitski Feb 11, 2025
9e9dcf3
Swap `fxhash` for `foldhash` due to hash quality issues (#3111)
xacrimon Feb 13, 2025
a3cda4b
Replace Delete-Messages-Days with Delete-Messages-Seconds (#3088)
cheesycod Feb 14, 2025
f43e126
Remove deprecated field inside `GatewayEvent::Heartbeat` (#3115)
mkrasnitski Feb 15, 2025
4f3118d
Avoid temporarily deserializing gateway messages to an untyped enum+m…
xacrimon Feb 16, 2025
a73c5ac
Bump extract_map to 0.2 (#3117)
GnomedDev Feb 17, 2025
103f1b5
Merge `ShardQueuer` functionality into `ShardManager` (#3108)
mkrasnitski Feb 19, 2025
f77b35f
Fix `ShardQueue` batch size bug (#3121)
mkrasnitski Feb 23, 2025
7e25a4c
Bump MSRV to 1.85 and switch to the 2024 edition (#3126)
mkrasnitski Feb 25, 2025
22e58d0
Remove implicit invite parsing in `Invite::get` (#3118)
GnomedDev Mar 1, 2025
566b03f
Fix clippy and remove CI hacks
mkrasnitski Mar 5, 2025
05b5780
Avoid deferring gateway event deserialization (#3119)
mkrasnitski Mar 8, 2025
f8d8baf
Fix event deserialisation
arqunis Mar 9, 2025
77c7bf9
Remove `ShardMessenger` and clean up `ShardRunner` (#3120)
mkrasnitski Mar 14, 2025
15f0ca4
Replace `JsonMap` with `RawValue` (#3313)
DPlayer234 Mar 19, 2025
16c3110
Don't delay starting first batch of shards (#3327)
DPlayer234 Mar 20, 2025
ae66b07
Rework the `EventHandler` trait to have a single dispatch function (#…
jamesbt365 Mar 20, 2025
615e3ca
Add roles field to create and edit emoji (#3095)
nwerosama Mar 26, 2025
199b451
Avoid boxed event reallocations (#3333)
GnomedDev Mar 26, 2025
b4696a8
Do not validate nor replace bearer tokens (#3338)
jamesbt365 Apr 5, 2025
3397006
Remove precise capture clause on `collect` method (#3336)
mkrasnitski Apr 5, 2025
30a083e
Split GuildThread from GuildChannel (#3026)
GnomedDev Apr 12, 2025
257d3ef
Fix out of order cache updates (#3342)
GnomedDev Apr 12, 2025
4bc1883
Rework Id -> Channel methods (#3343)
GnomedDev Apr 12, 2025
90fc1d9
Fix channels that should be threads (#3344)
DPlayer234 Apr 14, 2025
e93d457
Fix shard runner info (#3345)
GnomedDev Apr 17, 2025
b72846c
Change `CreateAttachment` to stream data from disk when possible (#3322)
mkrasnitski Apr 20, 2025
741c27f
Update extract_map to 0.3 (#3349)
GnomedDev Apr 20, 2025
8edaea2
Add missing CacheUpdate implementations (#3346)
GnomedDev Apr 27, 2025
7b2d7ac
More followups to Thread Split PR (#3352)
GnomedDev Apr 27, 2025
4a180eb
Simplify struct names for editing attachments (#3351)
mkrasnitski Apr 28, 2025
65b5261
Implement ShardManager::get_shutdown_trigger
GnomedDev Apr 27, 2025
94dc7ca
Update docs to solve CI failures
GnomedDev Apr 27, 2025
a1258f8
Allow dumping ResumeMetadata to disk for all shards
GnomedDev Apr 28, 2025
75b8e8e
Allow dumping Cache to disk
GnomedDev May 5, 2025
d7fc0a6
WIP: Allow testing Cache equality
GnomedDev May 5, 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
2 changes: 0 additions & 2 deletions .cargo/config.toml

This file was deleted.

2 changes: 0 additions & 2 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
ci:
- .github/**/*
command_attr:
- command_attr/**/*
examples:
- examples/**/*
builder:
Expand Down
62 changes: 29 additions & 33 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: CI
on: [push, pull_request]

env:
rust_min: 1.74.0
rust_nightly: nightly-2024-03-09
rust_min: 1.85.0
rust_nightly: nightly-2025-02-19

jobs:
test:
Expand All @@ -26,7 +26,9 @@ jobs:
- no cache
- no gateway
- unstable Discord API features
- simd-json
- zlib compression
- zstd compression
- zlib and zstd compression

include:
- name: beta
Expand All @@ -38,22 +40,26 @@ jobs:
- name: no default features
features: " "
- name: no cache
features: builder client framework gateway model http standard_framework utils rustls_backend
- name: simd-json
features: default_no_backend rustls_backend simd_json
features: framework rustls_backend
- name: no gateway
features: model http rustls_backend
features: model rustls_backend
- name: chrono
features: chrono
- name: unstable API + typesize
features: default unstable_discord_api typesize
features: default unstable typesize
dont-test: true
- name: builder without model
features: builder
dont-test: true
- name: unstable Discord API (no default features)
features: unstable_discord_api
features: unstable
dont-test: true
- name: zlib compression
features: default transport_compression_zlib
- name: zstd compression
features: default transport_compression_zstd
- name: zlib and zstd compression
features: default transport_compression_zlib transport_compression_zstd

steps:
- name: Checkout sources
Expand Down Expand Up @@ -131,9 +137,6 @@ jobs:
- name: Cache
uses: Swatinem/rust-cache@v2

- name: Remove cargo build config
run: rm .cargo/config.toml

- name: Build
run: cargo build

Expand Down Expand Up @@ -210,8 +213,7 @@ jobs:

- name: Build docs
run: |
cargo doc --no-deps --features collector,voice,unstable_discord_api
cargo doc --no-deps -p command_attr
cargo doc --no-deps --features full,unstable
env:
RUSTDOCFLAGS: -D rustdoc::broken_intra_doc_links

Expand Down Expand Up @@ -241,32 +243,26 @@ jobs:
- name: 'Check example 4'
run: cargo check -p e04_message_builder
- name: 'Check example 5'
run: cargo check -p e05_command_framework
run: cargo check -p e05_sample_bot_structure
- name: 'Check example 6'
run: cargo check -p e06_sample_bot_structure
run: cargo check -p e06_env_logging
- name: 'Check example 7'
run: cargo check -p e07_env_logging
run: cargo check -p e07_shard_manager
- name: 'Check example 8'
run: cargo check -p e08_shard_manager
- name: 'Check example 9'
run: cargo check -p e09_create_message_builder
run: cargo check -p e08_create_message_builder
- name: 'Check example 09'
run: cargo check -p e09_collectors
- name: 'Check example 10'
run: cargo check -p e10_collectors
run: cargo check -p e10_gateway_intents
- name: 'Check example 11'
run: cargo check -p e11_gateway_intents
run: cargo check -p e11_global_data
- name: 'Check example 12'
run: cargo check -p e12_global_data
run: cargo check -p e12_parallel_loops
- name: 'Check example 13'
run: cargo check -p e13_parallel_loops
run: cargo check -p e13_sqlite_database
- name: 'Check example 14'
run: cargo check -p e14_slash_commands
run: cargo check -p e14_message_components
- name: 'Check example 15'
run: cargo check -p e15_simple_dashboard
run: cargo check -p e15_webhook
- name: 'Check example 16'
run: cargo check -p e16_sqlite_database
- name: 'Check example 17'
run: cargo check -p e17_message_components
- name: 'Check example 18'
run: cargo check -p e18_webhook
- name: 'Check example 19'
run: cargo check -p e19_interactions_endpoint
run: cargo check -p e16_interactions_endpoint
1 change: 0 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ jobs:
RUSTDOCFLAGS: --cfg docsrs -D warnings
run: |
cargo doc --no-deps --features full
cargo doc --no-deps -p command_attr

- name: Prepare docs
shell: bash -e -O extglob {0}
Expand Down
7 changes: 3 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,9 @@ your code.

## Unsafe

Code that defines or uses `unsafe` functions must be reasoned with comments.
`unsafe` code can pose a potential for undefined behaviour related bugs and other
kinds of bugs to sprout if misused, weakening security. If you commit code containing
`unsafe`, you should confirm that its usage is necessary and correct.
Unsafe code is forbidden, and safe alternatives must be found. This can be mitigated by using
a third party crate to offload the burden of justifying the unsafe code, or finding a safe
alternative.

# Comment / Documentation style

Expand Down
97 changes: 45 additions & 52 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,55 +23,53 @@ homepage = "https://github.com/serenity-rs/serenity"
repository = "https://github.com/serenity-rs/serenity.git"
keywords = ["discord", "api"]
license = "ISC"
edition = "2021"
rust-version = "1.74"
edition = "2024"
rust-version = "1.85"

[dependencies]
#!! Downgrade to versions still supporting v1.74.0
#!! Make sure to remove on `next`
litemap = "=0.7.4"
zerofrom = "=0.1.5"

# Required dependencies
bitflags = "2.4.2"
serde_json = "1.0.108"
serde_json = { version = "1.0.108", features = ["raw_value"] }
async-trait = "0.1.74"
tracing = { version = "0.1.40", features = ["log"] }
serde = { version = "1.0.192", features = ["derive"] }
serde = { version = "1.0.192", features = ["derive", "rc"] }
url = { version = "2.4.1", features = ["serde"] }
tokio = { version = "1.34.0", features = ["fs", "macros", "rt", "sync", "time", "io-util"] }
tokio = { version = "1.34.0", features = ["macros", "rt", "sync", "time", "io-util"] }
futures = { version = "0.3.29", default-features = false, features = ["std"] }
time = { version = "0.3.36", features = ["formatting", "parsing", "serde-well-known"] }
base64 = { version = "0.22.0" }
secrecy = { version = "0.8.0", features = ["serde"] }
zeroize = { version = "1.7" } # Not used in serenity, but bumps the minimal version from secrecy
arrayvec = { version = "0.7.4", features = ["serde"] }
serde_cow = { version = "0.1.0" }
small-fixed-array = { version = "0.4", features = ["serde"] }
bool_to_bitflags = { version = "0.1.2" }
nonmax = { version = "0.5.5", features = ["serde"] }
strum = { version = "0.26", features = ["derive"] }
to-arraystring = "0.2.0"
extract_map = { version = "0.3.0", features = ["serde"] }
aformat = "0.1.3"
bytes = "1.5.0"
ref-cast = "1.0.23"
# Optional dependencies
fxhash = { version = "0.2.1", optional = true }
simd-json = { version = "0.13.4", optional = true }
uwl = { version = "0.6.0", optional = true }
levenshtein = { version = "1.0.5", optional = true }
foldhash = { version = "0.1.4", optional = true }
chrono = { version = "0.4.31", default-features = false, features = ["clock", "serde"], optional = true }
flate2 = { version = "1.0.28", optional = true }
reqwest = { version = "0.11.22", default-features = false, features = ["multipart", "stream"], optional = true }
static_assertions = { version = "1.1.0", optional = true }
tokio-tungstenite = { version = "0.21.0", optional = true }
typemap_rev = { version = "0.3.0", optional = true }
bytes = { version = "1.5.0", optional = true }
zstd-safe = { version = "7.2.1", optional = true }
reqwest = { version = "0.12.2", default-features = false, features = ["multipart", "stream", "json"], optional = true }
tokio-tungstenite = { version = "0.26.1", features = ["url"], optional = true }
percent-encoding = { version = "2.3.0", optional = true }
mini-moka = { version = "0.10.2", optional = true }
mime_guess = { version = "2.0.4", optional = true }
dashmap = { version = "5.5.3", features = ["serde"], optional = true }
parking_lot = { version = "0.12.1", optional = true }
dashmap = { version = "6.1.0", features = ["serde"], optional = true }
parking_lot = { version = "0.12.1", features = ["serde"] }
ed25519-dalek = { version = "2.0.0", optional = true }
typesize = { version = "0.1.2", optional = true, features = ["url", "time", "serde_json", "secrecy", "dashmap", "parking_lot", "details"] }
typesize = { version = "0.1.13", optional = true, features = ["url", "time", "serde_json", "secrecy", "parking_lot", "nonmax"] }
# serde feature only allows for serialisation,
# Serenity workspace crates
command_attr = { version = "0.5.3", path = "./command_attr", optional = true }
serenity-voice-model = { version = "0.2.0", path = "./voice-model", optional = true }

[dev-dependencies.http_crate]
version = "0.2.11"
version = "1.1.0"
package = "http"

[features]
Expand All @@ -81,49 +79,44 @@ default_native_tls = ["default_no_backend", "native_tls_backend"]

# Serenity requires a backend, this picks all default features without a backend.
default_no_backend = [
"builder",
"cache",
"chrono",
"client",
"framework",
"gateway",
"model",
"http",
"standard_framework",
"utils",
"transport_compression_zlib",
"transport_compression_zstd",
]

# Enables builder structs to configure Discord HTTP requests. Without this feature, you have to
# construct JSON manually at some places.
builder = []
builder = ["tokio/fs"]
# Enables the cache, which stores the data received from Discord gateway to provide access to
# complete guild data, channels, users and more without needing HTTP requests.
cache = ["fxhash", "dashmap", "parking_lot"]
cache = ["foldhash", "dashmap"]
# Enables collectors, a utility feature that lets you await interaction events in code with
# zero setup, without needing to setup an InteractionCreate event listener.
collector = ["gateway", "model"]
# Wraps the gateway and http functionality into a single interface
# TODO: should this require "gateway"?
client = ["http", "typemap_rev"]
collector = ["gateway"]
# Enables the Framework trait which is an abstraction for old-style text commands.
framework = ["client", "model", "utils"]
framework = ["gateway"]
# Enables gateway support, which allows bots to listen for Discord events.
gateway = ["flate2"]
gateway = ["model", "flate2", "dashmap"]
# Enables HTTP, which enables bots to execute actions on Discord.
http = ["mime_guess", "percent-encoding"]
http = ["dashmap", "mime_guess", "percent-encoding"]
# Enables wrapper methods around HTTP requests on model types.
# Requires "builder" to configure the requests and "http" to execute them.
# Note: the model type definitions themselves are always active, regardless of this feature.
# TODO: remove dependeny on utils feature
model = ["builder", "http", "utils"]
voice_model = ["serenity-voice-model"]
standard_framework = ["framework", "uwl", "levenshtein", "command_attr", "static_assertions", "parking_lot"]
# Enables zlib-stream transport compression of incoming gateway events.
transport_compression_zlib = ["flate2", "gateway"]
# Enables zstd-stream transport compression of incoming gateway events.
transport_compression_zstd = ["zstd-safe", "gateway"]
# Enables support for Discord API functionality that's not stable yet, as well as serenity APIs that
# are allowed to change even in semver non-breaking updates.
unstable_discord_api = []
unstable = []
# Enables some utility functions that can be useful for bot creators.
utils = []
voice = ["client", "model"]
voice = ["gateway"]
# Enables unstable tokio features to give explicit names to internally spawned tokio tasks
tokio_task_builder = ["tokio/tracing"]
interactions_endpoint = ["ed25519-dalek"]
Expand All @@ -132,33 +125,33 @@ chrono = ["dep:chrono", "typesize?/chrono"]

# This enables all parts of the serenity codebase
# (Note: all feature-gated APIs to be documented should have their features listed here!)
full = ["default", "collector", "unstable_discord_api", "voice", "voice_model", "interactions_endpoint"]

# Enables simd accelerated parsing.
simd_json = ["simd-json", "typesize?/simd_json"]
#
# Unstable functionality should be gated under the `unstable` feature.
full = ["default", "collector", "voice", "voice_model", "interactions_endpoint"]

# Enables temporary caching in functions that retrieve data via the HTTP API.
temp_cache = ["cache", "mini-moka", "typesize?/mini_moka"]

# Removed feature (https://github.com/serenity-rs/serenity/pull/2246)
absolute_ratelimits = []
typesize = ["dep:typesize", "dashmap/typesize", "small-fixed-array/typesize", "bool_to_bitflags/typesize", "extract_map/typesize"]

# Enables compile-time heavy instrument macros from tracing
tracing_instrument = ["tracing/attributes"]

# Backends to pick from:
# - Rustls Backends
rustls_backend = [
"reqwest/rustls-tls",
"tokio-tungstenite/rustls-tls-webpki-roots",
"bytes",
]

# - Native TLS Backends
native_tls_backend = [
"reqwest/native-tls",
"tokio-tungstenite/native-tls",
"bytes",
]


[package.metadata.docs.rs]
features = ["full"]
rustdoc-args = ["--cfg", "docsrs"]

Loading
Loading