tokio: added vita target support (#6094)

This commit is contained in:
Nikolay Arhipov 2023-10-25 15:44:41 +03:00 committed by GitHub
parent 503fad7908
commit f3949cc56d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 33 additions and 7 deletions

View File

@ -49,6 +49,7 @@ jobs:
- miri
- asan
- cross-check
- cross-check-tier3
- cross-test-with-parking_lot
- cross-test-without-parking_lot
- no-atomic-u64-test
@ -425,6 +426,31 @@ jobs:
env:
RUSTFLAGS: --cfg tokio_unstable -Dwarnings
cross-check-tier3:
name: cross-check-tier3
needs: basics
runs-on: ubuntu-latest
strategy:
matrix:
target:
- name: armv7-sony-vita-newlibeabihf
exclude_features: "process,signal,rt-process-signal,full"
steps:
- uses: actions/checkout@v3
- name: Install Rust ${{ env.rust_nightly }}
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: ${{ env.rust_nightly }}
components: rust-src
- name: Install cargo-hack
uses: taiki-e/install-action@v2
with:
tool: cargo-hack
- uses: Swatinem/rust-cache@v2
- run: cargo hack check -Zbuild-std --workspace --each-feature --target ${{ matrix.target.name }} --exclude-features "${{ matrix.target.exclude_features }}"
env:
RUSTFLAGS: --cfg tokio_unstable -Dwarnings
cross-test-with-parking_lot:
needs: basics
runs-on: ubuntu-latest

View File

@ -95,12 +95,12 @@ pin-project-lite = "0.2.11"
# Everything else is optional...
bytes = { version = "1.0.0", optional = true }
mio = { version = "0.8.6", optional = true, default-features = false }
mio = { version = "0.8.9", optional = true, default-features = false }
num_cpus = { version = "1.8.0", optional = true }
parking_lot = { version = "0.12.0", optional = true }
[target.'cfg(not(target_family = "wasm"))'.dependencies]
socket2 = { version = "0.5.3", optional = true, features = [ "all" ] }
socket2 = { version = "0.5.5", optional = true, features = [ "all" ] }
# Currently unstable. The API exposed by these features may be broken at any time.
# Requires `--cfg tokio_unstable` to enable.
@ -113,11 +113,11 @@ tracing = { version = "0.1.25", default-features = false, features = ["std"], op
backtrace = { version = "0.3.58" }
[target.'cfg(unix)'.dependencies]
libc = { version = "0.2.145", optional = true }
libc = { version = "0.2.149", optional = true }
signal-hook-registry = { version = "1.1.1", optional = true }
[target.'cfg(unix)'.dev-dependencies]
libc = { version = "0.2.145" }
libc = { version = "0.2.149" }
nix = { version = "0.26", default-features = false, features = ["fs", "socket"] }
[target.'cfg(windows)'.dependencies.windows-sys]
@ -139,7 +139,7 @@ mockall = "0.11.1"
async-stream = "0.3"
[target.'cfg(not(target_family = "wasm"))'.dev-dependencies]
socket2 = "0.5.3"
socket2 = "0.5.5"
tempfile = "3.1.0"
[target.'cfg(not(all(target_family = "wasm", target_os = "unknown")))'.dev-dependencies]

View File

@ -54,7 +54,7 @@ pub(crate) use self::impl_solaris::get_peer_cred;
#[cfg(target_os = "aix")]
pub(crate) use self::impl_aix::get_peer_cred;
#[cfg(target_os = "espidf")]
#[cfg(any(target_os = "espidf", target_os = "vita"))]
pub(crate) use self::impl_noproc::get_peer_cred;
#[cfg(any(
@ -295,7 +295,7 @@ pub(crate) mod impl_aix {
}
}
#[cfg(target_os = "espidf")]
#[cfg(any(target_os = "espidf", target_os = "vita"))]
pub(crate) mod impl_noproc {
use crate::net::unix::UnixStream;
use std::io;