IOS construction problems #883

Closed
opened 2026-02-20 23:12:59 -05:00 by deekerman · 6 comments
Owner

Originally created by @xhzth70911 on GitHub (Oct 25, 2022).

macos12.3 ,xcode13.3
rustc 1.62.0

The macos is successfully built according to the document steps and runs normally.
https://rustdesk.com/docs/en/dev/build/osx/

However, iOS was built according to the document and encountered many problems.
https://rustdesk.com/docs/en/dev/build/ios/

rustup target add aarch64-apple-ios x86_64-apple-ios
cargo install cargo-lipo

Execute to
VCPKG_ROOT=$HOME/vcpkg ./flutter/ios_arm64.sh
A lot of problems

I modify

_grab(callback) grab(callback)

 Compiling rdev v0.5.0-2 (https://github.com/asur4s/rdev#ea223720)
error[E0425]: cannot find function `_grab` in this scope
   --> /Users/smartgo/.cargo/git/checkouts/rdev-a53ad59d4a4a3444/ea22372/src/lib.rs:374:5
    |
374 |     _grab(callback)
    |     ^^^^^ not found in this scope

For more information about this error, try `rustc --explain E0425`.
pub fn grab<T>(callback: T) -> Result<(), GrabError>
where
    T: Fn(Event) -> Option<Event> + 'static,
{
    //_grab(callback)
    grab(callback)

}

Continue execution

Compiling reqwest v0.11.11
warning: unreachable expression
   --> libs/hbb_common/src/config.rs:375:9
    |
374 |           return Self::path(APP_HOME_DIR.read().unwrap().as_str());
    |           -------------------------------------------------------- any code following this expression is unreachable
375 | /         if let Some(path) = dirs_next::home_dir() {
376 | |             patch(path)
377 | |         } else if let Ok(path) = std::env::current_dir() {
378 | |             path
379 | |         } else {
380 | |             std::env::temp_dir()
381 | |         }
    | |_________^ unreachable expression
    |
    = note: `#[warn(unreachable_code)]` on by default

warning: unreachable statement
   --> libs/hbb_common/src/config.rs:392:9
    |
389 |             return path;
    |             ----------- any code following this expression is unreachable
...
392 |         let org = "";
    |         ^^^^^^^^^^^^^ unreachable statement

warning: unreachable statement
   --> libs/hbb_common/src/config.rs:580:9
    |
574 | /             return Some(
575 | |                 rand::thread_rng()
576 | |                     .gen_range(1_000_000_000..2_000_000_000)
577 | |                     .to_string(),
578 | |             );
    | |_____________- any code following this expression is unreachable
579 |           }
580 |           let mut id = 0u32;
    |           ^^^^^^^^^^^^^^^^^^ unreachable statement

   Compiling magnum-opus v0.4.0 (https://github.com/SoLongAndThanksForAllThePizza/magnum-opus#6247071a)
warning: unused variable: `id`
   --> libs/hbb_common/src/config.rs:580:17
    |
580 |         let mut id = 0u32;
    |                 ^^ help: if this is intentional, prefix it with an underscore: `_id`
    |
    = note: `#[warn(unused_variables)]` on by default

   Compiling scrap v0.5.0 (/Users/smartgo/rustdesk/libs/scrap)
error[E0412]: cannot find type `Frame` in this scope
  --> libs/scrap/src/common/mod.rs:59:81
   |
59 |     fn frame<'a>(&'a mut self, timeout: std::time::Duration) -> std::io::Result<Frame<'a>>;
   |                                                                                 ^^^^^ not found in this scope

For more information about this error, try `rustc --explain E0412`.
error: could not compile `scrap` due to previous error
warning: build failed, waiting for other jobs to finish...

I Modify New
pub struct Frame<'a>(&'a [u8]);
in libs/scrap/src/common/mod.rs

Continue execution

(base) smartgo@smdeMac-mini rustdesk % VCPKG_ROOT=$HOME/vcpkg ./flutter/ios_arm64.sh       
   Compiling scrap v0.5.0 (/Users/smartgo/rustdesk/libs/scrap)
   Compiling hbb_common v0.1.0 (/Users/smartgo/rustdesk/libs/hbb_common)
warning: unreachable expression
   --> libs/hbb_common/src/config.rs:375:9
    |
374 |           return Self::path(APP_HOME_DIR.read().unwrap().as_str());
    |           -------------------------------------------------------- any code following this expression is unreachable
375 | /         if let Some(path) = dirs_next::home_dir() {
376 | |             patch(path)
377 | |         } else if let Ok(path) = std::env::current_dir() {
378 | |             path
379 | |         } else {
380 | |             std::env::temp_dir()
381 | |         }
    | |_________^ unreachable expression
    |
    = note: `#[warn(unreachable_code)]` on by default

warning: unreachable statement
   --> libs/hbb_common/src/config.rs:392:9
    |
389 |             return path;
    |             ----------- any code following this expression is unreachable
...
392 |         let org = "";
    |         ^^^^^^^^^^^^^ unreachable statement

warning: unreachable statement
   --> libs/hbb_common/src/config.rs:580:9
    |
574 | /             return Some(
575 | |                 rand::thread_rng()
576 | |                     .gen_range(1_000_000_000..2_000_000_000)
577 | |                     .to_string(),
578 | |             );
    | |_____________- any code following this expression is unreachable
579 |           }
580 |           let mut id = 0u32;
    |           ^^^^^^^^^^^^^^^^^^ unreachable statement

warning: unused variable: `id`
   --> libs/hbb_common/src/config.rs:580:17
    |
580 |         let mut id = 0u32;
    |                 ^^ help: if this is intentional, prefix it with an underscore: `_id`
    |
    = note: `#[warn(unused_variables)]` on by default

   Compiling rustdesk v1.2.0 (/Users/smartgo/rustdesk)
warning: `hbb_common` (lib) generated 4 warnings
warning: dropping unsupported crate type `cdylib` for target `aarch64-apple-ios`

error[E0583]: file not found for module `bridge_generated`
  --> src/lib.rs:27:1
   |
27 | mod bridge_generated;
   | ^^^^^^^^^^^^^^^^^^^^^
   |
   = help: to create the module `bridge_generated`, create file "src/bridge_generated.rs" or "src/bridge_generated/mod.rs"

error[E0433]: failed to resolve: could not find `server` in the crate root
  --> src/client.rs:52:5
   |
52 |     server::video_service::{SCRAP_X11_REF_URL, SCRAP_X11_REQUIRED},
   |     ^^^^^^ could not find `server` in the crate root

error[E0432]: unresolved import `crate::start_server`
  --> src/flutter_ffi.rs:17:5
   |
17 | use crate::start_server;
   |     ^^^^^^^^^^^^^^^^^^^ no `start_server` in the root

error[E0432]: unresolved import `crate::ipc`
  --> src/ui_cm_interface.rs:13:12
   |
13 | use crate::ipc::Data;
   |            ^^^ could not find `ipc` in the crate root

error[E0432]: unresolved imports `crate::ipc`, `crate::ipc`
  --> src/ui_cm_interface.rs:14:12
   |
14 | use crate::ipc::{self, new_listener, Connection};
   |            ^^^   ^^^^ no `ipc` in the root
   |            |
   |            could not find `ipc` in the crate root

error[E0432]: unresolved import `crate::ipc`
  --> src/ui_interface.rs:23:5
   |
23 | use crate::ipc;
   |     ^^^^^^^^^^ no `ipc` in the root

error[E0432]: unresolved import `crate::platform`
  --> src/ui_interface.rs:24:42
   |
24 | use crate::{common::SOFTWARE_UPDATE_URL, platform};
   |                                          ^^^^^^^^ no `platform` in the root

error[E0433]: failed to resolve: unresolved import
    --> src/client.rs:1395:24
     |
1395 |                 crate::platform::get_active_username()
     |                        ^^^^^^^^
     |                        |
     |                        unresolved import
     |                        help: a similar path exists: `cpal::platform`

error[E0433]: failed to resolve: could not find `lan` in the crate root
   --> src/flutter_ffi.rs:936:12
    |
936 |     crate::lan::send_wol(id)
    |            ^^^ could not find `lan` in the crate root

error[E0433]: failed to resolve: could not find `rendezvous_mediator` in the crate root
    --> src/flutter_ffi.rs:1006:12
     |
1006 |     crate::rendezvous_mediator::query_online_states(ids, handle_query_onlines)
     |            ^^^^^^^^^^^^^^^^^^^ could not find `rendezvous_mediator` in the crate root

error[E0433]: failed to resolve: could not find `lan` in the crate root
   --> src/ui_interface.rs:650:27
    |
650 |         allow_err!(crate::lan::discover());
    |                           ^^^ could not find `lan` in the crate root

error[E0433]: failed to resolve: unresolved import
   --> src/ui_interface.rs:770:12
    |
770 |     crate::platform::is_xfce()
    |            ^^^^^^^^
    |            |
    |            unresolved import
    |            help: a similar path exists: `cpal::platform`

error[E0433]: failed to resolve: unresolved import
   --> src/ui_session_interface.rs:217:16
    |
217 |         crate::platform::is_xfce()
    |                ^^^^^^^^
    |                |
    |                unresolved import
    |                help: a similar path exists: `cpal::platform`

error[E0433]: failed to resolve: could not find `ipc` in the crate root
    --> src/ui_session_interface.rs:1398:30
     |
1398 |     let mut options = crate::ipc::get_options_async().await;
     |                              ^^^ could not find `ipc` in the crate root

error[E0433]: failed to resolve: unresolved import
    --> src/ui_session_interface.rs:1402:22
     |
1402 |         key = crate::platform::get_license_key();
     |                      ^^^^^^^^
     |                      |
     |                      unresolved import
     |                      help: a similar path exists: `cpal::platform`

error[E0433]: failed to resolve: could not find `ipc` in the crate root
   --> src/flutter_ffi.rs:703:29
    |
703 |     send_to_cm(&crate::ipc::Data::Theme(dark));
    |                             ^^^^ not found in `crate::ipc`
    |
help: consider importing one of these items
    |
1   | use cpal::Data;
    |
1   | use crate::client::Data;
    |
help: if you import `Data`, refer to it directly
    |
703 -     send_to_cm(&crate::ipc::Data::Theme(dark));
703 +     send_to_cm(&Data::Theme(dark));
    | 

error[E0433]: failed to resolve: could not find `ipc` in the crate root
   --> src/flutter_ffi.rs:708:29
    |
708 |     send_to_cm(&crate::ipc::Data::Language(lang));
    |                             ^^^^ not found in `crate::ipc`
    |
help: consider importing one of these items
    |
1   | use cpal::Data;
    |
1   | use crate::client::Data;
    |
help: if you import `Data`, refer to it directly
    |
708 -     send_to_cm(&crate::ipc::Data::Language(lang));
708 +     send_to_cm(&Data::Language(lang));
    | 

error[E0425]: cannot find function `key_from_scancode` in crate `rdev`
   --> src/ui_session_interface.rs:815:25
    |
815 |         let key = rdev::key_from_scancode(scancode) as RdevKey;
    |                         ^^^^^^^^^^^^^^^^^ not found in `rdev`

warning: unused import: `TransferJobMeta`
  --> src/client/io_loop.rs:15:20
   |
15 |     RemoveJobMeta, TransferJobMeta,
   |                    ^^^^^^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default

warning: unused import: `collections::HashMap`
 --> src/common.rs:2:5
  |
2 |     collections::HashMap,
  |     ^^^^^^^^^^^^^^^^^^^^

warning: unused import: `decompress`
  --> src/common.rs:13:43
   |
13 |     compress::{compress as compress_func, decompress},
   |                                           ^^^^^^^^^^

warning: unused import: `message_proto::Hash`
  --> src/flutter_ffi.rs:14:18
   |
14 | use hbb_common::{message_proto::Hash, ResultType};
   |                  ^^^^^^^^^^^^^^^^^^^

warning: unused import: `self`
  --> src/ui_cm_interface.rs:24:9
   |
24 |         self,
   |         ^^^^

warning: unused import: `SERVER_KEYBOARD_ENABLED`
 --> src/ui_session_interface.rs:7:29
  |
7 |     QualityStatus, KEY_MAP, SERVER_KEYBOARD_ENABLED,
  |                             ^^^^^^^^^^^^^^^^^^^^^^^

warning: unused import: `crate::common::IS_X11`
 --> src/ui_session_interface.rs:9:5
  |
9 | use crate::common::IS_X11;
  |     ^^^^^^^^^^^^^^^^^^^^^

warning: unused imports: `EventType`, `KeyboardState`
  --> src/ui_session_interface.rs:17:19
   |
17 | use rdev::{Event, EventType, EventType::*, Key as RdevKey, KeyboardState};
   |                   ^^^^^^^^^                                ^^^^^^^^^^^^^

error[E0277]: the trait bound `DartCObject: From<EventToUI>` is not satisfied
   --> src/flutter.rs:401:47
    |
401 | pub fn session_start_(id: &str, event_stream: StreamSink<EventToUI>) -> ResultType<()> {
    |                                               ^^^^^^^^^^^^^^^^^^^^^ the trait `From<EventToUI>` is not implemented for `DartCObject`
    |
    = help: the following other types implement trait `IntoDart`:
              &str
              ()
              *const T
              *mut T
              Vec<T>
              Vec<f32>
              Vec<f64>
              Vec<i16>
            and 39 others
    = note: required because of the requirements on the impl of `Into<DartCObject>` for `EventToUI`
    = note: required because of the requirements on the impl of `IntoDart` for `EventToUI`
note: required by a bound in `StreamSink`
   --> /Users/smartgo/.cargo/git/checkouts/flutter_rust_bridge-ddba876d3ebb2a1e/e5adce5/frb_rust/src/rust2dart.rs:88:26
    |
88  | pub struct StreamSink<T: IntoDart> {
    |                          ^^^^^^^^ required by this bound in `StreamSink`

error[E0277]: the trait bound `DartCObject: From<EventToUI>` is not satisfied
  --> src/flutter_ffi.rs:91:33
   |
91 | pub fn session_start(events2ui: StreamSink<EventToUI>, id: String) -> ResultType<()> {
   |                                 ^^^^^^^^^^^^^^^^^^^^^ the trait `From<EventToUI>` is not implemented for `DartCObject`
   |
   = help: the following other types implement trait `IntoDart`:
             &str
             ()
             *const T
             *mut T
             Vec<T>
             Vec<f32>
             Vec<f64>
             Vec<i16>
           and 39 others
   = note: required because of the requirements on the impl of `Into<DartCObject>` for `EventToUI`
   = note: required because of the requirements on the impl of `IntoDart` for `EventToUI`
note: required by a bound in `StreamSink`
  --> /Users/smartgo/.cargo/git/checkouts/flutter_rust_bridge-ddba876d3ebb2a1e/e5adce5/frb_rust/src/rust2dart.rs:88:26
   |
88 | pub struct StreamSink<T: IntoDart> {
   |                          ^^^^^^^^ required by this bound in `StreamSink`

error[E0277]: the trait bound `DartCObject: From<EventToUI>` is not satisfied
   --> src/flutter.rs:103:41
    |
103 |     pub event_stream: Arc<RwLock<Option<StreamSink<EventToUI>>>>,
    |                                         ^^^^^^^^^^^^^^^^^^^^^ the trait `From<EventToUI>` is not implemented for `DartCObject`
    |
    = help: the following other types implement trait `IntoDart`:
              &str
              ()
              *const T
              *mut T
              Vec<T>
              Vec<f32>
              Vec<f64>
              Vec<i16>
            and 39 others
    = note: required because of the requirements on the impl of `Into<DartCObject>` for `EventToUI`
    = note: required because of the requirements on the impl of `IntoDart` for `EventToUI`
note: required by a bound in `StreamSink`
   --> /Users/smartgo/.cargo/git/checkouts/flutter_rust_bridge-ddba876d3ebb2a1e/e5adce5/frb_rust/src/rust2dart.rs:88:26
    |
88  | pub struct StreamSink<T: IntoDart> {
    |                          ^^^^^^^^ required by this bound in `StreamSink`

Some errors have detailed explanations: E0277, E0425, E0432, E0433, E0583.
For more information about an error, try `rustc --explain E0277`.
warning: `rustdesk` (lib) generated 9 warnings


Can you provide a detailed document? The current document cannot be compiled successfully. Thank you

Originally created by @xhzth70911 on GitHub (Oct 25, 2022). macos12.3 ,xcode13.3 rustc 1.62.0 The macos is successfully built according to the document steps and runs normally. https://rustdesk.com/docs/en/dev/build/osx/ However, iOS was built according to the document and encountered many problems. https://rustdesk.com/docs/en/dev/build/ios/ ``` rustup target add aarch64-apple-ios x86_64-apple-ios cargo install cargo-lipo ``` Execute to VCPKG_ROOT=$HOME/vcpkg ./flutter/ios_arm64.sh A lot of problems I modify _grab(callback) grab(callback) ``` Compiling rdev v0.5.0-2 (https://github.com/asur4s/rdev#ea223720) error[E0425]: cannot find function `_grab` in this scope --> /Users/smartgo/.cargo/git/checkouts/rdev-a53ad59d4a4a3444/ea22372/src/lib.rs:374:5 | 374 | _grab(callback) | ^^^^^ not found in this scope For more information about this error, try `rustc --explain E0425`. pub fn grab<T>(callback: T) -> Result<(), GrabError> where T: Fn(Event) -> Option<Event> + 'static, { //_grab(callback) grab(callback) } ``` Continue execution ``` Compiling reqwest v0.11.11 warning: unreachable expression --> libs/hbb_common/src/config.rs:375:9 | 374 | return Self::path(APP_HOME_DIR.read().unwrap().as_str()); | -------------------------------------------------------- any code following this expression is unreachable 375 | / if let Some(path) = dirs_next::home_dir() { 376 | | patch(path) 377 | | } else if let Ok(path) = std::env::current_dir() { 378 | | path 379 | | } else { 380 | | std::env::temp_dir() 381 | | } | |_________^ unreachable expression | = note: `#[warn(unreachable_code)]` on by default warning: unreachable statement --> libs/hbb_common/src/config.rs:392:9 | 389 | return path; | ----------- any code following this expression is unreachable ... 392 | let org = ""; | ^^^^^^^^^^^^^ unreachable statement warning: unreachable statement --> libs/hbb_common/src/config.rs:580:9 | 574 | / return Some( 575 | | rand::thread_rng() 576 | | .gen_range(1_000_000_000..2_000_000_000) 577 | | .to_string(), 578 | | ); | |_____________- any code following this expression is unreachable 579 | } 580 | let mut id = 0u32; | ^^^^^^^^^^^^^^^^^^ unreachable statement Compiling magnum-opus v0.4.0 (https://github.com/SoLongAndThanksForAllThePizza/magnum-opus#6247071a) warning: unused variable: `id` --> libs/hbb_common/src/config.rs:580:17 | 580 | let mut id = 0u32; | ^^ help: if this is intentional, prefix it with an underscore: `_id` | = note: `#[warn(unused_variables)]` on by default Compiling scrap v0.5.0 (/Users/smartgo/rustdesk/libs/scrap) error[E0412]: cannot find type `Frame` in this scope --> libs/scrap/src/common/mod.rs:59:81 | 59 | fn frame<'a>(&'a mut self, timeout: std::time::Duration) -> std::io::Result<Frame<'a>>; | ^^^^^ not found in this scope For more information about this error, try `rustc --explain E0412`. error: could not compile `scrap` due to previous error warning: build failed, waiting for other jobs to finish... ``` I Modify New `pub struct Frame<'a>(&'a [u8]); ` in libs/scrap/src/common/mod.rs Continue execution ``` (base) smartgo@smdeMac-mini rustdesk % VCPKG_ROOT=$HOME/vcpkg ./flutter/ios_arm64.sh Compiling scrap v0.5.0 (/Users/smartgo/rustdesk/libs/scrap) Compiling hbb_common v0.1.0 (/Users/smartgo/rustdesk/libs/hbb_common) warning: unreachable expression --> libs/hbb_common/src/config.rs:375:9 | 374 | return Self::path(APP_HOME_DIR.read().unwrap().as_str()); | -------------------------------------------------------- any code following this expression is unreachable 375 | / if let Some(path) = dirs_next::home_dir() { 376 | | patch(path) 377 | | } else if let Ok(path) = std::env::current_dir() { 378 | | path 379 | | } else { 380 | | std::env::temp_dir() 381 | | } | |_________^ unreachable expression | = note: `#[warn(unreachable_code)]` on by default warning: unreachable statement --> libs/hbb_common/src/config.rs:392:9 | 389 | return path; | ----------- any code following this expression is unreachable ... 392 | let org = ""; | ^^^^^^^^^^^^^ unreachable statement warning: unreachable statement --> libs/hbb_common/src/config.rs:580:9 | 574 | / return Some( 575 | | rand::thread_rng() 576 | | .gen_range(1_000_000_000..2_000_000_000) 577 | | .to_string(), 578 | | ); | |_____________- any code following this expression is unreachable 579 | } 580 | let mut id = 0u32; | ^^^^^^^^^^^^^^^^^^ unreachable statement warning: unused variable: `id` --> libs/hbb_common/src/config.rs:580:17 | 580 | let mut id = 0u32; | ^^ help: if this is intentional, prefix it with an underscore: `_id` | = note: `#[warn(unused_variables)]` on by default Compiling rustdesk v1.2.0 (/Users/smartgo/rustdesk) warning: `hbb_common` (lib) generated 4 warnings warning: dropping unsupported crate type `cdylib` for target `aarch64-apple-ios` error[E0583]: file not found for module `bridge_generated` --> src/lib.rs:27:1 | 27 | mod bridge_generated; | ^^^^^^^^^^^^^^^^^^^^^ | = help: to create the module `bridge_generated`, create file "src/bridge_generated.rs" or "src/bridge_generated/mod.rs" error[E0433]: failed to resolve: could not find `server` in the crate root --> src/client.rs:52:5 | 52 | server::video_service::{SCRAP_X11_REF_URL, SCRAP_X11_REQUIRED}, | ^^^^^^ could not find `server` in the crate root error[E0432]: unresolved import `crate::start_server` --> src/flutter_ffi.rs:17:5 | 17 | use crate::start_server; | ^^^^^^^^^^^^^^^^^^^ no `start_server` in the root error[E0432]: unresolved import `crate::ipc` --> src/ui_cm_interface.rs:13:12 | 13 | use crate::ipc::Data; | ^^^ could not find `ipc` in the crate root error[E0432]: unresolved imports `crate::ipc`, `crate::ipc` --> src/ui_cm_interface.rs:14:12 | 14 | use crate::ipc::{self, new_listener, Connection}; | ^^^ ^^^^ no `ipc` in the root | | | could not find `ipc` in the crate root error[E0432]: unresolved import `crate::ipc` --> src/ui_interface.rs:23:5 | 23 | use crate::ipc; | ^^^^^^^^^^ no `ipc` in the root error[E0432]: unresolved import `crate::platform` --> src/ui_interface.rs:24:42 | 24 | use crate::{common::SOFTWARE_UPDATE_URL, platform}; | ^^^^^^^^ no `platform` in the root error[E0433]: failed to resolve: unresolved import --> src/client.rs:1395:24 | 1395 | crate::platform::get_active_username() | ^^^^^^^^ | | | unresolved import | help: a similar path exists: `cpal::platform` error[E0433]: failed to resolve: could not find `lan` in the crate root --> src/flutter_ffi.rs:936:12 | 936 | crate::lan::send_wol(id) | ^^^ could not find `lan` in the crate root error[E0433]: failed to resolve: could not find `rendezvous_mediator` in the crate root --> src/flutter_ffi.rs:1006:12 | 1006 | crate::rendezvous_mediator::query_online_states(ids, handle_query_onlines) | ^^^^^^^^^^^^^^^^^^^ could not find `rendezvous_mediator` in the crate root error[E0433]: failed to resolve: could not find `lan` in the crate root --> src/ui_interface.rs:650:27 | 650 | allow_err!(crate::lan::discover()); | ^^^ could not find `lan` in the crate root error[E0433]: failed to resolve: unresolved import --> src/ui_interface.rs:770:12 | 770 | crate::platform::is_xfce() | ^^^^^^^^ | | | unresolved import | help: a similar path exists: `cpal::platform` error[E0433]: failed to resolve: unresolved import --> src/ui_session_interface.rs:217:16 | 217 | crate::platform::is_xfce() | ^^^^^^^^ | | | unresolved import | help: a similar path exists: `cpal::platform` error[E0433]: failed to resolve: could not find `ipc` in the crate root --> src/ui_session_interface.rs:1398:30 | 1398 | let mut options = crate::ipc::get_options_async().await; | ^^^ could not find `ipc` in the crate root error[E0433]: failed to resolve: unresolved import --> src/ui_session_interface.rs:1402:22 | 1402 | key = crate::platform::get_license_key(); | ^^^^^^^^ | | | unresolved import | help: a similar path exists: `cpal::platform` error[E0433]: failed to resolve: could not find `ipc` in the crate root --> src/flutter_ffi.rs:703:29 | 703 | send_to_cm(&crate::ipc::Data::Theme(dark)); | ^^^^ not found in `crate::ipc` | help: consider importing one of these items | 1 | use cpal::Data; | 1 | use crate::client::Data; | help: if you import `Data`, refer to it directly | 703 - send_to_cm(&crate::ipc::Data::Theme(dark)); 703 + send_to_cm(&Data::Theme(dark)); | error[E0433]: failed to resolve: could not find `ipc` in the crate root --> src/flutter_ffi.rs:708:29 | 708 | send_to_cm(&crate::ipc::Data::Language(lang)); | ^^^^ not found in `crate::ipc` | help: consider importing one of these items | 1 | use cpal::Data; | 1 | use crate::client::Data; | help: if you import `Data`, refer to it directly | 708 - send_to_cm(&crate::ipc::Data::Language(lang)); 708 + send_to_cm(&Data::Language(lang)); | error[E0425]: cannot find function `key_from_scancode` in crate `rdev` --> src/ui_session_interface.rs:815:25 | 815 | let key = rdev::key_from_scancode(scancode) as RdevKey; | ^^^^^^^^^^^^^^^^^ not found in `rdev` warning: unused import: `TransferJobMeta` --> src/client/io_loop.rs:15:20 | 15 | RemoveJobMeta, TransferJobMeta, | ^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default warning: unused import: `collections::HashMap` --> src/common.rs:2:5 | 2 | collections::HashMap, | ^^^^^^^^^^^^^^^^^^^^ warning: unused import: `decompress` --> src/common.rs:13:43 | 13 | compress::{compress as compress_func, decompress}, | ^^^^^^^^^^ warning: unused import: `message_proto::Hash` --> src/flutter_ffi.rs:14:18 | 14 | use hbb_common::{message_proto::Hash, ResultType}; | ^^^^^^^^^^^^^^^^^^^ warning: unused import: `self` --> src/ui_cm_interface.rs:24:9 | 24 | self, | ^^^^ warning: unused import: `SERVER_KEYBOARD_ENABLED` --> src/ui_session_interface.rs:7:29 | 7 | QualityStatus, KEY_MAP, SERVER_KEYBOARD_ENABLED, | ^^^^^^^^^^^^^^^^^^^^^^^ warning: unused import: `crate::common::IS_X11` --> src/ui_session_interface.rs:9:5 | 9 | use crate::common::IS_X11; | ^^^^^^^^^^^^^^^^^^^^^ warning: unused imports: `EventType`, `KeyboardState` --> src/ui_session_interface.rs:17:19 | 17 | use rdev::{Event, EventType, EventType::*, Key as RdevKey, KeyboardState}; | ^^^^^^^^^ ^^^^^^^^^^^^^ error[E0277]: the trait bound `DartCObject: From<EventToUI>` is not satisfied --> src/flutter.rs:401:47 | 401 | pub fn session_start_(id: &str, event_stream: StreamSink<EventToUI>) -> ResultType<()> { | ^^^^^^^^^^^^^^^^^^^^^ the trait `From<EventToUI>` is not implemented for `DartCObject` | = help: the following other types implement trait `IntoDart`: &str () *const T *mut T Vec<T> Vec<f32> Vec<f64> Vec<i16> and 39 others = note: required because of the requirements on the impl of `Into<DartCObject>` for `EventToUI` = note: required because of the requirements on the impl of `IntoDart` for `EventToUI` note: required by a bound in `StreamSink` --> /Users/smartgo/.cargo/git/checkouts/flutter_rust_bridge-ddba876d3ebb2a1e/e5adce5/frb_rust/src/rust2dart.rs:88:26 | 88 | pub struct StreamSink<T: IntoDart> { | ^^^^^^^^ required by this bound in `StreamSink` error[E0277]: the trait bound `DartCObject: From<EventToUI>` is not satisfied --> src/flutter_ffi.rs:91:33 | 91 | pub fn session_start(events2ui: StreamSink<EventToUI>, id: String) -> ResultType<()> { | ^^^^^^^^^^^^^^^^^^^^^ the trait `From<EventToUI>` is not implemented for `DartCObject` | = help: the following other types implement trait `IntoDart`: &str () *const T *mut T Vec<T> Vec<f32> Vec<f64> Vec<i16> and 39 others = note: required because of the requirements on the impl of `Into<DartCObject>` for `EventToUI` = note: required because of the requirements on the impl of `IntoDart` for `EventToUI` note: required by a bound in `StreamSink` --> /Users/smartgo/.cargo/git/checkouts/flutter_rust_bridge-ddba876d3ebb2a1e/e5adce5/frb_rust/src/rust2dart.rs:88:26 | 88 | pub struct StreamSink<T: IntoDart> { | ^^^^^^^^ required by this bound in `StreamSink` error[E0277]: the trait bound `DartCObject: From<EventToUI>` is not satisfied --> src/flutter.rs:103:41 | 103 | pub event_stream: Arc<RwLock<Option<StreamSink<EventToUI>>>>, | ^^^^^^^^^^^^^^^^^^^^^ the trait `From<EventToUI>` is not implemented for `DartCObject` | = help: the following other types implement trait `IntoDart`: &str () *const T *mut T Vec<T> Vec<f32> Vec<f64> Vec<i16> and 39 others = note: required because of the requirements on the impl of `Into<DartCObject>` for `EventToUI` = note: required because of the requirements on the impl of `IntoDart` for `EventToUI` note: required by a bound in `StreamSink` --> /Users/smartgo/.cargo/git/checkouts/flutter_rust_bridge-ddba876d3ebb2a1e/e5adce5/frb_rust/src/rust2dart.rs:88:26 | 88 | pub struct StreamSink<T: IntoDart> { | ^^^^^^^^ required by this bound in `StreamSink` Some errors have detailed explanations: E0277, E0425, E0432, E0433, E0583. For more information about an error, try `rustc --explain E0277`. warning: `rustdesk` (lib) generated 9 warnings ``` Can you provide a detailed document? The current document cannot be compiled successfully. Thank you
deekerman 2026-02-20 23:12:59 -05:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@rustdesk commented on GitHub (Oct 25, 2022):

#763

@rustdesk commented on GitHub (Oct 25, 2022): #763
Author
Owner

@cvabm commented on GitHub (Oct 26, 2022):

I build android facing the same error,can't next step

@cvabm commented on GitHub (Oct 26, 2022): I build android facing the same error,can't next step
Author
Owner

@modgsan commented on GitHub (Nov 20, 2022):

I build android facing the same error,can't next step
@cvabm Have you successfully compiled the android client? I have same error

@modgsan commented on GitHub (Nov 20, 2022): > I build android facing the same error,can't next step @cvabm Have you successfully compiled the android client? I have same error
Author
Owner

@cvabm commented on GitHub (Nov 20, 2022):

I build android facing the same error,can't next step
@cvabm Have you successfully compiled the android client? I have same error

I successfully compiled, please refer toAndroid Build

@cvabm commented on GitHub (Nov 20, 2022): > > I build android facing the same error,can't next step > > @cvabm Have you successfully compiled the android client? I have same error I successfully compiled, please refer to[Android Build](https://cvabm.github.io/android/open_project/rustdesk)
Author
Owner

@Jwy-jump commented on GitHub (Sep 19, 2023):

@cvabm the link is out of date, can you give me more details?

@Jwy-jump commented on GitHub (Sep 19, 2023): @cvabm the link is out of date, can you give me more details?
Author
Owner

@cvabm commented on GitHub (Sep 19, 2023):

@cvabm the link is out of date, can you give me more details?

https://gist.github.com/cvabm/79e1037ac9a786f2fd79af5e5e5b5b1c

@cvabm commented on GitHub (Sep 19, 2023): > @cvabm the link is out of date, can you give me more details? https://gist.github.com/cvabm/79e1037ac9a786f2fd79af5e5e5b5b1c
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/rustdesk-rustdesk#883
No description provided.