November 2017
Intermediate to advanced
264 pages
5h 45m
English
Because of the vast functionality that exists in C code, it can sometimes be useful to delegate processing to a C routine, instead of writing everything in Rust.
You can call all functions and types from the C standard library by using the libc crate, which must be obtained through Cargo.
You have to add the following to Cargo.toml:
[dependencies]
libc = "*"
If you use Rust's nightly version, this is not necessary, but you have to use a feature attribute (or a feature gate, as they are also called) at the start of your code:
#![feature(libc)]
Read now
Unlock full access