A few days ago I submitted a pull request to convert str::as_c_str() from a
function into a method on strings:

https://github.com/mozilla/rust/pull/6729

And today in IRC there was a discussion regarding the fact that Rust's
strings are null-terminated:

https://botbot.me/mozilla/rust/msg/3466672/

The impression that I'm getting from each is that this aspect of Rust's C
interop appears to have no concrete design, so I figured I'd bring this up
on the mailing list.

Some questions I'd like to definitively answer:

1) What should the API look like for providing strings to C code?

2) Should Rust continue to null-terminate all strings for the sake of C
compatibility?
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to