-
Notifications
You must be signed in to change notification settings - Fork 916
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hello_triangle_c panics while unwrapping power preference #102
Comments
I can't confirm right now but I believe we don't assume any backend by default, so you'll need to specify We could probably provide an error when no backend has been selected. |
I suspected it was something to do with selecting a backend. To clarify my understanding, is it correct to say that I've compiled wgpu with no backend, and then the C code calls correctly into the rust library which was compiled incorrectly? |
I've just cloned a fresh copy of the repo and built with |
In addition, running the following from the root of a fresh copy of the repo:
Results in a |
I also don't see |
That's right, the library needs to be compiled with a particular backend specified (most functions will fail when they hit an The Makefile is probably out of date because it existed before we switched to cmake for the C example.
I don't think this should be required because it's an optional crate (i.e. You should be able to run the command (including all of the Edit: We also have a Gitter to chat if it's easier to discuss there. |
Brilliant! The command from travis builds a binary that works on my machine. Thanks so much for being so responsive on this. Now I can start experimenting against the C API. |
@cshenton don't hesitate to visit us on gitter or elsewhere! We'd be happy to showcase your screenshots in the gallery. |
The link provided above by - if [[ $TRAVIS_OS_NAME == "osx" ]]; then (brew update && brew upgrade cmake && brew install glfw3 && cd wgpu-native && cargo build --features=local,gfx-backend-metal && cd ../examples/hello_triangle_c && mkdir build && cd build && cmake .. && make); fi However, it seems such a long ago answer is no longer applicable if one faces the same issue in 2023 or onwards, at least in my own experience that's the case. |
Running hello_triangle_c causes the following error in on the rust side:
Steps to repro on macOS
glfw 3.2.1
cmake 3.13.4
make 3.81
rust 1.33
macos 10.13.6
xcode 10.1
The text was updated successfully, but these errors were encountered: