Skip to content

Commit 143753a

Browse files
committed
Link to ExternType docs from crate docs
1 parent fb0ba25 commit 143753a

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

src/extern_type.rs

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
/// #\[cxx::bridge\] invocations, both for shared types defined in another bridge and external C++
55
/// definitions. This serves multiple related purposes.
66
///
7-
/// TODO: These docs aren't discoverable. Add a link to here from the main crate docs.
8-
///
97
/// <br>
108
///
119
/// ## Safely unifying occurrences of the same extern C++ type

src/lib.rs

+15
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,21 @@
346346
//! <tr><td><sup><i>tbd</i></sup></td><td>std::shared_ptr&lt;T&gt;</td></tr>
347347
//! </table>
348348
//!
349+
//! <br>
350+
//!
351+
//! # Working with multiple bridge modules
352+
//!
353+
//! Multiple cxx::bridge modules can coexist in the same project. There are multiple reasons for
354+
//! wanting to do so, such as for code organization reasons or to share a common library of FFI
355+
//! types across many different bridges. Type aliases can be used inside the cxx::bridge to safely
356+
//! unify the same opaque C++ type across multiple bridges or to reuse a shared type declared in
357+
//! another bridge.
358+
//
359+
//! See the [documentation for the ExternType trait](trait.ExternType.html) for more information
360+
//! and examples.
361+
//!
362+
//!
363+
//! [ExternType trait]: trait.ExternType.html
349364
//! [https://github.com/dtolnay/cxx]: https://github.com/dtolnay/cxx
350365
351366
#![no_std]

0 commit comments

Comments
 (0)