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

Add support for Rust #85

Open
alegrey91 opened this issue Feb 4, 2025 · 0 comments
Open

Add support for Rust #85

alegrey91 opened this issue Feb 4, 2025 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed question Further information is requested

Comments

@alegrey91
Copy link
Owner

Currently harpoon supports tracing Go projects only.
This is because specifically for unit tests we need to build them in order to trace their syscalls.
A nice improvement would be to bring support also for Rust which works similar to Go with tests management.
What we should do is to implement an interface with at least the Build() method.
Then all the languages will have their own way to build binaries (currently for Go we use: go test -gcflags="all -N -l" -c ./path/to/package -o path/bin_name).
For Rust I've found this discussion that will allow to build its test binaries without running them (https://stackoverflow.com/questions/64397782/how-can-i-build-standalone-test-binary-to-run-under-a-debugger). Specifically the command we should use (needs to be verified) is the follow: cargo test --no-run.
That said, additionally to this, we should add the syscall sets needed for Rust (respectively for static and dynamic binaries at least).
This should bring support for Rust.

@alegrey91 alegrey91 added enhancement New feature or request help wanted Extra attention is needed question Further information is requested labels Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant