Skip to content

Non Sendable Hub.Config #172

Open
Open
@piotrkowalczuk

Description

@piotrkowalczuk

The current implementation of Hub.Config can't be marked as Sendable, which restricts all types referencing Config from being passed across concurrency boundaries. This limitation prevents efficient use of Tokenizer in structured concurrency contexts, such as Task {}, within actors or SwiftUI. Therefore causes friction while adopting Swift 6, or some iOS features like AppIntent which requires passing concurrency boundaries.

Observations

  • Config internally uses Dictionary that in combination with NSString is inherently non Sendable.
  • Unlike NSString, String enforces unwanted unicode canonical equivalence.

Metadata

Metadata

Assignees

No one assigned

    Labels

    hubRelated to the Swift -> Hugging Face Hub integration

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions