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

Add hdrs and includes attributes to rust_static_library #2173

Closed

Conversation

daivinhtran
Copy link
Contributor

@daivinhtran daivinhtran commented Sep 28, 2023

This PR exposes hdrs and includes similar to cc_library rule to allow cc rdeps to include the rust static library interface (headers) in the source such as

#include <rusty_lib_header.h>

The header file needs to use extern "C" to tell the C++ compiler that the function it is expecting won't be name-mangled. See the example for a working example.

@daivinhtran daivinhtran force-pushed the add-hdrs-and-includes-attrs branch 5 times, most recently from 9dec5f3 to 6cc8c47 Compare September 28, 2023 15:38
@daivinhtran daivinhtran force-pushed the add-hdrs-and-includes-attrs branch from 6cc8c47 to 184a9b4 Compare September 28, 2023 15:47
@daivinhtran daivinhtran force-pushed the add-hdrs-and-includes-attrs branch from 1eb8d91 to f7cc416 Compare September 28, 2023 15:57
@daivinhtran daivinhtran closed this Oct 6, 2023
@daivinhtran daivinhtran deleted the add-hdrs-and-includes-attrs branch October 9, 2023 14:22
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.

1 participant