Skip to content

Create layout-compatible standard lib types in Rust and C++ #67

Description

@teor2345

Using layout-compatible types means simple fields can be access directly from a foreign language, improving performance.

C++ Language or Library Changes

Add a function to get the allocation metadata given a new’d pointer, like I can get from delete.
This is useful for custom allocators.

Existing Work

Crubit currently does this for:

  • C++ (string_view, span, optional, vector, unique_ptr, shared_ptr)
  • Rust (everything non-generic type plus Option + Result + slices)

Metadata

Metadata

Assignees

No one assigned

    Labels

    l-c++Changes that are mainly in C++ (or C)p-performancePerformance-related problems or use casesp-semanticsLanguage semantics differencessolved-crubitSolved by Crubitsolved-cxxSolved by cxx (interop tool)t-use-caseA Rust/C++ interop usage example

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions