David Tolnay

Results 700 comments of David Tolnay

None of what you've written runs cxx's code generator. If you aren't using one of the supported build systems, https://cxx.rs/build/other.html describes the list of things you would need to be...

I don't agree with using the user's source file's name in the `compile` call. In general there are going to be zero or more user-specified source files being compiled (in...

The `CxxVector` binding on the Rust side specifically refers to `std::vector`. If you have signatures needing to use `const std::vector`, that's just some other extern C++ type, which should already...

I would write that binding as: ```cpp // foo_bar.h #pragma once #include "path/to/foo.h" using foo_bar = foo::bar; ``` ```rust // src/lib.rs #[cxx::bridge] mod ffi { #[repr(i32)] enum foo_bar { ALICE,...

How is this API done in std::vector or other C++ vector libraries?

I am open to this but for now it's easy enough to define downstream. #80 and #410 are for something different, those appear to be for C++ implicit conversions and...

A Rust signature should be emitted as a non-static member function if and only if it has a `self` argument. I want to support static member functions but those shouldn't...

The current workaround for async calls is to implement them using a callback function and oneshot channel. In my work codebase that ends up looking like: ```rust use futures::channel::oneshot; #[cxx::bridge]...

- Fixed. - No, it's fine with argument names. Maybe a style difference. We do it as written. - We're using folly, not std::experimental. Here's a more typical usage for...