Skip to content

issues compiling for tvOS #671

Open
Open
@EbrahimTahernejad

Description

@EbrahimTahernejad

Hello, I've been trying to compile this code for tvos as well, well, first I added tvos to cfg rules of iOS, and then I upgraded quinn and quinn-proto to latest versions (latest version supports visionOS and tvOS):

not I'm having issues with this while compiling:

error[E0599]: no function or associated item named `new_with_session_id_generator` found for struct `rustls::ClientConnection` in the current scope
   --> /Users/ebi/.cargo/git/checkouts/tokio-rustls-865aaf7c68e4558e/6b9af8a/src/lib.rs:129:51
    |
129 | ...lientConnection::new_with_session_id_generator(
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `ClientConnection`
    |
note: if you're trying to build a new `rustls::ClientConnection`, consider using `rustls::ClientConnection::new` which returns `Result<rustls::ClientConnection, rustls::Error>`
   --> /Users/ebi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustls-0.23.21/src/client/client_conn.rs:689:9
    |
689 | ...   pub fn new(config: Arc<ClientConfig>, name: ServerName<'static>) -> Result<Self, Error...
    |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

   Compiling p384 v0.13.0
error[E0107]: struct takes 3 generic arguments but 2 generic arguments were supplied
  --> /Users/ebi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tower-0.4.13/src/ready_cache/cache.rs:65:25
   |
65 |     pending_cancel_txs: IndexMap<K, CancelTx>,
   |                         ^^^^^^^^ -  -------- supplied 2 generic arguments
   |                         |
   |                         expected 3 generic arguments
   |
note: struct defined here, with 3 generic parameters: `K`, `V`, `S`
  --> /Users/ebi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/indexmap-1.9.3/src/map.rs:76:12
   |
76 | pub struct IndexMap<K, V, S> {
   |            ^^^^^^^^ -  -  -
help: add missing generic argument
   |
65 |     pending_cancel_txs: IndexMap<K, CancelTx, S>,
   |                                             +++

error[E0107]: struct takes 3 generic arguments but 2 generic arguments were supplied
  --> /Users/ebi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tower-0.4.13/src/ready_cache/cache.rs:73:12
   |
73 |     ready: IndexMap<K, (S, CancelPair)>,
   |            ^^^^^^^^ -  --------------- supplied 2 generic arguments
   |            |
   |            expected 3 generic arguments
   |
note: struct defined here, with 3 generic parameters: `K`, `V`, `S`
  --> /Users/ebi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/indexmap-1.9.3/src/map.rs:76:12
   |
76 | pub struct IndexMap<K, V, S> {
   |            ^^^^^^^^ -  -  -
help: add missing generic argument
   |
73 |     ready: IndexMap<K, (S, CancelPair), S>,
   |                                       +++

For more information about this error, try `rustc --explain E0599`.
error: could not compile `tokio-rustls` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
For more information about this error, try `rustc --explain E0107`.
error: could not compile `tower` (lib) due to 2 previous errors

Then I saw you're replacing rustls with an older version as you've made adjustments to it for utls.
I'm kinda new to rust so I'd appriciate some help regarding making this compilable for tvOS

PATCHED:

nix = { git = "https://github.com/nix-rust/nix.git", rev = "52f43802c94867ae884a418dd4800855b5898d58" 

Replaced:

quinn = { version = "0.11.6", default-features = false, features = ["futures-io", "runtime-tokio", "rustls"] }
quinn-proto = "0.11.9"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions