У нас вы можете посмотреть бесплатно From Rust to C and Back Again: an introduction to "foreign functions" или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
An introduction to "foreign functions" (FFI) in Rust and C. This talk goes through calling C standard library functions, using the cc crate to build and link our own C code, and using the bindgen crate to generate bindings from a header file. These are advanced topics, but some beginners run into these topics early on, so hopefully this talk is accessible to anyone who knows some Rust and maybe a little bit of C. Slides: https://jacko.io/ffi/slides Code: https://github.com/oconnor663/rust_c An earlier version of the same talk recorded live at the Seattle Rust User Group: • From Rust to C and Back Again — by Jack O'... Timeline 00:00 Intro 02:51 What does printing do? 11:29 Calling putchar ourselves 13:34 Building C code with the cc crate 26:58 Implementing a linked list in C 32:16 Generating bindings with Bindgen 38:12 Wrapping unsafe code in a safe API 39:13 PhantomData 41:31 Boxing and unboxing T 48:37 Drop 51:07 AddressSanitizer 54:14 Outro References putchar man page: https://linux.die.net/man/3/putchar Cargo build.rs docs: https://doc.rust-lang.org/cargo/refer... cc crate docs: https://docs.rs/cc Bindgen docs: https://rust-lang.github.io/rust-bindgen PhantomData in the Rustonomicon: https://doc.rust-lang.org/nomicon/pha... Box::into_raw: https://doc.rust-lang.org/std/boxed/s... Learn Rust With Entirely Too Many Linked Lists: https://rust-unofficial.github.io/too... Errata 35:03: Struct names in Rust are "UpperCamelCase", not "snake_case". See https://rust-lang.github.io/api-guide....