Skip to content

feat: fix minimal crates and update dependencies #19

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

Merged
merged 31 commits into from
May 5, 2025

Conversation

dignifiedquire
Copy link
Contributor

@dignifiedquire dignifiedquire commented Apr 3, 2025

Copy link

github-actions bot commented Apr 3, 2025

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/net-tools/pr/19/docs/net_tools/

Last updated: 2025-05-05T09:56:51Z

@n0bot n0bot bot added this to iroh Apr 3, 2025
@github-project-automation github-project-automation bot moved this to 🏗 In progress in iroh Apr 3, 2025
@dignifiedquire
Copy link
Contributor Author

@link2xt I am trying to reduce the chaos that is rtnetlink, could you check if this version still works for you?

link2xt added a commit to chatmail/core that referenced this pull request Apr 7, 2025
@link2xt
Copy link
Contributor

link2xt commented Apr 7, 2025

This at least compiles in chatmail/core#6687
I tested than I can build Android application with this change.

I also tested that backup transfer works.

@dignifiedquire
Copy link
Contributor Author

thanks @link2xt that's great news, as this means we can stop carrying two different versions of netlink

@dignifiedquire
Copy link
Contributor Author

This is currently blocked on a release of rust-netlink/netlink-packet-route#161 to restore android

@link2xt
Copy link
Contributor

link2xt commented Apr 30, 2025

There is now a netlink-packet-route 0.23.0, but rtnetlink needs an update of netlink-packet-route dependency:
rust-netlink/rtnetlink#103

@dignifiedquire
Copy link
Contributor Author

@link2xt good news, I managed to just inline the parts of rtnetlink directly that we need, please test

@link2xt
Copy link
Contributor

link2xt commented May 2, 2025

I updated PR chatmail/core#6687 and built my Android.
It compiled and backup transfer from Android to existing desktop works.

@dignifiedquire dignifiedquire changed the title chore: fix minimal crates and update igd-next feat: fix minimal crates and update dependencies May 5, 2025
Copy link
Member

@matheus23 matheus23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can just barely squint at the code, I'm really unfamiliar with netlink and such code in general. So looking at both the old and new code I feel a little out of depth, but I can comment on what I was squinting at I guess, and it was fine.

}

#[cfg(not(target_os = "android"))]
async fn default_route_netlink() -> Result<Option<DefaultRouteDetails>, Error> {
mod sane {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mod android and mod sane 🙃 😂

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

somewhere I have to express my disgust with the android platform chaos, pretending to be linux, but not being it

Comment on lines +305 to +306
#[cfg(any(target_os = "android", test))]
fn parse_android_ip_route(stdout: &str) -> Option<&str> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should move this into mod android and make mod android cfg(test) as well (and just run it in the test once).
(How flaky can running shell commands be?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't run tests with target_os=android which is why I have this work around

@dignifiedquire dignifiedquire merged commit ce78a51 into main May 5, 2025
27 checks passed
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in iroh May 5, 2025
github-merge-queue bot pushed a commit to n0-computer/iroh that referenced this pull request May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

4 participants