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

Fix condition of the function to be targeted. #66

Merged
merged 3 commits into from
Jan 11, 2024
Merged

Conversation

hadashiA
Copy link
Contributor

@hadashiA hadashiA commented Jan 4, 2024

refs: #58, #60 (comment)

Besides using no_mangle, it seems that the #[export_name] attribute can emit symbol names without mangling.
Therefore, we would like to support this method of specification.
And only with #[no_mangle] or #[export_name = ...] are included. Otherwise, it print a message.

e.g)

#[export_name = "foo_bar"]
pub extern "C" fn foo()  {
    // ...
}
[DllImport(__DllName, EntryPoint = "foo_bar", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern int foo();

@hadashiA hadashiA marked this pull request as draft January 4, 2024 10:48
@hadashiA hadashiA marked this pull request as ready for review January 5, 2024 02:49
@hadashiA hadashiA changed the title Support #[export_name = "..."] Fix condition of the function to be targeted. Jan 5, 2024
@neuecc neuecc merged commit cb9844a into main Jan 11, 2024
2 checks passed
@neuecc neuecc deleted the hadashiA/export-name branch January 11, 2024 08:17
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

Successfully merging this pull request may close these issues.

2 participants