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

Fix ios and android builds #90

Merged
merged 7 commits into from
Jul 23, 2024

Commits on Jul 23, 2024

  1. fix android and ios build

    When adding support for async send/recv apis in tun2proxy#87, ios and android builds got broken with following error
    
        error[E0433]: failed to resolve: use of undeclared crate or module `io`
    
    Root cause:
    Both ios and android platform code did not import std::io::self which caused it to fail.
    
    Updated it to use full path to fix it
    kp-mariappan-ramasamy committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    669bcf3 View commit details
    Browse the repository at this point in the history
  2. ci: add test for android

    Used cargo ndk which makes compiling for android code smoother.
    https://github.com/bbqsrc/cargo-ndk
    kp-mariappan-ramasamy committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    ddcba15 View commit details
    Browse the repository at this point in the history
  3. ci: add test for iOS

    Used cargo-lipo, which helps in compiling for iOS target.
    https://github.com/TimNN/cargo-lipo
    kp-mariappan-ramasamy committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    160e957 View commit details
    Browse the repository at this point in the history
  4. Update rust.yml

    ssrlive authored and kp-mariappan-ramasamy committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    c6932d3 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    903e9af View commit details
    Browse the repository at this point in the history
  6. Fix cargo clippy warnings for android for ios

    Errors:
    
     warning: unused imports: `ipaddr_to_sockaddr`, `sockaddr_union`
      --> src/platform/posix/mod.rs:18:27
       |
    18 | pub(crate) use sockaddr::{ipaddr_to_sockaddr, sockaddr_union};
       |                           ^^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^
       |
       = note: `#[warn(unused_imports)]` on by default
    
    warning: function `ipaddr_to_sockaddr` is never used
      --> src/platform/posix/sockaddr.rs:63:15
       |
    63 | pub unsafe fn ipaddr_to_sockaddr<T>(
       |               ^^^^^^^^^^^^^^^^^^
       |
       = note: `#[warn(dead_code)]` on by default
    
    error: this expression creates a reference which is immediately dereferenced by the compiler
      --> src/platform/android/mod.rs:29:17
       |
    29 |     Device::new(&configuration)
       |                 ^^^^^^^^^^^^^^ help: change this to: `configuration`
    
    error: this expression creates a reference which is immediately dereferenced by the compiler
      --> src/platform/ios/mod.rs:58:17
       |
    58 |     Device::new(&configuration)
       |                 ^^^^^^^^^^^^^^ help: change this to: `configuration`
    kp-mariappan-ramasamy committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    31b8efe View commit details
    Browse the repository at this point in the history
  7. Bump version 2.0.4

    ssrlive authored Jul 23, 2024
    Configuration menu
    Copy the full SHA
    6f68b48 View commit details
    Browse the repository at this point in the history