Closed huang12zheng closed 1 year ago
Hmm looks like a bug.
/cc @rogurotus who implemented the wonderful Opaque feature - a naive guess, maybe we forget to trigger code generation for this case?
I was unable to reproduce the error. Can I take a look at the generated Db (frb api class)
https://github.com/huang12zheng/flutter_rust_bridge_template/tree/reproduce_863
you can find object from native/src/surreal.rs
To be honest, I just saw Opaque today.
I probably don't understand the code generation properly
@rogurotus
flutter_rust_bridge/frb_codegen/src/generator/rust/mod.rs line - 139
Yes, this is indeed a bug. related functions are generated for arguments, not for return type.
lines += distinct_input_types (should be distinct_output_types)
.iter()
.map(|f| self.generate_related_funcs(f, ir_file))
.collect();
until fixed, you can create an empty function:
pub fn touch(opauqe: Opaque<Surreal<Db>>) {}
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new issue.
I'm not sure if that mode is supported. Or how to support it