Skip to content

Interface to libafb for writing bindings in Rust language.

Notifications You must be signed in to change notification settings

redpesk-common/afb-librust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Exposes afb-libafb to rust language

This module permit to develop afb-binding that are fully compatible with C/C++ ones.

Afb-librust provides a rust native safe api to full libafb binding functionalities.

Rust binding architecture

For more information about installation, run and test, click on the following links:

request.get_session() // return une session init a zero request.drop_session() // delete l'object session

Compilation bugs

Something cargo complains about stddef.h which is own by kernel-headers

  • install kernel-headers
  • install clang

Tests

It is possible to run tests on this library by calling the following script.

./afb-tests/etc/binding-test.sh

Coverage

In order to get the coverage of the tests, firstly you need to install additional tools. This can be done by running the commands here below.

# Install rust compatible llvm tools
rustup component add llvm-tools-preview

# Install grcov
cargo install grcov

Once the tools are all set-up you can call the test script with the coverage option.

./afb-tests/etc/binding-test.sh

At the end, the entry point of html coverage report is: target/debug/coverage/index.html.

About

Interface to libafb for writing bindings in Rust language.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages