Skip to content
프로젝트

소개

Rust bindings for Apple frameworks

개발 도구

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

Cidre (French Cidr) - Rusty Apple API's

Goals

  • Performance
  • Zero cost objc interop
  • Mobile devices support
  • No legacy platforms support
  • Rusty API (ObjC, C and Swift)
  • ML friendly
  • API Availability checks
  • Async API support
  • Battle tested in own apps. (StreamChamp.app for recording, Yoml.app to be released, but it is a beast)

Performance

  • Developer can finish critical path without deallocations (mtl render pass).
  • Zero cost selectors calls on arm (XCode 14.3) WWDC video 3:10
  • Integrated async blocks
  • Zero cost Apple's C API interfaces
  • Static cf::String and ns::String refs (ns::str!(c"hello"))

Platforms

  • macOS
  • iOS/iPadOS
  • tvOS
  • watchOS
  • visionOS

iOS devices runner

Run tests on your iPhone or iPad.

  1. Run cargo install --path ./cargo-box to install cargo box plugin
  2. Run cargo box teams to find out your DEVELOMPENT_TEAM id
  3. Run cargo box devices to find out your DEVICE_ID
  4. Create .box file with contents:
BOX_ORG_ID = unique org id, for instance org.cidre (it may be reserved already)
DEVELOPMENT_TEAM = team id from step 2
DEVICE_ID = device id from step 3
  1. Run cargo t --target aarch64-apple-ios (make sure you have connected and unlocked device)
  2. Run cargo r --target aarch64-apple-ios --example device-formats
  3. Run cargo box capture to take a screenshot of the device (uses DEVICE_ID, override with --device)
  4. Run BOX_DEBUG=1 cargo r --target aarch64-apple-ios --example device-formats to launch the app suspended and attach lldb to it (continue to run, process kill or quit to stop)

Versioning (API Availability)

Deployment targets are controlled via features macos_x_x, ios_x_x, tvos_x_x, watchos_x_x, visionos_x_x. If selector is not defined in deployment target it becomes unsafe. So developer should check if object responses to that selector before call it.

Default features: macos_15_0, ios_18_0, tvos_18_0, maccatalyst_18_0, watchos_11_0, visionos_2_0;

Minimum deployment targets are macOS 12.0, iOS 15.0 and Mac Catalyst 15.0 starting with v0.30.0; APIs available at or below them need no feature flag. If you need to target older macOS, iOS or Mac Catalyst versions, use v0.29.0.

Shortcuts

  • address -> addr
  • argument -> arg
  • attachment -> attach
  • attribute -> attr
  • attributted -> attr
  • buffer -> buf
  • command -> cmd
  • count -> len
  • descriptor -> desc
  • description -> desc
  • destination -> dst
  • error -> err
  • extension -> ext
  • lavel -> lvl
  • language -> lang
  • length -> len
  • mutable -> mut
  • operation -> op
  • options -> opts
  • pointer -> ptr
  • source -> src
  • surface - surf
  • throws -> _throws (not shortcut but indicator of possible exception)

About

This is personal research project. With this project I learn Apple SDK's and rust and build new streaming app.

관련 프로젝트 살펴보기

불러오는 중…