Skip to content

Small wrapper to generate rust bindings for Open Network Linux API (DEB 9)

Notifications You must be signed in to change notification settings

audreyadora/onl-api-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ONL API RS Bindgen

Small wrapper to generate rust bindings for Open Network Linux API (DEB 9)

For use with building custom Open Networking Switch platform

Reference:

Refer to API docs at: https://www.opennetlinux.org/

Configuring ONL:

  • Install ONL on ONIE capable network switch or VM, use INSTALLED vers. instead of SWI to avoid running on overlay
  • Update the /etc/apt/sources.list.d/multistrap-debian.list with the archive version for Stretch: https://debiansupport.com/mirrors/
  deb http://archive.debian.org/debian/ stretch main contrib non-free
  deb http://archive.debian.org/debian/ stretch-proposed-updates main contrib non-free
  deb http://archive.debian.org/debian-security stretch/updates main contrib non-free
  • Install apt-transport-https and update apt
  • Install git
  • rs-bindgen requires clang 5.0+. I used this script to update to clang/LLVM 8 before building with cargo. You might need to edit script with --allow-unauthenticated flags to get it to install

Building:

  • SSH & clone to a target user directory, all needed header folders are in /include
  • Run cargo build

Output:

Script will output onl_api.rs in /bindings folder

About

Small wrapper to generate rust bindings for Open Network Linux API (DEB 9)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published