<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/zngur-vs-cxx-comparing-rust-and-c-interoperability-libraries-s8cwofydl" -->

---
title: Zngur vs CXX: Comparing Rust and C++ Interoperability...
description: A detailed technical comparison of two Rust/C++ interoperability libraries, Zngur and CXX. CXX is described as the mature, widely adopted, safety-focused...
canonical: https://daily.dev/posts/zngur-vs-cxx-comparing-rust-and-c-interoperability-libraries-s8cwofydl
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Zngur vs CXX: Comparing Rust and C++ Interoperability Libraries | daily.dev
og:description: A detailed technical comparison of two Rust/C++ interoperability libraries, Zngur and CXX. CXX is described as the mature, widely adopted, safety-focused...
og:url: https://daily.dev/posts/zngur-vs-cxx-comparing-rust-and-c-interoperability-libraries-s8cwofydl
og:image: https://api.daily.dev/og/posts/s8cwoFYdL.png
og:image:alt: Zngur vs CXX: Comparing Rust and C++ Interoperability Libraries
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Zngur vs CXX: Comparing Rust and C++ Interoperability Libraries

**[KDAB Blog](https://daily.dev/sources/kdab)** · 9 min read · 0 upvotes · 0 comments

## Summary

A detailed technical comparison of two Rust/C++ interoperability libraries, Zngur and CXX. CXX is described as the mature, widely adopted, safety-focused option with a smaller feature set, no runtime overhead, strong async support (via workarounds and the cxx-async crate), and adoption in projects like Chromium and Android. Zngur is positioned as an emerging, more permissive library that supports arbitrary container types, tagged-union enums, and trait implementation across the FFI boundary, at the cost of some safety guarantees (no Send/Sync checks) and lacking async support. The piece walks through code examples covering containers, enums, traits, threading, and build tooling for both libraries.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.kdab.com/weighing-up-zngur-and-cxx-for-rustc-interop>

## Questions this post answers

### What is the main tradeoff between Zngur and CXX for Rust and C++ interop?

Zngur supports a broader subset of Rust semantics, such as arbitrary containers, tagged-union enums, and trait implementations across the FFI boundary, but sacrifices some safety and ergonomics, notably lacking Send/Sync checks. CXX takes the opposite approach, offering a reduced but safer feature set with no runtime overhead, better documentation, and wider adoption in projects like Chromium and Android.

_Comparing Rust and C++ interop tradeoffs like these is easier with daily.dev's technical deep dives._

### Does CXX support async Rust functions across the FFI boundary with C++?

Async support in CXX is planned but not yet native; currently a workaround uses a newtype struct wrapping a oneshot channel from the futures crate to call async functions. The cxx-async crate adds more established support for async tasks and can be a robust addition if async is required. Zngur, by contrast, has no async support and no documented plan or workaround for implementing it.

_Developers weighing async FFI options can track Rust ecosystem tooling changes on daily.dev._

### How does Zngur handle nested containers like Vec<Vec<T>> across the Rust/C++ boundary?

Zngur supports nested containers such as Vec<Vec<i32>> with almost full API access, but each concrete type must be manually declared in an IDL file, including base types like String, and every standard library method needed must be specified per type. This gives first-class support at the cost of large, repetitive interface files, whereas CXX handles common containers automatically but requires the newtype pattern for more complex or nested types.

_daily.dev helps developers compare FFI container support before committing to a Rust interop library._

## Similar posts on daily.dev

- [Rust/C\+\+ Interop Initiative: Progress Update, September 2026](https://daily.dev/posts/rust-c-interop-initiative-progress-update-september-2026-j7c1j8xac) · Rust Foundation · 1 upvotes · 0 comments

---

Tags: [#rust](https://daily.dev/tags/rust), [#c++](https://daily.dev/tags/c++)

[View this post on daily.dev](https://daily.dev/posts/zngur-vs-cxx-comparing-rust-and-c-interoperability-libraries-s8cwofydl)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Zngur vs CXX: Comparing Rust and C++ Interoperability Libraries","url":"https://daily.dev/posts/zngur-vs-cxx-comparing-rust-and-c-interoperability-libraries-s8cwofydl","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/zngur-vs-cxx-comparing-rust-and-c-interoperability-libraries-s8cwofydl"},"datePublished":"2026-08-31T05:54:37.849Z","dateModified":"2026-08-31T05:55:50.846Z","description":"A detailed technical comparison of two Rust/C++ interoperability libraries, Zngur and CXX. CXX is described as the mature, widely adopted, safety-focused...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/ac12753a325b2071f8ebc91c5c5abe95?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/ac12753a325b2071f8ebc91c5c5abe95?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"KDAB Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"KDAB Blog","logo":"https://media.daily.dev/image/upload/s--A2C_z6sr--/f_auto,q_auto/v1788155671/logos/kdab?_a=BAMAMicg0","url":"https://daily.dev/sources/kdab"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/zngur-vs-cxx-comparing-rust-and-c-interoperability-libraries-s8cwofydl","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"rust,c++","timeRequired":"PT9M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"KDAB Blog","item":"https://daily.dev/sources/kdab"},{"@type":"ListItem","position":3,"name":"Zngur vs CXX: Comparing Rust and C++ Interoperability Libraries"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/zngur-vs-cxx-comparing-rust-and-c-interoperability-libraries-s8cwofydl#faq","mainEntity":[{"@type":"Question","name":"What is the main tradeoff between Zngur and CXX for Rust and C++ interop?","acceptedAnswer":{"@type":"Answer","text":"Zngur supports a broader subset of Rust semantics, such as arbitrary containers, tagged-union enums, and trait implementations across the FFI boundary, but sacrifices some safety and ergonomics, notably lacking Send/Sync checks. CXX takes the opposite approach, offering a reduced but safer feature set with no runtime overhead, better documentation, and wider adoption in projects like Chromium and Android. Comparing Rust and C++ interop tradeoffs like these is easier with daily.dev's technical deep dives."}},{"@type":"Question","name":"Does CXX support async Rust functions across the FFI boundary with C++?","acceptedAnswer":{"@type":"Answer","text":"Async support in CXX is planned but not yet native; currently a workaround uses a newtype struct wrapping a oneshot channel from the futures crate to call async functions. The cxx-async crate adds more established support for async tasks and can be a robust addition if async is required. Zngur, by contrast, has no async support and no documented plan or workaround for implementing it. Developers weighing async FFI options can track Rust ecosystem tooling changes on daily.dev."}},{"@type":"Question","name":"How does Zngur handle nested containers like Vec<Vec<T>> across the Rust/C++ boundary?","acceptedAnswer":{"@type":"Answer","text":"Zngur supports nested containers such as Vec<Vec<i32>> with almost full API access, but each concrete type must be manually declared in an IDL file, including base types like String, and every standard library method needed must be specified per type. This gives first-class support at the cost of large, repetitive interface files, whereas CXX handles common containers automatically but requires the newtype pattern for more complex or nested types. daily.dev helps developers compare FFI container support before committing to a Rust interop library."}}]}
```

