1\documentclass{standalone} 2\usepackage{makecell} 3\usepackage{pgfplots} 4\usepackage{sansmath} 5\usetikzlibrary{arrows.meta} 6\pgfplotsset{compat=1.16} 7\begin{document} 8\pagecolor{white} 9\begin{tikzpicture}[ 10 x=1cm, 11 y=-.6cm, 12 every node/.append style={ 13 line width=1.5pt, 14 font=\Large\sansmath\sffamily, 15 }, 16 every path/.append style={ 17 >={Latex[length=10pt,width=8pt]}, 18 line width=1.5pt, 19 }, 20 execute at end node={\vphantom{bg}}, 21] 22\node[draw, rounded corners=5, inner xsep=30pt, inner ysep=2pt] 23 (bridge) at (0, .25) {\makecell{\texttt{\#\hspace{-1pt}[}cxx::bridge\texttt{]} mod\\[-4pt]description of boundary}}; 24\node[draw, rounded corners, inner xsep=10pt, inner ysep=6pt, text depth=1pt] 25 (rust-bindings) at (-3.5, 6.5) {Rust bindings}; 26\node[draw, rounded corners, inner xsep=10pt, inner ysep=6pt, text depth=1pt] 27 (cpp-bindings) at (3.5, 6.5) {C\texttt{++} bindings}; 28\node[inner xsep=4pt, inner ysep=-0pt] 29 (rust-code) at (-9, 6.5) {\makecell[r]{\\[-8pt]Rust\\[-4pt]code}}; 30\node[inner xsep=4pt, inner ysep=-0pt] 31 (cpp-code) at (9, 6.5) {\makecell[l]{\\[-8pt]C\texttt{++}\\[-4pt]code}}; 32\draw (bridge) -- (0, 4); 33\draw[<->] (rust-bindings) |- (0, 4) -| (cpp-bindings); 34\draw[<->] (rust-code) -- (rust-bindings); 35\draw[<->, dash pattern=on 8pt off 6pt] (rust-bindings) -- (cpp-bindings); 36\draw[<->] (cpp-bindings) -- (cpp-code); 37\draw (-.75, 4) node[anchor=south east] {Macro expansion}; 38\draw (.75, 4) node[anchor=south west] {Code generation}; 39\draw (0, 6.5) node[anchor=south, inner ysep=4pt] {Hidden C ABI}; 40\draw (-6.75, 6.5) node[anchor=south, inner ysep=1pt] {\makecell{Safe\\[-4pt]straightforward\\[-4pt]Rust APIs}}; 41\draw (6.75, 6.5) node[anchor=south, inner ysep=1pt] {\makecell{Straightforward\\[-4pt]C\texttt{++} APIs}}; 42\pgfresetboundingbox\path 43 (-9.5, 0) -- (rust-bindings.south)+(0, .3) -- (9.5, 0) -- (bridge.north); 44\end{tikzpicture} 45\end{document} 46