Skip to content

Commit

Permalink
Added vita target support
Browse files Browse the repository at this point in the history
  • Loading branch information
nikarh committed Oct 24, 2023
1 parent 58acb56 commit 642881c
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 8 deletions.
27 changes: 26 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env:
RUST_BACKTRACE: 1
# Change to specific Rust release to pin
rust_stable: stable
rust_nightly: nightly-2023-10-21
rust_nightly: nightly-2023-05-18
rust_clippy: 1.65.0
# When updating this, also update:
# - README.md
Expand Down Expand Up @@ -425,6 +425,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
Expand Down
10 changes: 5 additions & 5 deletions tokio/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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]
Expand All @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions tokio/src/net/unix/ucred.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 642881c

Please sign in to comment.