Open alper opened 4 months ago
I also don't really get what this bit in mod.rs
is going on about:
if #[cfg(any(windows, target_family = "wasm"))] {
Windows??
@DogeDark probably knows more about this
It seemingly is not supported on desktop
either.
I just checked out master here and tried to build/run the geolocation example and it's broken.
I get some more information now:
compile_error!("the `geolocation` feature is only available on wasm and windows targets...
But I thought I was cross-compiling to wasm here.
OK. Let me close this. I think to see if things compile I was doing cargo build
which would then of course not have the right target architecture set. A bit confusing.
Oddly enough, I'm trying to bundle everything not using cargo
this time round:
dx bundle --platform web --release
But it gives me the same error about geolocation:
10 | ... compile_error!("The geolocation module is not supported on this platform....
OK. This works now with: dx bundle --platform web --release --target wasm32-unknown-unknown
Which is odd because dx serve
did not have me specify an explicit target.
It does give an error at the end but seems to have built most everything:
thread 'main' panicked at /Users/alpercugun/.cargo/registry/src/index.crates.io-6f17d22bba15001f/dioxus-cli-0.5.7/src/cli/bundle.rs:216:13:
Failed to bundle project: GenericError(
"Native unknown bundles not yet supported.",
)
stack backtrace:
0: _rust_begin_unwind
1: core::panicking::panic_fmt
2: dioxus_cli::cli::bundle::Bundle::bundle
3: dx::main::{{closure}}
4: tokio::runtime::park::CachedParkThread::block_on
5: tokio::runtime::runtime::Runtime::block_on
6: dx::main
I'm getting:
compile_error!("The geolocation module is not supported on this platform....
Not sure but my combination of:
and
Is pretty
web
isn't it?