diff --git a/docs/gsoc/Dart-GSoC-2026-Project-Ideas.md b/docs/gsoc/Dart-GSoC-2026-Project-Ideas.md index c86565918f9..38e6bfccd67 100644 --- a/docs/gsoc/Dart-GSoC-2026-Project-Ideas.md +++ b/docs/gsoc/Dart-GSoC-2026-Project-Ideas.md @@ -106,12 +106,12 @@ developers to inspect the contents of `Pointer`s safely during debugging. C++ doesn't have a stable ABI (for example, it varies by compiler), so we can't directly interop with it. However, it would be possible to parse a C++ API, code-gen C compatible bindings for the API (using `extern "C"`), then generate Dart bindings that look like the C++ API, but actually invoke the C glue code. -The goal of this project is to add C++ as a new experimental language in FFIgen. FFIgen already uses libclang to parse C/ObjC APIs, so the parsing logic just needs to be extended to parse C++ APIs. Then the AST needs to be extended to be able to represent C++ language features. Finally, the code generator needs to be extended to support generating C code to wrap the C++ API, and Dart code to interact with the C API. +``` +Input Output Output +C++ API <-> C glue code <-> Dart bindings +``` -``` -Input Output Output -C++ API \<-\> C glue code \<-\> Dart bindings -``` +The goal of this project is to add C++ as a new experimental language in FFIgen. FFIgen already uses libclang to parse C/ObjC APIs, so the parsing logic just needs to be extended to parse C++ APIs. Then the AST needs to be extended to be able to represent C++ language features. Finally, the code generator needs to be extended to support generating C code to wrap the C++ API, and Dart code to interact with the C API. A good proposal for this project will explore the various language features of C++, describe how that feature can be most closely represented in Dart, and what the C glue code looks like to support that feature. The more language features we can translate, the better the final product will be.