Compare commits

...

8 Commits

Author SHA1 Message Date
Akos Vandra-Meyer 4b5399d377
Merge 26289b8427 into 8204690568 2025-03-21 05:35:53 +00:00
dependabot[bot] 8204690568
build(deps): bump syn from 2.0.99 to 2.0.100 (#652)
Bumps [syn](https://github.com/dtolnay/syn) from 2.0.99 to 2.0.100.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/2.0.99...2.0.100)

---
updated-dependencies:
- dependency-name: syn
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-10 18:34:13 +00:00
dependabot[bot] bbb3139c45
build(deps): bump taiki-e/install-action from 2.49.11 to 2.49.19 (#653)
Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.49.11 to 2.49.19.
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/taiki-e/install-action/compare/v2.49.11...v2.49.19)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-10 18:32:15 +00:00
dependabot[bot] 0915904bdb
build(deps): bump serde from 1.0.218 to 1.0.219 (#654)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.218 to 1.0.219.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.218...v1.0.219)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-10 18:31:58 +00:00
Rob Ede 26289b8427
simplify default_tokio_runtime 2023-11-06 22:27:11 +00:00
Rob Ede c008d716c9
Merge branch 'master' into remove-tokio-net-signal-dependency 2023-11-06 22:19:55 +00:00
Akos Vandra 234758cd55 fix fmt 2022-10-10 17:57:36 +02:00
Akos Vandra 845b465f65 remove hard dependency for tokio net and tokio signal 2022-10-10 17:55:36 +02:00
8 changed files with 19 additions and 16 deletions

View File

@ -64,7 +64,7 @@ jobs:
toolchain: ${{ matrix.version }}
- name: Install just, cargo-hack, cargo-nextest, cargo-ci-cache-clean
uses: taiki-e/install-action@v2.49.11
uses: taiki-e/install-action@v2.49.19
with:
tool: just,cargo-hack,cargo-nextest,cargo-ci-cache-clean
@ -121,7 +121,7 @@ jobs:
toolchain: nightly
- name: Install cargo-hack & cargo-minimal-versions
uses: taiki-e/install-action@v2.49.11
uses: taiki-e/install-action@v2.49.19
with:
tool: cargo-hack,cargo-minimal-versions

View File

@ -73,7 +73,7 @@ jobs:
toolchain: ${{ matrix.version.version }}
- name: Install just, cargo-hack, cargo-nextest, cargo-ci-cache-clean
uses: taiki-e/install-action@v2.49.11
uses: taiki-e/install-action@v2.49.19
with:
tool: just,cargo-hack,cargo-nextest,cargo-ci-cache-clean
@ -125,7 +125,7 @@ jobs:
toolchain: nightly
- name: Install just
uses: taiki-e/install-action@v2.49.11
uses: taiki-e/install-action@v2.49.19
with:
tool: just

View File

@ -23,7 +23,7 @@ jobs:
components: llvm-tools-preview
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@v2.49.11
uses: taiki-e/install-action@v2.49.19
with:
tool: cargo-llvm-cov

View File

@ -56,7 +56,7 @@ jobs:
toolchain: ${{ vars.RUST_VERSION_EXTERNAL_TYPES }}
- name: Install just
uses: taiki-e/install-action@v2.49.11
uses: taiki-e/install-action@v2.49.19
with:
tool: just

12
Cargo.lock generated
View File

@ -1860,18 +1860,18 @@ dependencies = [
[[package]]
name = "serde"
version = "1.0.218"
version = "1.0.219"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8dfc9d19bdbf6d17e22319da49161d5d0108e4188e8b680aef6299eed22df60"
checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.218"
version = "1.0.219"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f09503e191f4e797cb8aac08e9a4a4695c5edf6a2e70e376d961ddd5c969f82b"
checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
dependencies = [
"proc-macro2",
"quote",
@ -1975,9 +1975,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
[[package]]
name = "syn"
version = "2.0.99"
version = "2.0.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e02e925281e18ffd9d640e234264753c43edc62d64b2d4cf898f1bc5e75f3fc2"
checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0"
dependencies = [
"proc-macro2",
"quote",

View File

@ -15,15 +15,16 @@ rust-version.workspace = true
allowed_external_types = ["actix_macros::*", "tokio::*"]
[features]
default = ["macros"]
default = ["macros", "net"]
macros = ["actix-macros"]
io-uring = ["tokio-uring"]
net = ["tokio/net", "tokio/signal"]
[dependencies]
actix-macros = { version = "0.2.3", optional = true }
futures-core = { version = "0.3", default-features = false }
tokio = { version = "1.23.1", features = ["rt", "net", "parking_lot", "signal", "sync", "time"] }
tokio = { version = "1.23.1", features = ["rt", "parking_lot", "sync", "time"] }
# runtime for `io-uring` feature
[target.'cfg(target_os = "linux")'.dependencies]

View File

@ -44,6 +44,7 @@
#![allow(clippy::type_complexity)]
#![doc(html_logo_url = "https://actix.rs/img/logo.png")]
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#[cfg(all(not(target_os = "linux"), feature = "io-uring"))]
compile_error!("io_uring is a linux only feature.");
@ -70,6 +71,7 @@ pub use self::{
system::{System, SystemRunner},
};
#[cfg(feature = "net")]
pub mod signal {
//! Asynchronous signal handling (Tokio re-exports).
@ -81,6 +83,7 @@ pub mod signal {
pub use tokio::signal::ctrl_c;
}
#[cfg(feature = "net")]
pub mod net {
//! TCP/UDP/Unix bindings (mostly Tokio re-exports).

View File

@ -14,8 +14,7 @@ pub struct Runtime {
pub(crate) fn default_tokio_runtime() -> io::Result<tokio::runtime::Runtime> {
tokio::runtime::Builder::new_current_thread()
.enable_io()
.enable_time()
.enable_all()
.build()
}