Unsafe & FFI in Rust

preview_player
Показать описание
This stream we dive into the world of C FFI and unsafe by building a simple static library in Rust that we call from C.
Рекомендации по теме
Комментарии
Автор

Thanks for the videos Ryan! Not sure what is planned for part 2, but if you are taking suggestions, I would be interested in links/discussion about any "idiomatic" conventions (like the Rust API guidelines) when exposing a Rust library to C. Like what should you do if you have an API using Result/Option?

bluk
Автор

`RustString` can't be represented as an opaque struct in C since you are using it as a value and C needs to know its size and layout. On the other hand `const char*` could be used instead of `RustString` without the need for typedef. Great stream again. Looking forward for the next one!

bostjanvesnicer
Автор

Thanks Ryan. This would be cool for c# and java. I did ffi for our c# code and also ran into a lot of these issues.

lanklaas
Автор

18:28 A type alias would serve well here to help us remember what type it's supposed to be

aqua
Автор

Claims to not even be an intermediate level C programmer, proceeds to type "int main() { }" like a pro.

fnizzelwhoop
Автор

@Ryan Could you please tell
me how to install Rust in WSL? The installation script is always failed and core team mentioned that it is a bug in WSL.

chiwang
Автор

You seem to be expert in that field. I know nothing about that.

TheKruns
Автор

I 've spent one hour into your video and all you showed were your own mistakes. It takes 5 minutes to test your own code before production.

Munku
Автор

Stop saying “Um.. um… um…”

It’s fucking annoying

Other than that, nice video 👌

zahash
welcome to shbcf.ru