We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 17740a6 commit a908729Copy full SHA for a908729
rustler_codegen/src/init.rs
@@ -137,22 +137,12 @@ impl From<InitMacroInput> for proc_macro2::TokenStream {
137
};
138
139
let nif_init_name = if cfg!(feature = "staticlib") {
140
- let lib_name = if let Ok(name) = std::env::var("CARGO_CRATE_NAME") {
141
- if std::env::var("CARGO_TARGET_OS").unwrap_or_else(|_| "unknown".to_string())
142
- == "windows"
143
- {
144
- name
145
- } else {
146
- format!("lib{name}")
147
- }
148
149
- "rustler_pkg".to_string()
150
- };
151
-
+ let lib_name = std::env::var("CARGO_CRATE_NAME").unwrap();
152
format!("{lib_name}_nif_init")
153
} else {
154
"nif_init".to_string()
155
+
156
let nif_init_name = Ident::new(&nif_init_name, Span::call_site());
157
158
quote! {
0 commit comments