NLINKER_RUST Telegram 1836
Классная идея, особенно для FFI. Типа "превратим Rust в ООП с виртуальными таблицами и вот этим всем вот". Многие подумают, мол ну что за бред, зачем возвращать то, от чего ушли (наконец-то)?

Ну вот, для FFI, когда надо передать объект в C++, он в том рантайме будет туда-сюда передаваться, а когда вернётся обратно в Rust — все методы будут на месте и их можно будет корректно вызвать. Так что вот статья.
https://adventures.michaelfbryan.com/posts/ffi-safe-polymorphism-in-rust/

А вот человек засучил рукава и обернул это в удобный макрос:
https://github.com/kotauskas/thin_trait_object



tgoop.com/nlinker_rust/1836
Create:
Last Update:

Классная идея, особенно для FFI. Типа "превратим Rust в ООП с виртуальными таблицами и вот этим всем вот". Многие подумают, мол ну что за бред, зачем возвращать то, от чего ушли (наконец-то)?

Ну вот, для FFI, когда надо передать объект в C++, он в том рантайме будет туда-сюда передаваться, а когда вернётся обратно в Rust — все методы будут на месте и их можно будет корректно вызвать. Так что вот статья.
https://adventures.michaelfbryan.com/posts/ffi-safe-polymorphism-in-rust/

А вот человек засучил рукава и обернул это в удобный макрос:
https://github.com/kotauskas/thin_trait_object

BY Linker Unsafe


Share with your friend now:
tgoop.com/nlinker_rust/1836

View MORE
Open in Telegram


Telegram News

Date: |

A vandalised bank during the 2019 protest. File photo: May James/HKFP. Users are more open to new information on workdays rather than weekends. Among the requests, the Brazilian electoral Court wanted to know if they could obtain data on the origins of malicious content posted on the platform. According to the TSE, this would enable the authorities to track false content and identify the user responsible for publishing it in the first place. Polls A few years ago, you had to use a special bot to run a poll on Telegram. Now you can easily do that yourself in two clicks. Hit the Menu icon and select “Create Poll.” Write your question and add up to 10 options. Running polls is a powerful strategy for getting feedback from your audience. If you’re considering the possibility of modifying your channel in any way, be sure to ask your subscribers’ opinions first.
from us


Telegram Linker Unsafe
FROM American