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
7 changes: 1 addition & 6 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
[target.aarch64-apple-darwin]
rustflags = [
"-C", "link-arg=-Wl,-install_name,@rpath/libaccesskit.dylib",
]

[target.x86_64-apple-darwin]
[target.'cfg(target_vendor = "apple")']
rustflags = [
"-C", "link-arg=-Wl,-install_name,@rpath/libaccesskit.dylib",
]
21 changes: 18 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,36 @@ jobs:
clippy:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macOS-latest, windows-2025, ubuntu-latest]
name: cargo clippy
include:
- os: windows-2025
name: Windows
- os: macOS-latest
name: macOS
- os: ubuntu-latest
name: Linux
- os: ubuntu-latest
name: Android
target: aarch64-linux-android
- os: macOS-latest
name: iOS Simulator
target: aarch64-apple-ios-sim
name: cargo clippy (${{ matrix.name }})
steps:
- uses: actions/checkout@v6

- name: install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
targets: ${{ matrix.target }}

- name: restore cache
uses: Swatinem/rust-cache@v2

- name: cargo clippy
run: cargo clippy --all-targets -- -D warnings
run: cargo clippy ${{ matrix.target && format('--target {0}', matrix.target) }} --all-targets -- -D warnings

find-msrv:
runs-on: ubuntu-latest
Expand All @@ -72,6 +86,7 @@ jobs:
matrix:
include:
- target: aarch64-apple-darwin
- target: aarch64-apple-ios
- target: i686-pc-windows-gnu
- target: i686-pc-windows-msvc
- target: i686-unknown-linux-gnu
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@ jobs:
target: x86_64-apple-darwin
cmake-options: -DCMAKE_OSX_ARCHITECTURES=x86_64
path: macos/x86_64
- os: macOS-latest
target: aarch64-apple-ios
cmake-options: -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_OSX_SYSROOT=iphoneos
path: ios/arm64
- os: macOS-latest
target: aarch64-apple-ios-sim
cmake-options: -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_OSX_SYSROOT=iphonesimulator
path: ios-simulator/arm64
- os: macOS-latest
target: x86_64-apple-ios
cmake-options: -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_SYSROOT=iphonesimulator
path: ios-simulator/x86_64
- os: windows-2025
target: aarch64-pc-windows-msvc
setup-step: 'cmd.exe /k "C:\Program Files (x86)\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsamd64_x86.bat" `& powershell'
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if (ACCESSKIT_BUILD_LIBRARIES)
FetchContent_Declare(
Corrosion
GIT_REPOSITORY https://github.com/corrosion-rs/corrosion.git
GIT_TAG v0.5.1
GIT_TAG v0.6.1
)
FetchContent_MakeAvailable(Corrosion)

Expand Down
190 changes: 176 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ accesskit_unix = "0.21.1"
[target.'cfg(target_os = "android")'.dependencies]
accesskit_android = "0.7.3"

[target.'cfg(any(target_os = "ios", target_os = "tvos", target_os = "visionos", target_os = "watchos"))'.dependencies]
accesskit_ios = "0.1.0"

[profile.release]
lto = true
opt-level = "z"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ meson compile -C build
If you modify the C bindings, you need to regenerate the header file and commit it. To do this, in addition to the above requirements, you will need:

- A specific nightly Rust toolchain: `rustup install nightly-2025-03-27`
- [cbindgen](https://github.com/mozilla/cbindgen): `cargo install cbindgen`
- [cbindgen](https://github.com/mozilla/cbindgen): `cargo install cbindgen --version 0.28.0`
- [clang-format](https://releases.llvm.org/14.0.0/tools/clang/docs/ClangFormat.html), version 14 or higher

Once you have these requirements, the process of regenerating the header file is similar to building and installing from source with CMake, but using different configuration options:
Expand Down
4 changes: 3 additions & 1 deletion accesskit-config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ set_property(
)
if (_accesskit_os STREQUAL "macos")
target_link_libraries(accesskit-static INTERFACE "-framework AppKit" "-framework Foundation" "-framework CoreFoundation" objc c++)
elseif (_accesskit_os STREQUAL "ios" OR _accesskit_os STREQUAL "ios-simulator")
target_link_libraries(accesskit-static INTERFACE "-framework UIKit" "-framework Foundation" "-framework CoreFoundation" objc c++)
elseif (_accesskit_os STREQUAL "android")
target_link_libraries(accesskit-static INTERFACE android log)
elseif (_accesskit_os STREQUAL "linux")
Expand All @@ -30,7 +32,7 @@ if (_accesskit_os STREQUAL "windows")
PROPERTY IMPORTED_IMPLIB "${_accesskit_implib}"
)
endif()
if (_accesskit_os STREQUAL "macos")
if (_accesskit_os STREQUAL "macos" OR _accesskit_os STREQUAL "ios" OR _accesskit_os STREQUAL "ios-simulator")
set(_accesskit_shared_lib "libaccesskit.dylib")
elseif (_accesskit_os STREQUAL "android" OR _accesskit_os STREQUAL "linux")
set(_accesskit_shared_lib "libaccesskit.so")
Expand Down
Loading
Loading