Skip to content
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

Document Swift String copying #318

Merged
merged 1 commit into from
Feb 6, 2025

Conversation

chinedufn
Copy link
Owner

This commit adds documentation explaining that there is is no zero-copy
way to create a Swift String.

We also add documentation explaining that the reason the RustString
type exists is to avoid the implicit allocation that would be required
if we automatically converted Rust's std::string::String to Swift's
String.

We also document some potential new attributes that would allow users to
opt into automatically converted from a Rust std::string::String to a
Swift String.

This commit adds documentation explaining that there is is no zero-copy
way to create a Swift `String`.

We also add documentation explaining that the reason the `RustString`
type exists is to avoid the implicit allocation that would be required
if we automatically converted Rust's `std::string::String` to Swift's
`String`.

We also document some potential new attributes that would allow users to
opt into automatically converted from a `Rust std::string::String` to a
Swift String.
@chinedufn chinedufn merged commit 864cb4e into master Feb 6, 2025
5 checks passed
@chinedufn chinedufn deleted the document-impossible-zero-copy-swift-string branch February 6, 2025 14:05
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