Skip to content

A design pattern for shared library loading in Rust with versioned vtables and owned symbols

License

Notifications You must be signed in to change notification settings

kmdouglass/rust-libloading-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repository contains an example design pattern for interfacing with C-language plugins through Rust. It works on UNIX-based systems only.

For an explanation of the code, see the corresponding blog post at http://kmdouglass.github.io/posts/a-simple-plugin-interface-for-the-rust-ffi/

Instructions

First, from the root of this repository, build the example C library:

$ cd ffi-test
$ make

Next, build the Rust binary and run it:

$ cd ..
$ cargo build
$ cargo run

Commit history

The commit history contains earlier attempts at creating this design. Some of these attempts will not compile.

About

A design pattern for shared library loading in Rust with versioned vtables and owned symbols

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published