Linux & Mac | |
---|---|
Windows |
Template for porting/calling C code in Rust Project.
There are two directories with the source codes.
- legacy - contains C code which is compiled into lib
- src - contains Rust code which is compiled as application
Generation of the C bindings for Rust is done on-the-fly by Bindgen crate. The modules which should be compiled are speci
To build the project simply run:
cargo build
Here is example of several args you can pass:
cargo run -- -h
Say Hi
Hello from C!
cargo run -- -p
Missing name of the place. Falling to default.
We are at Prague!
cargo run -- -p London
We are at London!
cargo run -- -m
Multiply value: 6
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
- Petr Hodina
This project is licensed under the MIT License - see the LICENSE.md file for details