From c7ffc50e123a61907a1fa28c4af0e2d8a854a43e Mon Sep 17 00:00:00 2001 From: Googler Date: Thu, 26 Mar 2026 14:58:09 -0700 Subject: [PATCH] Test Co supporting non-default CrubitAbi bridge types PiperOrigin-RevId: 890063840 --- rs_bindings_from_cc/generate_bindings/lib.rs | 23 +++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/rs_bindings_from_cc/generate_bindings/lib.rs b/rs_bindings_from_cc/generate_bindings/lib.rs index b0d78f55b..ea56e6979 100644 --- a/rs_bindings_from_cc/generate_bindings/lib.rs +++ b/rs_bindings_from_cc/generate_bindings/lib.rs @@ -1178,9 +1178,26 @@ fn crubit_abi_type(db: &BindingsGenerator, rs_type_kind: RsTypeKind) -> Result { + quote! { + &::c9::internal::rust::StartCoroutineFromRust + } + } + Some(result_type_crubit_abi_type) => { + let abi_expr_tokens = + CrubitAbiTypeToCppExprTokens(result_type_crubit_abi_type); + + quote! { + &::c9::internal::rust::StartCoroutineFromRust<[]() { return #abi_expr_tokens; }> + } + } + }; + quote! { + #cpp_type_tokens(#start_coroutine_fn_tokens) + } + }; Ok(CrubitAbiType::C9Co { rust_type_tokens,