Introduction
1.
Building
1.1.
Xcode + Cargo
1.2.
swiftc + Cargo
1.3.
Swift Packages
2.
The Bridge Module
2.1.
Functions
2.2.
Opaque Types
2.3.
Transparent Types
2.3.1.
Transparent Structs
2.3.2.
Transparent Enums
2.4.
Generics
2.5.
Conditional Compilation
2.6.
Why a Bridge Module
3.
Built In Types
3.1.
String <---> String
3.2.
&str <---> RustStr
3.3.
Vec <---> RustVec
3.4.
Option <---> Optional
3.5.
Result<T, E> <---> RustResult<T, E>
3.6.
Box<dyn FnOnce(A, B) -> C>
3.7.
(A, B, C, ...) <---> (A, B, C, ...)
4.
Safety
5.
Contributing to swift-bridge
5.1.
Internal Design
5.1.1.
Code Generation
5.2.
Adding support for a signature
5.3.
Adding compile time errors
Light (default)
Rust
Coal
Navy
Ayu
The swift-bridge Book
Design of
swift-bridge
This chapter explores how
swift-bridge
works internally.