Skip to content

Document ABI guarantees #307

Description

@m-mueller678

The current implementation of ArrayVec uses repr(C), which allows passing it between separately compiled rust programs. This is nice. It would be great to have documentation on which parts of the ArrayVec ABI are considered stable and which are considered to be implementation details. Specifically, I care about these questions:

  • Will future versions of ArrayVec<T> have the same data layout as the same future version of ArrayVec<T> compiled separately?
  • Will future versions of ArrayVec<T> have the same data layout as the current version of ArrayVec<T>?
  • Do ArrayVec<T> and ArrayVec<U> have compatible layouts if T and U are compatible? e. g. can I transmute ArrayVec<u32> to ArrayVec<UnsafeCell<u32>>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions