The (unofficial) Rust FFI Guide

Given Rust's popularity and position as a systems programming language,
you'll probably reach a point where you want to integrate a Rust module into
some existing application. This guide was created to fill the current gap in
knowledge when it comes to doing more in-depth FFI tasks than simply calling
one or two functions from a C library.

This guide is written from the perspective of someone implementing a simple REST
client. The client lets you craft custom HTTP messages and send them to some
server, allowing you to inspect the response. It is composed of a Qt GUI which
calls out to a Rust library for all of the business logic.

We'll be using cmake as the host build system, deferring to cargo to
manage and compile the Rust components. The guide was originally written on a
linux machine, but there is no reason why it shouldn't work on Windows or Mac,
possibly with a couple small platform-specific tweaks (filenames, etc.).