Rust Abieos
API Documentation
rs_abieos
is a Rust library that provides a wrapper for the abieos
C++ library. It allows you to handle data from
Antelope blockchains by providing functionalities such as converting between binary and JSON formats for ABI files,
converting between native and string names, and more.
This wrapper is currently based on the vanilla version of the AntelopeIO/abieos
Test cases are being completely rewritten in Rust. They can be found in the tests
directory.
Requirements
- Linux
- C++ toolchain. You can use alternative compilers to build the library.
We recommend using Clang 18 to build the
abieos
C++ library.
Make sure you have Clang 18 installed on your system:
Setup Instructions
To use rs_abieos
in your Rust project, you need to add it as a dependency in your Cargo.toml
file:
Then, run the following command to download and compile the rs_abieos
library:
# or if you have another default compiler, use clang-18 to build the library
CXX=clang++-18 CC=clang-18
Quick Usage Example
Short example of how to use the library on new Rust binary project:
// Step 1 - Bring rs_abieos into scope
use Abieos;
Detailed Example
For this example, download the eosio.system abi file and copy to your project root as eosio.abi.json
use ;
bin-src/main.rs
contains a more detailed executable example that demonstrates multiple use cases for the library.
Please refer to the library's API documentation for more detailed information on each function.
Library Development
Testing
To run the test cases, use the following command:
# or
CXX=clang++-18 CC=clang-18