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

make C strings a little more ergonomic #16

@geofft

Description

@geofft
  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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions