C++ Logo

std-proposals

Advanced search

[std-proposals] [[=std::interop]] An Annotation for Interoperation with Targets

From: A Johnston <ajohnston54637_at_[hidden]>
Date: Tue, 10 Nov 2026 23:39:51 -0700
Hello,

This is a first draft of a proposal for [[=std::interop]], a standard
annotation marking a declaration for exposure to a foreign execution
environment. There is an optional facility to build up lists of
targets. E.g. [[=std::interop("Python", "Rust")]].

It is intended for use by binding generation tools, and there is a
reference code generator with bindings generated from C++ in plain C,
JavaScript (ECMAScript in the proposal), Python and Rust. The code
generator is just example code, but the outputs would be worth looking
at if you are curious about language bindings.

I have not inquired about a proposal number, and am looking for early
feedback on the proposal.pdf first.

The proposal.pdf is here:
https://whatchamacallem.github.io/std_interop/proposal.pdf

And the website with the source code, generated code and tests is
here: https://whatchamacallem.github.io/std_interop/index.html


Regards,

Adrian

Received on 2026-11-11 06:40:17