Other platforms don't have this because they may not be char -- e.g. Windows uses wide characters. I think you want CStr::to_bytes() instead. Or even better, go directly to CStr::as_ptr().
It will have to be an allocated CString, since it needs to ensure there's a '\0' at the end. CString::new() can convert from both String and &str. Having allocation is not nice for static probes though, so a pointer and length pair would be preferable. Or with probe "semaphore" support, you could gate the heavier argument preparation to only trigger when probes are in use.
I've got pointer+length working (you can get that from passing &string). Having c string would be convenient though, since every tool out there can use that. I'd like to add support for rust string to bcc and stap,but still c string is nice-to-have.