| 1 | # Copyright © SixtyFPS GmbH <info@slint.dev> |
| 2 | # SPDX-License-Identifier: MIT |
| 3 | |
| 4 | [package] |
| 5 | name = "weather-demo" |
| 6 | version = "1.11.0" |
| 7 | authors = ["FELGO GmbH <contact@felgo.com>" ] |
| 8 | edition = "2021" |
| 9 | build = "build.rs" |
| 10 | publish = false |
| 11 | license = "MIT" |
| 12 | |
| 13 | [dependencies] |
| 14 | async-std = "1.12.0" |
| 15 | chrono = { version = "0.4.38" , optional = true, default-features = false, features = ["clock" ] } |
| 16 | directories = "6.0" |
| 17 | log = "0.4.21" |
| 18 | serde = { version = "1.0" , features = ["derive" ] } |
| 19 | serde_json = "1.0.115" |
| 20 | slint = { path = "../../api/rs/slint" , features = ["backend-android-activity-06" ] } |
| 21 | |
| 22 | [target.'cfg(all(not(target_arch = "wasm32"), not(target_os = "android")))'.dependencies] |
| 23 | env_logger = "0.11.3" |
| 24 | |
| 25 | [target.'cfg(target_os = "android")'.dependencies] |
| 26 | android_logger = "0.14.1" |
| 27 | openssl = { version = "0.10" , features = ["vendored" ], optional = true } |
| 28 | |
| 29 | [target.'cfg(not(target_arch = "wasm32"))'.dependencies] |
| 30 | openweather_sdk = { version = "0.1.8" , optional = true } |
| 31 | tokio = "1.37.0" |
| 32 | |
| 33 | [target.'cfg(target_arch = "wasm32")'.dependencies] |
| 34 | console_log = "1.0" |
| 35 | console_error_panic_hook = "0.1.7" |
| 36 | wasm-bindgen = "0.2" |
| 37 | wasm-bindgen-futures = "0.4" |
| 38 | |
| 39 | [build-dependencies] |
| 40 | slint-build = { path = "../../api/rs/build" } |
| 41 | |
| 42 | [features] |
| 43 | default = ["chrono" ] |
| 44 | open_weather = ["dep:openweather_sdk" , "dep:openssl" ] |
| 45 | |
| 46 | # Android-activity / wasm support |
| 47 | [lib] |
| 48 | crate-type = ["lib" , "cdylib" ] |
| 49 | path = "src/lib.rs" |
| 50 | |
| 51 | [[bin]] |
| 52 | name = "weather-demo" |
| 53 | path = "src/main.rs" |
| 54 | |
| 55 | # Andoroid settings |
| 56 | # See more: https://github.com/rust-mobile/cargo-apk?tab=readme-ov-file#manifest |
| 57 | [package.metadata.android] |
| 58 | package = "dev.slint.examples.weatherdemo" |
| 59 | resources = "android-res" |
| 60 | build_targets = ["aarch64-linux-android" ] |
| 61 | |
| 62 | [package.metadata.android.application] |
| 63 | label = "Weather Demo" |
| 64 | icon = "@mipmap/ic_launcher" |
| 65 | |
| 66 | [[package.metadata.android.uses_permission]] |
| 67 | name = "android.permission.INTERNET" |
| 68 | |