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

Observe API C++ SDK #139

Open
G4Vi opened this issue Nov 9, 2023 · 2 comments
Open

Observe API C++ SDK #139

G4Vi opened this issue Nov 9, 2023 · 2 comments

Comments

@G4Vi
Copy link
Contributor

G4Vi commented Nov 9, 2023

Currently the observe api may be used in C++, but requires using raw pointers to pass strings. It would nice to be able to use std::string to pass strings instead.

@nilslice
Copy link
Member

nilslice commented Nov 9, 2023

could we wrap the C API in a CPP SDK? we know we want to support C, with as few dependencies as possible.

@G4Vi
Copy link
Contributor Author

G4Vi commented Nov 10, 2023

The C API is kind of two APIs wrapped into one right now. The imports from dylibso:observe/api that pass strings as ptr and length separately as uint32_ts and the wrappers that take null terminated strings. We'd want to use the former to implement the c++ sdk as the common std::string implementations store the length of the string so it doesn't need to be computed again.

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

No branches or pull requests

2 participants