Using zome_fn with pub use crate::my_mod::my_function;

I’d like to put a function into a crate module and have the zome_fn decorate the reference to the function.

pub use crate::collective::create_collective;

When I attempt this, I get a compile error:

error: cannot find attribute `zome_fn` in this scope
   --> src/
175 |     #[zome_fn("hc_public")]
    |       ^^^^^^^

It is possible to refer a zome_fn to a function in another module?

What I normally do is just wrap it.

pub create_collective(arg: Foo) -> ZomeApiResult<Bar> {

You can use the same name because it’s in a different module.


Perfect! Thank you!