Skip to content

Incorporate CoreFoundation ideas from other crates #692

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
23 tasks done
madsmtm opened this issue Jan 9, 2025 · 1 comment
Closed
23 tasks done

Incorporate CoreFoundation ideas from other crates #692

madsmtm opened this issue Jan 9, 2025 · 1 comment
Labels
A-framework Affects the framework crates and the translator for them enhancement New feature or request

Comments

@madsmtm
Copy link
Owner

madsmtm commented Jan 9, 2025

Go through the implementations in the following projects, and grab relevant ideas that objc2-core-foundation could use:

A few things I've identified already:

@madsmtm madsmtm added enhancement New feature or request A-framework Affects the framework crates and the translator for them labels Jan 9, 2025
madsmtm added a commit that referenced this issue Jan 10, 2025
madsmtm added a commit that referenced this issue Jan 11, 2025
madsmtm added a commit that referenced this issue Jan 11, 2025
Important for usability of CFUUID.

Part of #692.
madsmtm added a commit that referenced this issue Jan 11, 2025
@madsmtm madsmtm pinned this issue Jan 25, 2025
madsmtm added a commit that referenced this issue Mar 20, 2025
madsmtm added a commit that referenced this issue Mar 21, 2025
madsmtm added a commit that referenced this issue Mar 21, 2025
madsmtm added a commit that referenced this issue Apr 16, 2025
Add conversion methods to/from Path/PathBuf, which assumes the path is a
file:// URL. I've included quite a few tests and documentation here,
since the behavior is fairly surprising when it comes to non-unicode
paths, see Byron/trash-rs#124.

I've also added conversion to/from `CFString` which (somewhat) parses
the URL, for convenience and for easier testing.

The naming for these methods mirror those of `url::Url`:
https://docs.rs/url/2.5.4/url/struct.Url.html

Part of #692.
@madsmtm
Copy link
Owner Author

madsmtm commented Apr 16, 2025

I've finished the parts of this that I felt were important. A few things are not carried over from core-foundation, either because I didn't like the implementation (CFAllocator + CFData stuff), because it did multiple things that I'm unsure objc2 should handle (an example from io-surface is IOSurface::upload) or because it's tracked in a dedicated issue.

Most notable difference is probably that simple wrapper methods over the CF API are kept as stand-alone functions (for now, see #736).

See also #719.

@madsmtm madsmtm closed this as completed Apr 16, 2025
@madsmtm madsmtm unpinned this issue Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-framework Affects the framework crates and the translator for them enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant