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

book: document splitting a project into crates #763

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Be-ing
Copy link
Contributor

@Be-ing Be-ing commented Nov 29, 2023

depends on #598

@Be-ing Be-ing marked this pull request as draft November 29, 2023 10:14
in Rust ([Cargo is your only build system](../getting-started/4-cargo-executable.md)), simply add the crates as
dependencies of the top level binary crate in its Cargo.toml file.

If your `main` function is in C++, you can only link one staticlib Rust crate into C++, otherwise linking
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't know if referring to the CXX section on linking between C++ and Rust is useful too? https://cxx.rs/build/other.html#linking-the-c-and-rust-together

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think linking that would be too much information which isn't very relevant for the audience. Though that was helpful to realize extern crate is more appropriate than pub use

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