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

Modernize and enhance the libfastrace C++ API #3

Open
ethercflow opened this issue Oct 19, 2024 · 0 comments · May be fixed by #4
Open

Modernize and enhance the libfastrace C++ API #3

ethercflow opened this issue Oct 19, 2024 · 0 comments · May be fixed by #4
Assignees

Comments

@ethercflow
Copy link
Contributor

I think we need to improve the C++ interface of libfastrace to make it more robust, safer, and easier to use. This issue tracks the following enhancements:

  1. Replace C-style API calls with idiomatic C++ wrappers
  2. Implement RAII principles for better resource management
  3. Add move semantics to key classes (Span, LocalSpan)
  4. Improve type safety in Rust-C++ interoperability
  5. Enhance property handling with vector-based APIs
  6. Refactor type conversions to use modern C++ practices
  7. Update example code to demonstrate new API usage
  8. Improve overall code readability and maintainability

Acceptance Criteria:

  • All C++ classes (Span, LocalSpan, etc.) have proper RAII implementations
  • Move semantics are correctly implemented for transferable objects
  • The new API is type-safe and prevents common usage errors
  • Example code compiles and runs correctly with the new API
  • No performance regression in core operations
  • Code passes all existing tests and any new tests added for new functionality
  • Documentation is updated to reflect API changes

Additional Notes:

  • This refactoring should not change the underlying functionality of libfastrace
  • Backward compatibility should be considered, with a clear migration path for existing users if breaking changes are introduced
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant