Skip to content

Releases: doom-fish/screencapturekit-rs

v8.0.0

19 Jun 06:52
dbeaed0

Choose a tag to compare

Added

  • (async) implement futures::Stream for AsyncSCStream and recording events
  • (async) multi-output AsyncSCStream (capture A/V from one stream)
  • (async) [breaking] propagate stop errors in AsyncSCStream; consolidate stop delegate
  • (async) [breaking] make AsyncSCStream lifecycle methods truly async

Fixed

  • (stream) surface failed output-handler registration instead of dropping it silently

Other

  • (deps-dev) raise bitflags cap to <2.14 (fixes fresh-resolve to 2.13.0)
  • (readme) update for v8 async API
  • (examples) add audio+video multi-output showcase; apply rustfmt
  • restore Recall.ai sponsor banner and update v6 references to v7

Changed

  • [breaking] AsyncSCStream::start_capture, stop_capture, update_configuration,
    and update_content_filter are now genuinely async: they return a
    StreamControlFuture (resolving to Result<(), SCError>) that you .await,
    instead of blocking the calling thread on a condition variable. Awaiting them
    parks the task via its Waker and resumes from the Swift completion callback,
    so they no longer stall single-threaded/current-thread executors. This makes
    the async surface fully waker-based and consistent with the underlying Swift
    Task { try await … } entry points.

    Migration: add .await (e.g. stream.start_capture().await?). For a
    blocking call, use the synchronous SCStream directly via
    stream.inner().start_capture().

  • AsyncSCStream now installs a stream delegate so that when ScreenCaptureKit
    stops the stream with an error (display disconnected, permission revoked, …)
    the sample iterator is closed — next().await resolves to None instead of
    pending forever — and the error is recorded (see take_error). AsyncSCStream::new
    likewise no longer silently swallows a failed output-handler registration: it
    closes the stream and records the error.

  • The stream engine now dispatches a single canonical stop callback,
    SCStreamDelegateTrait::did_stop_with_error, on an error stop. It no longer
    also calls stream_did_stop for the same event (the previous behavior fired
    both). StreamCallbacks::on_stop keeps working (it is now driven by
    did_stop_with_error).

Added

  • async_api::StreamControlFuture — the Send future returned by the
    AsyncSCStream lifecycle methods.
  • AsyncSCStream::take_error — returns the SCError that stopped the stream,
    if any, after next() reports the iterator closed.
  • Multi-output async capture: AsyncSCStream::add_output_type registers an
    additional output type (e.g. add audio to a screen stream), and
    AsyncSCStream::next_typed / try_next_typed (plus the NextSampleTyped
    future) yield each sample together with its SCStreamOutputType so audio and
    video can be captured from one stream and told apart.
  • futures::Stream integration (enabled by the async feature, via a new
    optional futures-core dependency): AsyncSCStream::frames /
    frames_typed and AsyncSCRecordingOutput::events return
    futures_core::Streams (SampleStream, TypedSampleStream,
    RecordingEventStream) so captures plug into the StreamExt combinator
    ecosystem (map, filter, take, for_each, collect, …).

Deprecated

  • SCStreamDelegateTrait::stream_did_stopScreenCaptureKit only reports
    stops via did_stop_with_error, which is now the single source of truth;
    the engine no longer invokes stream_did_stop. Implement did_stop_with_error
    instead.

v7.0.1

06 Jun 19:56
a8c5482

Choose a tag to compare

Fixed

  • resolve safety/FFI findings from deep code review

Other

  • apply rustfmt to satisfy CI formatting check
  • (deps) update bitflags requirement from >=2.0, <2.12 to >=2.0, <2.13 (#150)

v7.0.0

02 Jun 21:16
7a9ccc6

Choose a tag to compare

Added

  • add strided pixel render + locked IOSurface CPU view; use ffi_string helper for file_url

Fixed

  • use MaybeUninit for batch FFI scratch buffers

Other

  • cap dev-only bitflags below 2.12 to fix dispatch2 recursion overflow
  • Merge ffi/wrappers: sc_retained! macro + null-checked constructors
  • consolidate retain/release wrappers via sc_retained! macro and standardize null-checked constructors
  • Merge ffi/picker: reclaim observer callback on replacement + consolidate one-shot trampolines
  • Merge ffi/screenshot: strided pixel render + ffi_string helper for file_url

v6.1.0

29 May 12:04

Choose a tag to compare

Added

  • add SCContentFilterBuilder::try_build and fix CI/release flow

Other

  • add comment to CARGO_TERM_COLOR env (no-op)

v3.1.3

17 May 19:06

Choose a tag to compare

Other

  • (docs) pin Documentation workflow to macos-26
  • widen apple-metal to <0.9 (use v0.8.0 with @available guards)

v3.1.2

17 May 18:07

Choose a tag to compare

Fixed

  • (docs) backtick ScreenCaptureKit in README to satisfy doc-markdown
  • (docs) drop non-existent com.apple.security.screen-capture entitlement (#144)
  • (stream-config) pin BGRA as default pixel format (#145)

Other

  • (deps) publish-friendly Cargo.toml; move sibling paths to local .cargo/config
  • add explicit CodeQL workflow on macos-26 (Rust-only)
  • pin apple-metal-rs sibling to v0.7.1 + restrict matrix to macos-26
  • drop macos-14 from build + leak-check matrix
  • (siblings) pin apple-cf/apple-metal sibling clones to v0.6.x
  • (lint) run on macos-26 so --all-features can compile macos_26_0 code
  • (workflow) clone sibling path-dependency repos before build
  • widen apple-cf / apple-metal version constraints
  • fmt + audit-v2 follow-ups

v3.1.1

17 May 16:21

Choose a tag to compare

3.1.1 - 2026-05-16

Fixed

  • (error) correct SC_STREAM_ERROR_DOMAIN to match Apple's exported SCStreamErrorDomain constant

v3.1.0

17 May 16:21

Choose a tag to compare

3.1.0 - 2026-05-16

Added

  • (coverage) add COVERAGE.md and certify the audited ScreenCaptureKit surface
  • (picker) add SCContentSharingPickerConfiguration::allowed_picker_modes()
  • (recording) add SCRecordingOutputConfiguration::output_url()
  • (config) add SCStreamConfiguration::color_space_name() and RGBA background-color accessors

Fixed

  • (preset) map CaptureHDRRecordingPreservedSDRHDR10 to Apple's macOS 26 HDR-recording preset
  • (config) retain assigned CGColorRef / CFStringRef values for backgroundColor, colorSpaceName, and colorMatrix
  • (config) round-trip SCStreamConfiguration color and preset properties in tests
  • (deps) align local apple-cf / apple-metal version bounds with 0.6
  • (examples) import IOSurfaceMetalExt where apple-metal 0.6 requires the trait in scope

v3.0.1

17 May 16:21

Choose a tag to compare

Fixed

  • (deps) widen apple-cf / apple-metal version constraints to <0.6 so
    downstream consumers already on apple-cf 0.5 / apple-metal 0.5 resolve
    without conflicts.

No source / behaviour changes vs v3.0.0 — this is a metadata-only bump.

v3.0.0

17 May 16:21

Choose a tag to compare

Long-pending migration of CMSampleBuffer / CVPixelBuffer / IOSurface /
CMTime / CMBlockBuffer / CMFormatDescription helpers into the new
apple-cf crate, plus extraction of
Metal interop into the new apple-metal
crate.

Highlights

  • screencapturekit::metal::MetalDevice::as_apple_metal() bridges the SCK
    Metal renderer to the lightweight apple-metal crate without an extra
    retain.
  • screencapturekit::apple_metal re-exports apple-metal for downstream
    code.
  • Migration delivered in 5 phases (Phase 1 → Phase 5) that you can browse
    through the merge commit migrate-to-apple-cf for incremental review.

Verified

  • Library tests pass on macOS 26 / Apple Silicon.
  • Full build succeeds against apple-cf v0.2 + apple-metal v0.1.1.

Compatibility

This is a major release — Cargo.toml deps now resolve to apple-cf and
apple-metal directly. See MIGRATION.md for the upgrade path from 2.x.