Skip to content

Introduce a "tokio" to allow pulling a trait-only build#644

Merged
crepererum merged 1 commit intoapache:mainfrom
AdamGS:adamg/no-tokio-feature-set
Feb 18, 2026
Merged

Introduce a "tokio" to allow pulling a trait-only build#644
crepererum merged 1 commit intoapache:mainfrom
AdamGS:adamg/no-tokio-feature-set

Conversation

@AdamGS
Copy link
Contributor

@AdamGS AdamGS commented Feb 16, 2026

Which issue does this PR close?

Closes #.

Rationale for this change

This change allows users to pull a trait-only build that doesn't require tokio, keeping it very lightweight (its one of the top 3 slowest dependencies to build when building without default features, next to syn and futures-util).

I've also considered making the http dependency optional, and I think it might be possible to make url optional too, but I'm not sure what's the desired balance here and figured its worth getting some feedback first.

Running cargo tree -e normal --no-default-features on this branch shows:

object_store v0.13.1 (/Users/adamgs/code/object-store)
object_store v0.13.1 (/Users/adamgs/code/object-store)
├── async-trait v0.1.89 (proc-macro)
│   ├── proc-macro2 v1.0.105
│   │   └── unicode-ident v1.0.22
│   ├── quote v1.0.43
│   │   └── proc-macro2 v1.0.105 (*)
│   └── syn v2.0.114
│       ├── proc-macro2 v1.0.105 (*)
│       ├── quote v1.0.43 (*)
│       └── unicode-ident v1.0.22
├── bytes v1.11.0
├── chrono v0.4.43
│   ├── iana-time-zone v0.1.64
│   │   └── core-foundation-sys v0.8.7
│   └── num-traits v0.2.19
├── futures v0.3.31
│   ├── futures-channel v0.3.31
│   │   ├── futures-core v0.3.31
│   │   └── futures-sink v0.3.31
│   ├── futures-core v0.3.31
│   ├── futures-executor v0.3.31
│   │   ├── futures-core v0.3.31
│   │   ├── futures-task v0.3.31
│   │   └── futures-util v0.3.31
│   │       ├── futures-channel v0.3.31 (*)
│   │       ├── futures-core v0.3.31
│   │       ├── futures-io v0.3.31
│   │       ├── futures-macro v0.3.31 (proc-macro)
│   │       │   ├── proc-macro2 v1.0.105 (*)
│   │       │   ├── quote v1.0.43 (*)
│   │       │   └── syn v2.0.114 (*)
│   │       ├── futures-sink v0.3.31
│   │       ├── futures-task v0.3.31
│   │       ├── memchr v2.7.6
│   │       ├── pin-project-lite v0.2.16
│   │       ├── pin-utils v0.1.0
│   │       └── slab v0.4.11
│   ├── futures-io v0.3.31
│   ├── futures-sink v0.3.31
│   ├── futures-task v0.3.31
│   └── futures-util v0.3.31 (*)
├── http v1.4.0
│   ├── bytes v1.11.0
│   └── itoa v1.0.17
├── humantime v2.3.0
├── itertools v0.14.0
│   └── either v1.15.0
├── parking_lot v0.12.5
│   ├── lock_api v0.4.14
│   │   └── scopeguard v1.2.0
│   └── parking_lot_core v0.9.12
│       ├── cfg-if v1.0.4
│       ├── libc v0.2.180
│       └── smallvec v1.15.1
├── percent-encoding v2.3.2
├── thiserror v2.0.17
│   └── thiserror-impl v2.0.17 (proc-macro)
│       ├── proc-macro2 v1.0.105 (*)
│       ├── quote v1.0.43 (*)
│       └── syn v2.0.114 (*)
└── url v2.5.8
    ├── form_urlencoded v1.2.2
    │   └── percent-encoding v2.3.2
    ├── idna v1.1.0
    │   ├── idna_adapter v1.2.1
    │   │   ├── icu_normalizer v2.1.1
    │   │   │   ├── icu_collections v2.1.1
    │   │   │   │   ├── displaydoc v0.2.5 (proc-macro)
    │   │   │   │   │   ├── proc-macro2 v1.0.105 (*)
    │   │   │   │   │   ├── quote v1.0.43 (*)
    │   │   │   │   │   └── syn v2.0.114 (*)
    │   │   │   │   ├── potential_utf v0.1.4
    │   │   │   │   │   └── zerovec v0.11.5
    │   │   │   │   │       ├── yoke v0.8.1
    │   │   │   │   │       │   ├── stable_deref_trait v1.2.1
    │   │   │   │   │       │   ├── yoke-derive v0.8.1 (proc-macro)
    │   │   │   │   │       │   │   ├── proc-macro2 v1.0.105 (*)
    │   │   │   │   │       │   │   ├── quote v1.0.43 (*)
    │   │   │   │   │       │   │   ├── syn v2.0.114 (*)
    │   │   │   │   │       │   │   └── synstructure v0.13.2
    │   │   │   │   │       │   │       ├── proc-macro2 v1.0.105 (*)
    │   │   │   │   │       │   │       ├── quote v1.0.43 (*)
    │   │   │   │   │       │   │       └── syn v2.0.114 (*)
    │   │   │   │   │       │   └── zerofrom v0.1.6
    │   │   │   │   │       │       └── zerofrom-derive v0.1.6 (proc-macro)
    │   │   │   │   │       │           ├── proc-macro2 v1.0.105 (*)
    │   │   │   │   │       │           ├── quote v1.0.43 (*)
    │   │   │   │   │       │           ├── syn v2.0.114 (*)
    │   │   │   │   │       │           └── synstructure v0.13.2 (*)
    │   │   │   │   │       ├── zerofrom v0.1.6 (*)
    │   │   │   │   │       └── zerovec-derive v0.11.2 (proc-macro)
    │   │   │   │   │           ├── proc-macro2 v1.0.105 (*)
    │   │   │   │   │           ├── quote v1.0.43 (*)
    │   │   │   │   │           └── syn v2.0.114 (*)
    │   │   │   │   ├── yoke v0.8.1 (*)
    │   │   │   │   ├── zerofrom v0.1.6 (*)
    │   │   │   │   └── zerovec v0.11.5 (*)
    │   │   │   ├── icu_normalizer_data v2.1.1
    │   │   │   ├── icu_provider v2.1.1
    │   │   │   │   ├── displaydoc v0.2.5 (proc-macro) (*)
    │   │   │   │   ├── icu_locale_core v2.1.1
    │   │   │   │   │   ├── displaydoc v0.2.5 (proc-macro) (*)
    │   │   │   │   │   ├── litemap v0.8.1
    │   │   │   │   │   ├── tinystr v0.8.2
    │   │   │   │   │   │   ├── displaydoc v0.2.5 (proc-macro) (*)
    │   │   │   │   │   │   └── zerovec v0.11.5 (*)
    │   │   │   │   │   ├── writeable v0.6.2
    │   │   │   │   │   └── zerovec v0.11.5 (*)
    │   │   │   │   ├── writeable v0.6.2
    │   │   │   │   ├── yoke v0.8.1 (*)
    │   │   │   │   ├── zerofrom v0.1.6 (*)
    │   │   │   │   ├── zerotrie v0.2.3
    │   │   │   │   │   ├── displaydoc v0.2.5 (proc-macro) (*)
    │   │   │   │   │   ├── yoke v0.8.1 (*)
    │   │   │   │   │   └── zerofrom v0.1.6 (*)
    │   │   │   │   └── zerovec v0.11.5 (*)
    │   │   │   ├── smallvec v1.15.1
    │   │   │   └── zerovec v0.11.5 (*)
    │   │   └── icu_properties v2.1.2
    │   │       ├── icu_collections v2.1.1 (*)
    │   │       ├── icu_locale_core v2.1.1 (*)
    │   │       ├── icu_properties_data v2.1.2
    │   │       ├── icu_provider v2.1.1 (*)
    │   │       ├── zerotrie v0.2.3 (*)
    │   │       └── zerovec v0.11.5 (*)
    │   ├── smallvec v1.15.1
    │   └── utf8_iter v1.0.4
    └── percent-encoding v2.3.2

While currently on main it prints:

object_store v0.13.1 (/Users/adamgs/code/object-store)
├── async-trait v0.1.89 (proc-macro)
│   ├── proc-macro2 v1.0.105
│   │   └── unicode-ident v1.0.22
│   ├── quote v1.0.43
│   │   └── proc-macro2 v1.0.105 (*)
│   └── syn v2.0.114
│       ├── proc-macro2 v1.0.105 (*)
│       ├── quote v1.0.43 (*)
│       └── unicode-ident v1.0.22
├── bytes v1.11.0
├── chrono v0.4.43
│   ├── iana-time-zone v0.1.64
│   │   └── core-foundation-sys v0.8.7
│   └── num-traits v0.2.19
├── futures v0.3.31
│   ├── futures-channel v0.3.31
│   │   ├── futures-core v0.3.31
│   │   └── futures-sink v0.3.31
│   ├── futures-core v0.3.31
│   ├── futures-executor v0.3.31
│   │   ├── futures-core v0.3.31
│   │   ├── futures-task v0.3.31
│   │   └── futures-util v0.3.31
│   │       ├── futures-channel v0.3.31 (*)
│   │       ├── futures-core v0.3.31
│   │       ├── futures-io v0.3.31
│   │       ├── futures-macro v0.3.31 (proc-macro)
│   │       │   ├── proc-macro2 v1.0.105 (*)
│   │       │   ├── quote v1.0.43 (*)
│   │       │   └── syn v2.0.114 (*)
│   │       ├── futures-sink v0.3.31
│   │       ├── futures-task v0.3.31
│   │       ├── memchr v2.7.6
│   │       ├── pin-project-lite v0.2.16
│   │       ├── pin-utils v0.1.0
│   │       └── slab v0.4.11
│   ├── futures-io v0.3.31
│   ├── futures-sink v0.3.31
│   ├── futures-task v0.3.31
│   └── futures-util v0.3.31 (*)
├── http v1.4.0
│   ├── bytes v1.11.0
│   └── itoa v1.0.17
├── humantime v2.3.0
├── itertools v0.14.0
│   └── either v1.15.0
├── parking_lot v0.12.5
│   ├── lock_api v0.4.14
│   │   └── scopeguard v1.2.0
│   └── parking_lot_core v0.9.12
│       ├── cfg-if v1.0.4
│       ├── libc v0.2.180
│       └── smallvec v1.15.1
├── percent-encoding v2.3.2
├── thiserror v2.0.17
│   └── thiserror-impl v2.0.17 (proc-macro)
│       ├── proc-macro2 v1.0.105 (*)
│       ├── quote v1.0.43 (*)
│       └── syn v2.0.114 (*)
├── tokio v1.49.0
│   ├── bytes v1.11.0
│   ├── pin-project-lite v0.2.16
│   └── tokio-macros v2.6.0 (proc-macro)
│       ├── proc-macro2 v1.0.105 (*)
│       ├── quote v1.0.43 (*)
│       └── syn v2.0.114 (*)
├── tracing v0.1.44
│   ├── pin-project-lite v0.2.16
│   ├── tracing-attributes v0.1.31 (proc-macro)
│   │   ├── proc-macro2 v1.0.105 (*)
│   │   ├── quote v1.0.43 (*)
│   │   └── syn v2.0.114 (*)
│   └── tracing-core v0.1.36
│       └── once_cell v1.21.3
└── url v2.5.8
    ├── form_urlencoded v1.2.2
    │   └── percent-encoding v2.3.2
    ├── idna v1.1.0
    │   ├── idna_adapter v1.2.1
    │   │   ├── icu_normalizer v2.1.1
    │   │   │   ├── icu_collections v2.1.1
    │   │   │   │   ├── displaydoc v0.2.5 (proc-macro)
    │   │   │   │   │   ├── proc-macro2 v1.0.105 (*)
    │   │   │   │   │   ├── quote v1.0.43 (*)
    │   │   │   │   │   └── syn v2.0.114 (*)
    │   │   │   │   ├── potential_utf v0.1.4
    │   │   │   │   │   └── zerovec v0.11.5
    │   │   │   │   │       ├── yoke v0.8.1
    │   │   │   │   │       │   ├── stable_deref_trait v1.2.1
    │   │   │   │   │       │   ├── yoke-derive v0.8.1 (proc-macro)
    │   │   │   │   │       │   │   ├── proc-macro2 v1.0.105 (*)
    │   │   │   │   │       │   │   ├── quote v1.0.43 (*)
    │   │   │   │   │       │   │   ├── syn v2.0.114 (*)
    │   │   │   │   │       │   │   └── synstructure v0.13.2
    │   │   │   │   │       │   │       ├── proc-macro2 v1.0.105 (*)
    │   │   │   │   │       │   │       ├── quote v1.0.43 (*)
    │   │   │   │   │       │   │       └── syn v2.0.114 (*)
    │   │   │   │   │       │   └── zerofrom v0.1.6
    │   │   │   │   │       │       └── zerofrom-derive v0.1.6 (proc-macro)
    │   │   │   │   │       │           ├── proc-macro2 v1.0.105 (*)
    │   │   │   │   │       │           ├── quote v1.0.43 (*)
    │   │   │   │   │       │           ├── syn v2.0.114 (*)
    │   │   │   │   │       │           └── synstructure v0.13.2 (*)
    │   │   │   │   │       ├── zerofrom v0.1.6 (*)
    │   │   │   │   │       └── zerovec-derive v0.11.2 (proc-macro)
    │   │   │   │   │           ├── proc-macro2 v1.0.105 (*)
    │   │   │   │   │           ├── quote v1.0.43 (*)
    │   │   │   │   │           └── syn v2.0.114 (*)
    │   │   │   │   ├── yoke v0.8.1 (*)
    │   │   │   │   ├── zerofrom v0.1.6 (*)
    │   │   │   │   └── zerovec v0.11.5 (*)
    │   │   │   ├── icu_normalizer_data v2.1.1
    │   │   │   ├── icu_provider v2.1.1
    │   │   │   │   ├── displaydoc v0.2.5 (proc-macro) (*)
    │   │   │   │   ├── icu_locale_core v2.1.1
    │   │   │   │   │   ├── displaydoc v0.2.5 (proc-macro) (*)
    │   │   │   │   │   ├── litemap v0.8.1
    │   │   │   │   │   ├── tinystr v0.8.2
    │   │   │   │   │   │   ├── displaydoc v0.2.5 (proc-macro) (*)
    │   │   │   │   │   │   └── zerovec v0.11.5 (*)
    │   │   │   │   │   ├── writeable v0.6.2
    │   │   │   │   │   └── zerovec v0.11.5 (*)
    │   │   │   │   ├── writeable v0.6.2
    │   │   │   │   ├── yoke v0.8.1 (*)
    │   │   │   │   ├── zerofrom v0.1.6 (*)
    │   │   │   │   ├── zerotrie v0.2.3
    │   │   │   │   │   ├── displaydoc v0.2.5 (proc-macro) (*)
    │   │   │   │   │   ├── yoke v0.8.1 (*)
    │   │   │   │   │   └── zerofrom v0.1.6 (*)
    │   │   │   │   └── zerovec v0.11.5 (*)
    │   │   │   ├── smallvec v1.15.1
    │   │   │   └── zerovec v0.11.5 (*)
    │   │   └── icu_properties v2.1.2
    │   │       ├── icu_collections v2.1.1 (*)
    │   │       ├── icu_locale_core v2.1.1 (*)
    │   │       ├── icu_properties_data v2.1.2
    │   │       ├── icu_provider v2.1.1 (*)
    │   │       ├── zerotrie v0.2.3 (*)
    │   │       └── zerovec v0.11.5 (*)
    │   ├── smallvec v1.15.1
    │   └── utf8_iter v1.0.4
    └── percent-encoding v2.3.2

What changes are included in this PR?

Introduces a new "tokio" feature, which is enabled by default through both the "fs" feature and "cloud" feature. The feature pulls in both tokio and tracing, and enables all provided middlewares (retry, throttling, buffered::*, and LimitStore).

Are there any user-facing changes?

For users pulling the crate without default features, they won't be able to use all the middlewares mentioned above.

Signed-off-by: Adam Gutglick <adamgsal@gmail.com>
@crepererum
Copy link
Contributor

crepererum commented Feb 16, 2026

Looks clean, thank you. One suggestions: Could you add a small note about the tokio feature and the fact that the core trait don't require tokio to this paragraph here:

//! # Available [`ObjectStore`] Implementations
//!
//! By default, this crate provides the following implementations:
//!
//! * Memory: [`InMemory`](memory::InMemory)
//!
//! Feature flags are used to enable support for other implementations:
//!
#![cfg_attr(
feature = "fs",
doc = "* Local filesystem: [`LocalFileSystem`](local::LocalFileSystem)"
)]
#![cfg_attr(
feature = "gcp",
doc = "* [`gcp`]: [Google Cloud Storage](https://cloud.google.com/storage/) support. See [`GoogleCloudStorageBuilder`](gcp::GoogleCloudStorageBuilder)"
)]
#![cfg_attr(
feature = "aws",
doc = "* [`aws`]: [Amazon S3](https://aws.amazon.com/s3/). See [`AmazonS3Builder`](aws::AmazonS3Builder)"
)]
#![cfg_attr(
feature = "azure",
doc = "* [`azure`]: [Azure Blob Storage](https://azure.microsoft.com/en-gb/services/storage/blobs/). See [`MicrosoftAzureBuilder`](azure::MicrosoftAzureBuilder)"
)]
#![cfg_attr(
feature = "http",
doc = "* [`http`]: [HTTP/WebDAV Storage](https://datatracker.ietf.org/doc/html/rfc2518). See [`HttpBuilder`](http::HttpBuilder)"
)]
//!

Based on your cargo tree output, I think we may want to double-check our usage of the futures umbrella crate at some point.

@AdamGS
Copy link
Contributor Author

AdamGS commented Feb 16, 2026

will do, also happy to shave down the futures dependency in this PR

@AdamGS
Copy link
Contributor Author

AdamGS commented Feb 16, 2026

Pushed the docs change, this is how it looks:

Screenshot 2026-02-16 at 14 02 40

@AdamGS
Copy link
Contributor Author

AdamGS commented Feb 16, 2026

Ok I also have a commit splitting the futures dependency into the required subcrates, would you like to have it as part of this PR or as a separate one?

@crepererum
Copy link
Contributor

Ok I also have a commit splitting the futures dependency into the required subcrates, would you like to have it as part of this PR or as a separate one?

Let's do that as a separate follow-up PR.

Copy link
Contributor

@crepererum crepererum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you

@crepererum crepererum merged commit 8140480 into apache:main Feb 18, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments