Skip to content

totechite/rust-snappy-ffi-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rust-snappy-example

It's program that bind to Snappy implemented by Rust language.
Reference to chapter of FFI in The Rust Programming Language(TRPL).

Usage

1. Install Snappy

Linux

  • ubuntu
sudo apt install libsnappy-dev

Other Linux distributions can be like this.

Windows

  • install Vcpkg

  • Open PowerShell and execute vcpkg install snappy:x64-windows or vcpkg install snappy:x86-windows.

  • Edit build.rs. Rewrite <path_to_vcpkg> to your Path of Vcpkg.

2. Execute

cargo run

Please reference to https://doc.rust-lang.org/nomicon/ffi.html.

LICENSE

MIT

About

It's a exercise project for binding to C Library implemented by Rust language.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages