Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 10 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ on:
jobs:
check:
name: Type checking (${{ matrix.target.name }})
runs-on: ubuntu-latest
runs-on: ${{ matrix.target.host }}
if: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork) || github.event_name == 'push' }}
strategy:
matrix:
Expand All @@ -36,10 +36,19 @@ jobs:
# triple: x86_64-pc-windows-gnu
- name: Linux
triple: x86_64-unknown-linux-gnu
host: ubuntu-latest
- name: Android
triple: aarch64-linux-android
host: ubuntu-latest
- name: macOS
triple: x86_64-apple-darwin
host: macos-latest
- name: iOS
triple: aarch64-apple-ios
host: macos-latest
- name: FreeBSD
triple: x86_64-unknown-freebsd
host: ubuntu-latest

steps:
- name: Checkout sources
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Unreleased
- Added support for Android
- Added support for iOS

# 0.1.4

- Modified MacOS implementation to be friendly towards Apple app store review guidelines.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ targets = ["x86_64-unknown-linux-gnu"]

[dependencies]

[target.'cfg(any(target_os = "macos", target_os = "freebsd"))'.dependencies]
[target.'cfg(any(target_os = "macos", target_os = "ios", target_os = "freebsd"))'.dependencies]
libc = "0.2.107"
File renamed without changes.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

use std::num::NonZeroUsize;

#[cfg_attr(target_os = "linux", path = "linux.rs")]
#[cfg_attr(any(target_os = "linux", target_os = "android"), path = "linux.rs")]
#[cfg_attr(target_os = "freebsd", path = "freebsd.rs")]
#[cfg_attr(target_os = "macos", path = "macos.rs")]
#[cfg_attr(any(target_os = "macos", target_os = "ios"), path = "apple.rs")]
mod imp;

/// Obtain the number of threads currently part of the active process. Returns `None` if the number
Expand Down