The Foreign Function Interface in Rust

Опубликовано: 03 Ноябрь 2024
на канале: buckmasterinstitute
420
7

Created and recorded by Jaysinh Parmar. June 2021

Intro
Get dependencies
Code
Test
Conclusion

The libc library function can be found here: https://docs.rs/libc/0.2.95/libc/#fun...

Copy the dependencies in Cargo.toml https://crates.io/crates/libc

Build (cargo build)
Define the extern rand function in main.rs
Call the defined function in another function
Run the code (cargo run)