All Projects → Michael-F-Bryan → Rust Ffi Guide

Michael-F-Bryan / Rust Ffi Guide

Licence: cc0-1.0
A guide for doing FFI using Rust

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Rust Ffi Guide

Learning Cmake
learning cmake
Stars: ✭ 2,524 (+1119.32%)
Mutual labels:  tutorial
Bayesian Modelling In Python
A python tutorial on bayesian modeling techniques (PyMC3)
Stars: ✭ 2,332 (+1026.57%)
Mutual labels:  tutorial
Reactify Django
Integrate React & Django
Stars: ✭ 205 (-0.97%)
Mutual labels:  tutorial
How To Play Ctf
CTF入門建議
Stars: ✭ 201 (-2.9%)
Mutual labels:  tutorial
Nodejs Auth
Implementation of node.js authentication with social login ✌️, user impersonation 💅, and no passport.js required 💁
Stars: ✭ 201 (-2.9%)
Mutual labels:  tutorial
Improved Body Parts
Simple Pose: Rethinking and Improving a Bottom-up Approach for Multi-Person Pose Estimation
Stars: ✭ 202 (-2.42%)
Mutual labels:  tutorial
How To Write An Llvm Register Allocator
This repository contains a tutorial for a quick start in how to write a register allocator using LLVM
Stars: ✭ 197 (-4.83%)
Mutual labels:  tutorial
Thymeleaf Tutorial
Thymeleaf Tutorial.
Stars: ✭ 206 (-0.48%)
Mutual labels:  tutorial
Deeplearningtutorial
李宏毅,一天搞懂深度学习,中文翻译
Stars: ✭ 202 (-2.42%)
Mutual labels:  tutorial
Probmods2
probmods 2: electric boogaloo
Stars: ✭ 204 (-1.45%)
Mutual labels:  tutorial
React Ui Library Tutorial
📚React组件库搭建指南
Stars: ✭ 201 (-2.9%)
Mutual labels:  tutorial
Cs Univ Wiki
컴공생을 위한 대학 생활 가이드라인
Stars: ✭ 202 (-2.42%)
Mutual labels:  tutorial
Emacs Module Rs
Rust binding and tools for emacs-module (Emacs's dynamic module support)
Stars: ✭ 203 (-1.93%)
Mutual labels:  ffi
Lwjgl3 Tutorial
Tutorial for the Lightweight Java Game Library (LWJGL) 3
Stars: ✭ 199 (-3.86%)
Mutual labels:  tutorial
Pyqt5 Chinese Tutorial
PyQt5中文教程
Stars: ✭ 2,574 (+1143.48%)
Mutual labels:  tutorial
Web Push Book
Web Push Book
Stars: ✭ 199 (-3.86%)
Mutual labels:  tutorial
Opencv Python Tutorial
OpenCV问答群不再维护。有问题,自己去搜索。Google能找到大部分答案。
Stars: ✭ 2,603 (+1157.49%)
Mutual labels:  tutorial
Jenkins Ue4
Automated Unreal Engine 4 Project Builds
Stars: ✭ 206 (-0.48%)
Mutual labels:  tutorial
Rl Tutorial Jnrr19
Stable-Baselines tutorial for Journées Nationales de la Recherche en Robotique 2019
Stars: ✭ 204 (-1.45%)
Mutual labels:  tutorial
Tsne Umap Embedding Visualisation
A Simple and easy to use way to Visualise Embeddings!
Stars: ✭ 203 (-1.93%)
Mutual labels:  tutorial

Using unsafe for Fun and Profit

Build Status Creative Commons Zero License

A guide to traversing the FFI boundary between Rust and other languages. A rendered version is available here. This guide is centred around the idea of building a REST client using Qt (C++) for the GUI and reqwest (Rust) for the business logic.

Building

Building and viewing the book locally is really easy. First you need to get the source code:

$ git clone https://github.com/Michael-F-Bryan/rust-ffi-guide

Make sure you have mdbook installed:

$ cargo install mdbook

Then tell mdbook to build and serve the book:

$ mdbook serve --open

It should now be viewable at http://localhost:3000/ (if it didn't open up automatically).

To build the application itself you'll need the following installed:

  • qt5
  • rust (install with rustup)
  • mdbook (cargo install mdbook)

In this application we're using cmake as the build system. The ci/test.sh script will make a build/ directory and invoke cmake to compile and test everything.

$ ./ci/test.sh

The final application should now be at build/gui.

Alternatively, if you don't want to install all the dependencies I've created a docker image (michaelfbryan/ffi-guide) for compiling Rust and Qt.

$ docker run \
    -v $(pwd):/code \
    -v ~/.cargo:$HOME/.cargo \
    -e CARGO_HOME=$HOME/.cargo \
    --user $UID \
    michaelfbryan/ffi-guide ci/test.sh

Contributing

If there's anything you feel is missing or could be improved, please create an issue. Pull requests are welcome too!

Contributors

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].