Skip to content

macOS: Use CFUUID instead of the uuid crate for a random class name#243

Merged
prokopyl merged 2 commits into
masterfrom
macos-uuid
May 14, 2026
Merged

macOS: Use CFUUID instead of the uuid crate for a random class name#243
prokopyl merged 2 commits into
masterfrom
macos-uuid

Conversation

@prokopyl
Copy link
Copy Markdown
Member

This PR replaces the use of the uuid crate with the Core Foundation CFUUID API, when creating a random class name for our NSView class.

This allows us to drop the uuid dependency (at least on macOS), while keeping the same functionality.

Note that the CFUUID APIs currently generate a UUIDv4, which is equivalent to our current implementation.

However, even if that were to change, any UUID version (time-based, random-based, or any mix of both) works for our use-case of avoiding runtime namespace collisions between plugins and the host.

This use-case actually being what the CFUUID API is built for, this will still work long-term.

@prokopyl prokopyl merged commit 7f4cdf8 into master May 14, 2026
6 checks passed
@prokopyl prokopyl deleted the macos-uuid branch May 14, 2026 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant