Skip to content

add ffi around rust url crate, with implicit sharing#48377

Open
jkarneges wants to merge 1 commit into
mainfrom
jkarneges/url-ffi
Open

add ffi around rust url crate, with implicit sharing#48377
jkarneges wants to merge 1 commit into
mainfrom
jkarneges/url-ffi

Conversation

@jkarneges

Copy link
Copy Markdown
Member

This adds an FFI around the url crate, as the basis for a QUrl replacement.

Notably, QUrl is an implicitly shared type. To support similar behavior here, the data is wrapped in Arc, and Arc::make_mut is used for copy-on-write operations.

There is also one limitation: the Rust Url type does not support relative URLs, whereas QUrl does. Since there are only a few places in the C++ code where we need relative URLs, and those URLs are always resolved against an absolute base URL before being used for anything, my plan is for the C++ code to simply store relative URLs in string types.

@jkarneges jkarneges force-pushed the jkarneges/url-ffi branch from 2f2280c to 4a564cd Compare June 25, 2026 15:29
@jkarneges jkarneges force-pushed the jkarneges/url-ffi branch from 4a564cd to 48c6bd1 Compare July 2, 2026 23:57
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