RustConf 2021 - Move Constructors: Is it Possible? by Miguel Young de la Sota
Move Constructors: Is it Possible? by Miguel Young de la Sota
A "self-referential" type is one that holds a reference into itself; async Futures are the most common self-referential types in Rust today. However, they can't be moved without invalidating the reference, so they're pinned on the heap or stack. You can't return them or put them into collections (without Boxing, of course). C++ makes heavy use of safely-moveable self-referential types, via move constructors. Bridging move constructors into Rust is one of the great unsolved problems of C++ FFI. Was an unsolved problem. Using a novel interpretation of the Pin P guarantees, we'll port all C++ constructors, not just move constructors, to Rust, without compromising Rust's move-after-use protections (something C++ lacks). Return-by-move and collections are fully supported in today's stable Rust. Beyond zero-cost C++ FFI, Rust "constructors" can be applied to express novel data structures in pure Rust. No C++ knowledge required!
Видео RustConf 2021 - Move Constructors: Is it Possible? by Miguel Young de la Sota канала Rust
A "self-referential" type is one that holds a reference into itself; async Futures are the most common self-referential types in Rust today. However, they can't be moved without invalidating the reference, so they're pinned on the heap or stack. You can't return them or put them into collections (without Boxing, of course). C++ makes heavy use of safely-moveable self-referential types, via move constructors. Bridging move constructors into Rust is one of the great unsolved problems of C++ FFI. Was an unsolved problem. Using a novel interpretation of the Pin P guarantees, we'll port all C++ constructors, not just move constructors, to Rust, without compromising Rust's move-after-use protections (something C++ lacks). Return-by-move and collections are fully supported in today's stable Rust. Beyond zero-cost C++ FFI, Rust "constructors" can be applied to express novel data structures in pure Rust. No C++ knowledge required!
Видео RustConf 2021 - Move Constructors: Is it Possible? by Miguel Young de la Sota канала Rust
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
![RustConf 2021 - Supercharging Your Code With Five Little-Known Attributes by Jackson Lewis](https://i.ytimg.com/vi/8d7DqeYXq7A/default.jpg)
![](https://i.ytimg.com/vi/JlrfjgCrfMc/default.jpg)
![RustConf 2021 - Identifying Pokémon Cards by Hugo Peixoto](https://i.ytimg.com/vi/BLy_YF4nmqQ/default.jpg)
![RustConf 2021 - Whoops! I Rewrote It in Rust by Brian Martin](https://i.ytimg.com/vi/m-Qg3OoPIdc/default.jpg)
![Rust in 100 Seconds](https://i.ytimg.com/vi/5C_HPTJg5ek/default.jpg)
![RustConf 2021 - Writing the Fastest GBDT Library in Rust by Isabella Tromba](https://i.ytimg.com/vi/D1NAREuicNs/default.jpg)
![Rust Linz, September 2021 - Yoshua Wuyts - Futures Concurrency in the Future, Maybe](https://i.ytimg.com/vi/QlPDI9IsSXU/default.jpg)
![RustConf 2021 - How I Used Rust to Become Extremely Offline by Luke Westby](https://i.ytimg.com/vi/b0I4vP2CP88/default.jpg)
![What Is Turbulence? A Pilot Explains How It Happens, Even in Clear Skies | WSJ](https://i.ytimg.com/vi/5wQ9nAlO12E/default.jpg)
![RustConf 2021 - The Importance of Not Over-Optimizing in Rust by Lily Mara](https://i.ytimg.com/vi/CV5CjUlcqsw/default.jpg)
![RustConf 2020 - How to Start a Solo Project that You'll Stick With by Harrison Bachrach](https://i.ytimg.com/vi/yv6L_xmjw5I/default.jpg)
![Rust Linz, September 2021 - Filip Kieres - Send Your Microservices to the Autobahn w/ gRPC and Rust](https://i.ytimg.com/vi/i-eZ17Z48YI/default.jpg)
![RustConf 2019 - From Electron, to Wasm, to Rust (Aaand Back to Electron) by Irina Shestak](https://i.ytimg.com/vi/lLzFJenzBng/default.jpg)
![Why You Shouldn’t Learn Python In 2021](https://i.ytimg.com/vi/sO1ctUNQ1k8/default.jpg)
![RustConf 2021 - Compile-Time Social Coordination by Zac Burns](https://i.ytimg.com/vi/4_Jg-rLDy-Y/default.jpg)
![RustConf 2021 - Hacking rustc: Contributing to the Compiler by Esteban Kuber](https://i.ytimg.com/vi/9H9SO2u6Q20/default.jpg)
![Data Oriented GUI in Rust by Raph Levien - Bay Area Rust Meetup](https://i.ytimg.com/vi/4YTfxresvS8/default.jpg)
![RustConf 2020 - Error handling Isn't All About Errors by Jane Lusby](https://i.ytimg.com/vi/rAF8mLI0naQ/default.jpg)
![RustConf 2020 - Bending the Curve: A Personal Tutor at Your Fingertips by Esteban Kuber](https://i.ytimg.com/vi/Z6X7Ada0ugE/default.jpg)
![RustLatam 2019 - Without Boats: Zero-Cost Async IO](https://i.ytimg.com/vi/skos4B5x7qE/default.jpg)