There’s a package that allows you to write something like:
@export function foo() ...
InlineExports.jl
Works for Julia v1.9.3