Comments (3)
Just a slight note: MSVC does support these features and has for quite some time. The issue is more with the tooling and toolchain aspects.
With a little bit of work, a cmake shim (or other build tooling) file could be generated so that an "imported" bridge target is available for users as part of the build.rs
process.
This would also allow you to remove any command line generation work and leave it up to cmake, meson, or whomever. In the case of CMake, you could then parse the "codemodel" and use that information for linking with rustc and friends. I should state however that the CMake codemodel is something bordering on unusable, but this isn't the first time the developers of cmake have shown they don't really know what they're doing.
That said, the current cmake crate doesn't use CMake as well as it should and it would require a complete and massive rewrite to get the functionality you need. As it stands it already assumes a few things which break under "poorly behaved projects".
I should note that with the WG21 SG15 Tooling TR (a report that's being written to sort of standardize tooling without it being "a standard"), we're effectively going all in on JSON. Older tools will be more difficult handle
Luckily, I care about C++ and build tools and I'm a guru of the former and an expert in the latter so I'm sure we could get this resolved :)
from cxx.
I don't know hardly anything about Windows. 😞 Someone would need to try it out; I don't know of anything that would block this design from working just as well on msvc -- but I'm also not sure that if there were a blocker, I would know.
#8 calls out that Box construction in our current binding may not work on msvc because it isn't written using std::addressof
and ::new
, but I haven't dug into the implications of that. Sounds like something we can fix.
In any case, any necessary fixes for Windows support would be appreciated!
I'll leave this issue open until someone is able to send a PR adding a continuous integration build on Windows.
from cxx.
As of https://travis-ci.com/dtolnay/cxx/builds/150429387 we now have windows CI on both x86_64-pc-windows-gnu and x86_64-pc-windows-msvc so I'll go ahead and close this issue. There is one warning emitted during the msvc build but we'll be following up on that in #44.
from cxx.
Related Issues (20)
- Question: estimate workload to call functions from geogram HOT 1
- Returning `CxxString` from Rust to C++ HOT 5
- Extern C++ Enums HOT 5
- Advice/example on docs.rs strategy HOT 2
- Feature Request: Add support for nested Vector types HOT 1
- Building two CXX C++ bindings with the same symbols but in different namespaces. HOT 2
- Including bridge from another crate
- Error in configuring crates_universe when included as a Bazel module HOT 6
- Error compiling `cxx.cc` on Windows HOT 1
- Proposal: implementing native C++ std::error_code
- Link failure when using CXX-backed function from another crate HOT 1
- Unsupported element type of Vec<[u64; 3]>
- How to include C++ files whose directory is given by an environment variable? HOT 1
- Error compiling demo to wasm on macOS HOT 5
- Is there a way to expose a C++ class that is itself a wrapper on `std::shared_ptr`?
- How can I `include!` a file in OUT_DIR
- How can I return a vector of non-trivial type of C++ to Rust?
- LNK2019 unresolved symbol for Vec<SharedStruct> using MSVC
- Using CXX in multiple DLLs always results in undefined behavior?
- Does the core safety claim need rephrasing? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cxx.