Skip to content

Tracking issue for RFC 2137: Support defining C-compatible variadic functions in Rust  #44930

Open
@aturon

Description

@aturon

This is a tracking issue for the RFC "Support defining C-compatible variadic functions in Rust" (rust-lang/rfcs#2137).

Steps:

Unresolved questions:

  • "When implementing this feature, we will need to determine whether the compiler
    can provide an appropriate lifetime that prevents a VaList from outliving its
    corresponding variadic function."
  • Continuing bikeshed on the ... syntax.
  • Ensure that even when this gets stabilized for regular functions, it is still rejected on const fn.
  • What even is the semantics of this? What exactly is allowed and disallowed? Would be good to have a Miri implementation.
  • borrowck problems: Poor interaction between NLL-borrowck, async, and c_variadic's ... desugaring (VaListImpl<'_>) #125431
  • What exactly are the ABI requirements around variadic calls? What are the ABI compatibility rules? Do we have to be concerned about LLVM target features affecting variadic ABI?
  • Soundness bug: Varargs are completely unchecked if passed as generics #61275

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-FFIArea: Foreign function interface (FFI)B-RFC-approvedBlocker: Approved by a merged RFC but not yet implemented.B-unstableBlocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCF-c_variadic`#![feature(c_variadic)]`S-tracking-ready-to-stabilizeStatus: This is ready to stabilize; it may need a stabilization report and a PRT-langRelevant to the language team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions