You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
I have a project based on current wgpu (commit e27fbb8). When building it for wasm, I compile it with RUSTFLAGS=--cfg=web_sys_unstable_apis cargo build --no-default-features --target wasm32-unknown-unknown. When I try to build it with the "trace" feature enabled in its wgpu dependency, it fails while trying to build libloading 0.7.0; the errors are of the form:
error[E0433]: failed to resolve: use of undeclared crate or module `imp`
--> /Users/blakej/.cargo/registry/src/github.com-1ecc6299db9ec823/libloading-0.7.0/src/lib.rs:63:20
|
63 | pub struct Library(imp::Library);
| ^^^ use of undeclared crate or module `imp`
The problem is presumably that libloading is being compiled at all, which doesn't seem to make sense for a wasm target.
I wasn't able to figure out exactly what was inducing it to be compiled, but I noticed that if I removed the "wgc/trace" entry in the trace feature in wgpu/wgpu/Cargo.toml (in a local copy of wgpu), it stopped trying to pull in that dependency.
Platform
macOS 11.4, wgpu snapshot listed above.
The text was updated successfully, but these errors were encountered:
I got the same issue when trying to run the examples on the web with a local copy of this repo. It looks like this might be solved with libloading 0.7.2 according to Fails to build to wasm32-unknown-unknown target #91 . I'm not sure where exactly the solution should be implemented though since I'm just getting started by running examples.
Description
I have a project based on current wgpu (commit e27fbb8). When building it for wasm, I compile it with
RUSTFLAGS=--cfg=web_sys_unstable_apis cargo build --no-default-features --target wasm32-unknown-unknown
. When I try to build it with the "trace" feature enabled in its wgpu dependency, it fails while trying to buildlibloading 0.7.0
; the errors are of the form:The problem is presumably that libloading is being compiled at all, which doesn't seem to make sense for a wasm target.
I wasn't able to figure out exactly what was inducing it to be compiled, but I noticed that if I removed the
"wgc/trace"
entry in thetrace
feature inwgpu/wgpu/Cargo.toml
(in a local copy ofwgpu
), it stopped trying to pull in that dependency.Platform
macOS 11.4, wgpu snapshot listed above.
The text was updated successfully, but these errors were encountered: