Mixing C++ and Rust - Multi-Language "Hello World" with CXX

แชร์
ฝัง
  • เผยแพร่เมื่อ 31 ธ.ค. 2024

ความคิดเห็น •

  • @cyrilanisimov
    @cyrilanisimov หลายเดือนก่อน +2

    I think there is no elegant way to interplay with different languages (exclude C) so better to use interprocess communications between microservices.
    P.S. Nice Vim config

    • @nathangeneral23
      @nathangeneral23 หลายเดือนก่อน

      There are situations where inter-process communication IPC) isn't a viable option. For example, you may need to work with an image or AV processing library written in C++ or some obscure networking protocol that doesn't have a native Rust implementation. It's all well and good to say use IPC, but if you're working with embedded systems or architectures that would be greatly complicated by IPC, langauge interoperability is incredibly important.

    • @cyrilanisimov
      @cyrilanisimov หลายเดือนก่อน

      @ for embedded this approach is even worse because you have to write a lot of code which wraps C++ and Rust. It’s better to use C to wrap the libs. In this case it’s possible to use almost any language.

  • @kuhluhOG
    @kuhluhOG หลายเดือนก่อน +1

    The build script looks kinda cursed.
    Like, you declare that something should be done by writing to stdout. Who had that idea? And what was the thought process behind that?

  • @AGeekTragedy
    @AGeekTragedy หลายเดือนก่อน

    Is expanding the FFI to map Rust tag unions to std::variant planned for the future?

    • @KDABtv
      @KDABtv  หลายเดือนก่อน +1

      Hi,
      as KDAB isn't maintaining CXX directly, we cannot speak for the future of the project itself.

  • @VenyaYa-e7p
    @VenyaYa-e7p 10 วันที่ผ่านมา

    There is a confusing moment. VS Code keeps showing the error saying "cannot open source file "cxx-basics/src/main.rs.h" until you build your project and add an includePath "${workspaceFolder}/target/cxxbridge"