Skip to content

Commit 9387d35

Browse files
committed
Mention "extern types" on the opaque structs section
1 parent 55de6fa commit 9387d35

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/ffi.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -705,8 +705,14 @@ for more information.
705705
# Representing opaque structs
706706

707707
Sometimes, a C library wants to provide a pointer to something, but not let you
708-
know the internal details of the thing it wants. The simplest way is to use a
709-
`void *` argument:
708+
know the internal details of the thing it wants. The simplest way is to use "extern types".
709+
But it's currently (as of June 2021) unstable and has some unresolved questions,
710+
see the [RFC page][extern-type-rfc] and the [tracking issue][extern-type-issue] for more details.
711+
712+
[extern-type-issue]: https://github.com/rust-lang/rust/issues/43467
713+
[extern-type-rfc]: https://rust-lang.github.io/rfcs/1861-extern-types.html
714+
715+
Alternatively, we can use a `void *` argument:
710716

711717
```c
712718
void foo(void *arg);

0 commit comments

Comments
 (0)