From 2076ac5df015b4929317f7a99f1d5430943f8a7c Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Sun, 8 Feb 2026 22:57:01 -0800 Subject: [PATCH] [docs] Clean up GSoC CppGen proposal Move the flow chart to a more related place in the text, and remove spurious backslashes. Change-Id: Ifdfb15d185841da7b4b84b555f867cdc74e0d41a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/479200 Auto-Submit: Liam Appelbe Reviewed-by: Daco Harkes Commit-Queue: Daco Harkes --- docs/gsoc/Dart-GSoC-2026-Project-Ideas.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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.