Skip to content
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

App Compiling for mobile (android) not for Web #3540

Open
velocifer-in opened this issue Jan 11, 2025 · 0 comments
Open

App Compiling for mobile (android) not for Web #3540

velocifer-in opened this issue Jan 11, 2025 · 0 comments

Comments

@velocifer-in
Copy link

**App Compiling fails with Platform not supported **

Created a new app using dx new app_name with default parameters and target mobile, added modification like auth_login and auth_signup compiled working on Android devices. when the same app compiled for web throwing multiple errors.

** Error message**

macbook@Phineas-mac DyFlow % dx serve --platform web --verbose 15:55:30 [dev] Loading crate 15:55:30 [dev] Found package NodeIndex(102) 15:55:30 [dev] Could not find explicit feature for platform server, passing fallbackinstead 15:55:30 [dev] Verifying tooling... 15:55:30 [dev] Watching path "/Users/macbook/Projects/vscode/rust/DyFlow/Cargo.toml" 15:55:30 [dev] Watching path "/Users/macbook/Projects/vscode/rust/DyFlow/README.md" 15:55:30 [dev] Watching path "/Users/macbook/Projects/vscode/rust/DyFlow/assets" 15:55:30 [dev] Watching path "/Users/macbook/Projects/vscode/rust/DyFlow/Dioxus.toml" 15:55:30 [dev] Watching path "/Users/macbook/Projects/vscode/rust/DyFlow/src" 15:55:30 [dev] Watching path "/Users/macbook/Projects/vscode/rust/DyFlow" 15:55:31 [dev] ----------------------------------------------------------------- Serving your Dioxus app: dy-flow 🚀 • Pressctrl+cto exit the server • Pressrto rebuild the app • Pressoto open the app • Pressvto toggle verbose logging • Press/` for more commands and shortcuts
Learn more at https://dioxuslabs.com/learn/0.6/getting_started
----------------------------------------------------------------

15:55:31 [dev] Running build command...
15:55:31 [dev] Building app...
15:55:31 [dev] Initialized Root dir: "/Users/macbook/Projects/vscode/rust/DyFlow/target/dx/dy-flow/debug/web/public"
15:55:31 [dev] Initialized Exe dir: "/Users/macbook/Projects/vscode/rust/DyFlow/target/dx/dy-flow/debug/web/public/wasm"
15:55:31 [dev] Initialized Asset dir: "/Users/macbook/Projects/vscode/rust/DyFlow/target/dx/dy-flow/debug/web/public/assets"
15:55:31 [dev] Executing cargo...
15:55:31 [dev] cargo args: ["--profile", "wasm-dev", "--target", "wasm32-unknown-unknown", "--verbose", "--features", "web", "--bin", "dy-flow"]
15:55:31 [dev] Building server...
15:55:31 [dev] cargo args: ["--profile", "wasm-dev", "--target", "wasm32-unknown-unknown", "--verbose", "--features", "web", "--bin", "dy-flow"]
15:55:59 [cargo] error: The platform you're compiling for is not supported by tao
--> /Users/macbook/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tao-0.30.0/ |platform_impl/mod.rs:40:
40 | compile_error!("The platform you're compiling for is not supported by tao");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

15:55:59 [cargo] error[E0432]: unresolved import platform
--> /Users/macbook/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tao-0.30.0/ |platform_impl/mod.rs:27:
27 | pub use platform::*;
| ^^^^^^^^ help: a similar path exists: crate::platform
|
= note: use statements changed in Rust 2018; read more at <https://doc.rust-lang.org/edition-guide/rust-2018/module-system/path-clarity.html

15:55:59 [cargo] error[E0432]: unresolved import crate::platform_impl::PlatformIcon
--> /Users/macbook/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tao-0.30.0/s |icon.rs:5:5
5 | use crate::platform_impl::PlatformIcon;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no PlatformIcon in platform_impl

15:55:59 [cargo] error[E0432]: unresolved imports crate::platform_impl::keycode_from --> /Users/macbook/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tao-0.30.0/ |keyboard.rs:81: 81 | keycode_from_scancode as platform_keycode_from_scancode, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no keycode_from_scancodeinplatform_impl
82 | keycode_to_scancode as platform_keycode_to_scancode,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no keycode_to_scancode in `platform_impl

15:55:59 [cargo] error[E0369]: binary operation == cannot be applied to type &std: --> /Users/macbook/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tao-0.30. |window.rs:1400:1 1395 | #[derive(Clone, Debug, PartialEq)] | --------- in this derive macro expansion ... 1400 | Borderless(Option<MonitorHandle>), | ^^^^^^^^^^^^^^^^^^^^^ | = note: this error originates in the derive macro PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info

15:55:59 [cargo] Some errors have detailed explanations: E0369, E0432.
15:55:59 [cargo] For more information about an error, try rustc --explain E0369.
15:55:59 [cargo] error: could not compile tao (lib) due to 5 previous errors
15:55:59 [cargo] Caused by:
15:55:59 [cargo] process didn't exit successfully: /Users/macbook/.rustup/toolchains/stable-aarch64-apple-darwin/bin/rustc --crate-name tao --edition=2021 /Users/macbook/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tao-0.30.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=1 -C embed-bitcode=no -C debuginfo=2 -C debug-assertions=on --cfg 'feature="default"' --cfg 'feature="rwh_05"' --cfg 'feature="rwh_06"' --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("default", "rwh_04", "rwh_05", "rwh_06", "serde"))' -C metadata=227f30ca0afd9cbd -C extra-filename=-227f30ca0afd9cbd --out-dir /Users/macbook/Projects/vscode/rust/DyFlow/target/wasm32-unknown-unknown/wasm-dev/deps --target wasm32-unknown-unknown -L dependency=/Users/macbook/Projects/vscode/rust/DyFlow/target/wasm32-unknown-unknown/wasm-dev/deps -L dependency=/Users/macbook/Projects/vscode/rust/DyFlow/target/wasm-dev/deps --extern bitflags=/Users/macbook/Projects/vscode/rust/DyFlow/target/wasm32-unknown-unknown/wasm-dev/deps/libbitflags-0fa36b79504317ac.rmeta --extern crossbeam_channel=/Users/macbook/Projects/vscode/rust/DyFlow/target/wasm32-unknown-unknown/wasm-dev/deps/libcrossbeam_channel-b7f5d6aeeb051892.rmeta --extern dpi=/Users/macbook/Projects/vscode/rust/DyFlow/target/wasm32-unknown-unknown/wasm-dev/deps/libdpi-63478f36715860dd.rmeta --extern instant=/Users/macbook/Projects/vscode/rust/DyFlow/target/wasm32-unknown-unknown/wasm-dev/deps/libinstant-06303669ff3b5324.rmeta --extern lazy_static=/Users/macbook/Projects/vscode/rust/DyFlow/target/wasm32-unknown-unknown/wasm-dev/deps/liblazy_static-27d8b6ac674f97f6.rmeta --extern libc=/Users/macbook/Projects/vscode/rust/DyFlow/target/wasm32-unknown-unknown/wasm-dev/deps/liblibc-0236e6b98569a632.rmeta --extern log=/Users/macbook/Projects/vscode/rust/DyFlow/target/wasm32-unknown-unknown/wasm-dev/deps/liblog-2ed4abcc12df6b42.rmeta --extern rwh_05=/Users/macbook/Projects/vscode/rust/DyFlow/target/wasm32-unknown-unknown/wasm-dev/deps/libraw_window_handle-77dcb6191abadd0d.rmeta --extern rwh_06=/Users/macbook/Projects/vscode/rust/DyFlow/target/wasm32-unknown-unknown/wasm-dev/deps/libraw_window_handle-b1de9db5723c7d31.rmeta --extern url=/Users/macbook/Projects/vscode/rust/DyFlow/target/wasm32-unknown-unknown/wasm-dev/deps/liburl-746f63094a6faccf.rmeta --cap-lints allow (exit status: 1)
15:55:59 [cargo] warning: build failed, waiting for other jobs to finish...
15:56:07 [dev] Setting builder to failed state
15:56:07 [dev] Build failed: Other(Cargo build failed, signaled by the compiler. Toggle tracing mode (press t) for more information.)`

Steps To Reproduce

Steps to reproduce the behavior:

  • cmd / terminal dx new app all defaults target mobile
  • add changes dx serve --platform android --verbose
  • ctrl +c dx serve --platform web --verbose (Compilation fails)

Expected behavior

Supposed to serving for web

Screenshots

image

Environment:

  • Dioxus version: dioxus 0.6.1 (was built without git repository)
  • Rust version: rustc 1.84.0 (9fc6b4312 2025-01-07). cargo 1.84.0 (66221abde 2024-11-19)
  • OS info: Mac Os 15.2
  • App platform: web, mobile
    Questionnaire
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant