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

What's the status of this proposal? #1

Closed
lambda-fairy opened this issue Mar 28, 2019 · 1 comment
Closed

What's the status of this proposal? #1

lambda-fairy opened this issue Mar 28, 2019 · 1 comment

Comments

@lambda-fairy
Copy link

I was researching CStr and ended up here. It looks pretty fleshed out to me, so I'm wondering what is happening with it now 🙂

@kennytm
Copy link
Owner

kennytm commented Mar 28, 2019

Well the problem is we can't have a proper size_of_val of an extern type (rust-lang/rust#49708, rust-lang/rust#43467), and because size_of_val of an extern type doesn't behave correctly when treated as a CStr, a Box<CStr> will not work either (size_of_val returning 0 means freeing the box will leak the string, aborting means... aborting).

We'll need proper custom DST support unfortunately. rust-lang/rfcs#2580 and rust-lang/rfcs#2594 are the first steps.

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

No branches or pull requests

2 participants