Skip to content

C wrapper for schnorrkel signatures on RUST implement

Notifications You must be signed in to change notification settings

chesterliliang/schnorrkel-c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Schnorrkel-c

Provide a C wrapper for native app calling based on RUST implementation.

1.Directory struct

.
|--src
    |--def.h    //extern raw rust function to C.
    |--lib.h    //C API define
    |--lib.c    //impl of C API
    |--lib.rs   //wrapper of RUST, make it easy to call from C
    |--test.c   //test code
|--readme.md
|--Cargo.toml
|--test //execute binary

How to use

compile rust

in project root dir:

cargo build

compile C

in project root dir, use gcc:

on Linux
gcc -g -o test ./src/lib.c ./src/test.c ./target/debug/libschnorrkel_c.so -L. -Wl,-rpath=.^C

on OSX
gcc -g -o test ./src/lib.c ./src/test.c ./target/debug/libschnorrkel_c.dylib -L. 

Run test

./test

About

C wrapper for schnorrkel signatures on RUST implement

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published