You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With this file I get an error: "'FfiPoll_u32_Tag' is going to be declared twice".
As far as I understand, this is due to the name of the FfiPoll_u32 struct field "tag" is converted to the same name as the enum.
I tried different renaming configurations and they didn't help me.
The test application code:
use std::time::Duration;use async_ffi::{FfiFuture,FutureExt};use tokio::time::sleep;#[no_mangle]pubextern"C"fnwork(arg:u32) -> FfiFuture<u32>{asyncmove{let ret = do_some_io(arg).await;do_some_sleep(42).await;
ret
}.into_ffi()}asyncfndo_some_io(arg:u32) -> u32{println!("res {arg}");
arg + 2}asyncfndo_some_sleep(secs:u32){let _ = sleep(Duration::from_secs(secs.into()));}
I'm trying to generate header file for a test with async-ffi crate and getting such a result:
With this file I get an error: "'FfiPoll_u32_Tag' is going to be declared twice".
As far as I understand, this is due to the name of the FfiPoll_u32 struct field "tag" is converted to the same name as the enum.
I tried different renaming configurations and they didn't help me.
The test application code:
And the
cbindgen.toml
fileOther information:
The text was updated successfully, but these errors were encountered: