-
Notifications
You must be signed in to change notification settings - Fork 10
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
Using the library in stable rust #9
Comments
First off, I'm pleased that someone is still interested in this! 😄 Unfortunately, I don't see a real path forward without You could do a bit of external C code already, using the original sdt.h in a function that Rust can call as FFI, but that means having a function call for every probe even when disabled. Maybe LTO could inline that -- I'm not sure. There's an alternate rust-usdt which is a compiler plugin instead, but that's a nightly feature too, and it still needs |
@tailhook FYI I put together a sample to show how you wrap a C based USDT probe into a rust stable build |
Per #15, this now works on beta without unstable features, so it will be stable in Rust 1.59! |
Is there any chance this kind of library be available for stable rust? It's ugly to use nightly just for adding USDT.
I don't know how this works internally to figure out way on my own. But maybe we can use some attributes like
link_section
for markers (or is it unstable too?). Or just use a piece of C code for embedding asm instead of usingfeature(asm)
?The text was updated successfully, but these errors were encountered: