pkgid => crate_id
to_c_str().with_ref() => with_c_str()