Skip to content
This repository has been archived by the owner on Mar 7, 2021. It is now read-only.

make C strings a little more ergonomic #16

Closed
geofft opened this issue May 26, 2018 · 0 comments · Fixed by #133
Closed

make C strings a little more ergonomic #16

geofft opened this issue May 26, 2018 · 0 comments · Fixed by #133

Comments

@geofft
Copy link
Collaborator

geofft commented May 26, 2018

  1. See if we can get std::ffi::CString and std::ffi:CStr to work; they're actually in libstd, but I think CString only uses alloc/containers and CStr doesn't even need that. (And decide if we want it?)
  2. Find something better than b"foo\0" for compiile-time static C strings. Options include https://github.com/mzabaluev/rust-c-str and https://github.com/abonander/const-cstr (both of which use std::ffi::CStr) or just coding it ourselves as suggested in Consider adding CString/*const i8 literals rust-lang/rfcs#400 (comment) . If we write it ourselves I might argue for calling it c! to keep it easy to read/write.
geofft added a commit that referenced this issue May 6, 2019
@alex alex closed this as completed in #133 Aug 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant