-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply input module visibility to output module (#284)
This commit makes `#[swift_bridge::bridge]` respect the bridge module's visibility. Here's an example of using this. ```rust // enums.rs // NOTE that we can now use `pub mod`, `pub(crate) mod`, etc #[swift_bridge::bridge] pub mod ffi { enum MyEnum { VariantA, VariantB, VariantC, } } // lib.rs mod enums; use enums::ffi::MyEnum; #[swift_bridge::bridge] mod ffi { #[swift_bridge(already_declared)] enum MyEnum {} extern "Rust" { fn getEnum() -> MyEnum; } } ``` Closes #252.
- Loading branch information
Showing
3 changed files
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters