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

Support #![cxx::bridge] inner attribute #903

Open
dtolnay opened this issue Jul 23, 2021 · 0 comments
Open

Support #![cxx::bridge] inner attribute #903

dtolnay opened this issue Jul 23, 2021 · 0 comments
Labels
blocked Can't make progress in the immediate term

Comments

@dtolnay
Copy link
Owner

dtolnay commented Jul 23, 2021

A common idiom in my codebase is:

// lib.rs

mod ffi;
/* ... */
// ffi.rs

pub use self::ffi::*;

#[cxx::bridge]
mod ffi {
    /* ... */
}
// whatever.rs

use crate::ffi::Whatever;
/* ... */

It would be convenient for the ffi.rs to be expressible as:

// ffi.rs

#![cxx::bridge]

/* the usual contents of `mod ffi {...}` */

For now this would be blocked on rust-lang/rust#54726.

@dtolnay dtolnay added the blocked Can't make progress in the immediate term label Sep 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Can't make progress in the immediate term
Projects
None yet
Development

No branches or pull requests

1 participant