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

Separate lib and bin dependencies #1141

Closed
wgreenberg opened this issue May 15, 2024 · 5 comments · Fixed by #1145
Closed

Separate lib and bin dependencies #1141

wgreenberg opened this issue May 15, 2024 · 5 comments · Fixed by #1145
Labels
enhancement New feature or request refactor
Milestone

Comments

@wgreenberg
Copy link

Describe the feature you'd like
Separate dependencies of trippy's public library components and it's CLI binary tool. This way, when trying to use trippy within another rust project, I can cargo add trippy without its version of clap (or any of the other TUI/CLI related dependencies) clashing with my own.

Describe alternatives you've considered
I'm not sure there is an alternative, besides me not using trippy as a library.

Additional context
I'm trying to use trippy's tracer within another rust project.

@fujiapple852
Copy link
Owner

Hi there @wgreenberg and thank you for raising this topic.

I previously attempted to split the library and bin out as you describe (see #640) but eventually abandoned the PR as it became very out of date.

I’m still undecided on whether this separation makes sense for Trippy, which will mostly be used as a stand-alone tool rather than a library, but I’m open to being persuaded.

what is your use case for using Trippy as a library?

@fujiapple852 fujiapple852 added enhancement New feature or request refactor and removed triage labels May 16, 2024
@wgreenberg
Copy link
Author

@fujiapple852 I'm working on software that detects machine-in-the-middle attacks via timing analysis (https://arxiv.org/abs/2308.09213) written in rust, and I'd love to be able to use trippy in-process rather than having to start something like https://github.com/heistp/irtt as a child process.

@fujiapple852 fujiapple852 self-assigned this May 17, 2024
@fujiapple852 fujiapple852 added this to the 0.11.0 milestone May 17, 2024
@fujiapple852
Copy link
Owner

@wgreenberg this has been merged and the new crates will be published to crates.io in the 0.11.0 release. Note that the public API of trippy-core should be considered highly unstable for the moment, it will change in the future (it was created to support the Trippy tool only, it was never designed for public consumption).

fujiapple852 added a commit that referenced this issue May 18, 2024
fujiapple852 added a commit that referenced this issue May 18, 2024
@c-git
Copy link
Collaborator

c-git commented May 19, 2024

@fujiapple852 thank you very much for taking the time to do the split. I think even if it changes often it will still provide value.

@wgreenberg
Copy link
Author

thanks a ton @fujiapple852! agreed, even if it's not stable yet this'll be helpful.

@fujiapple852 fujiapple852 removed their assignment Jun 18, 2024
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Aug 12, 2024
[0.11.0] - 2024-08-11

Added

- Added NAT detection for `IPv4/udp/dublin` ([#1104](fujiapple852/trippy#1104))
- Added public API ([#1192](fujiapple852/trippy#1192))
- Added support for NAT detection (`N`) column ([#1219](fujiapple852/trippy#1219))
- Added support for last icmp packet type (`T`) column ([#1105](fujiapple852/trippy#1105))
- Added support for last icmp packet code (`C`) column ([#1109](fujiapple852/trippy#1109))
- Added support for the probe failure count (`f`) column ([#1258](fujiapple852/trippy#1258))
- Added settings dialog tab hotkeys ([#1217](fujiapple852/trippy#1217))
- Added `--dns-ttl` flag to allow refreshing the reverse DNS
  results ([#1233](fujiapple852/trippy#1233))
- Added `--generate-man` flag for generating [ROFF](https://en.wikipedia.org/wiki/Roff_(software)) man
  page ([#85](fujiapple852/trippy#85))
- Added Ubuntu PPA package ([#859](fujiapple852/trippy#859))
- Added Chocolatey package ([#572](fujiapple852/trippy#572))

Changed

- [BREAKING CHANGE] Changed initial sequence to be `33434` ([#1203](fujiapple852/trippy#1203))
- [BREAKING CHANGE] Renamed `tui-max-[samples|flows]`
  as `max-[samples|flows]` ([#1187](fujiapple852/trippy#1187))
- Separated library and binary crates ([#1141](fujiapple852/trippy#1141))
- Record `icmp` packet code ([#734](fujiapple852/trippy#734))
- Transient error handling for `IPv4` on macOS, Linux &
  Windows ([#1255](fujiapple852/trippy#1255))
- Improved error messages ([#1150](fujiapple852/trippy#1150))
- Revamp the help dialog ([#1260](fujiapple852/trippy#1260))

Fixed

- Fixed `DestinationUnreachable` incorrectly assumed to come from target
  host ([#1225](fujiapple852/trippy#1225))
- Fixed incorrect target hop calculation ([#1226](fujiapple852/trippy#1226))
- Do not conflate `AddressInUse` and `AddrNotAvailable`
  errors ([#1246](fujiapple852/trippy#1246))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants