Skip to content

Sample implementation of *-sys crate wrapping a basic C lib

Notifications You must be signed in to change notification settings

CrabeDeFrance/sample-c-lib-ffi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sample-c-lib-ffi

This repositoring contains a sample implementation of a C library and multiple crates to explain how to build ffi crates over a simple C library.

Content of this repository :

  • mytestlib-c : code of a C library (generating a dynamic library libmytestlib.so)
  • mytestlib-sys : ffi bindings (generated with bindgen)
  • mytestlib : safe bindings for mytestlib-sys
  • mytestapp : rust application using mytestlib crate

How to use :

Simply run the script run.sh

Requirements

cmake & gcc && cargo

About

Sample implementation of *-sys crate wrapping a basic C lib

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published