I'm trying to statically import another Zig library I have in another local directory as a module into my WASM module. For example, I would like to be able to access my external module foo in the following manner: const foo = @import("foo"). I understand how to do this using the zig build system when compiling to native targets, but I'm not sure how to do this for a wasm32-freestanding target?
As I understand when you compiler to WASM you use a command such as: zig build-lib -target wasm32-freestanding src/lib.zig, rather than zig build, so does not reference any build.zig file. I feel like there is a relatively straightforward solution here, but I also might be conceptually completely misunderstanding the build system here?