forked from mirrors/gecko-dev
- Added `--enable-uniffi-fixtures` flag. When set, we will compile in the UniFFI test fixtures into our shared Rust crate and eventually into `libxul`. - Vendoring in the Rust crates needed for `uniffi-bindgen-gecko-js` Differential Revision: https://phabricator.services.mozilla.com/D144467
25 lines
329 B
Rust
25 lines
329 B
Rust
use extend::ext;
|
|
use async_trait::async_trait;
|
|
|
|
#[ext]
|
|
#[async_trait]
|
|
impl String {
|
|
async fn foo() -> usize {
|
|
1
|
|
}
|
|
}
|
|
|
|
#[ext]
|
|
#[async_trait]
|
|
pub impl i32 {
|
|
async fn bar() -> usize {
|
|
1
|
|
}
|
|
}
|
|
|
|
async fn foo() {
|
|
let _: usize = String::foo().await;
|
|
let _: usize = i32::bar().await;
|
|
}
|
|
|
|
fn main() {}
|