Skip to content

Can declarative modules work with inline included files? #4312

Discussion options

You must be logged in to vote

We can't see through the include! macro.

What you can instead do is use #[pymodule_export]:

mod bar;

#[pyo3::pymodule]
pub mod foo_module {
    #[pymodule_export]
    use bar::bar_module;
}

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@austin362667
Comment options

Answer selected by austin362667
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants