I'm trying to use cudaz but I don't understand how the linking works here - https://github.com/akhildevelops/cudaz/blob/304adc4ad82f14689aa1d311bd601da30372b729/example/increment/build.zig#L11
I don't see a module that lines up with that value. There is no file called cudaz.zig or even Cudaz type somewhere.
In build.zig:
// Point to cudaz dependency
const cudaz_dep = b.dependency("cudaz", .{});
// Fetch and add the module from cudaz dependency
const cudaz_module = cudaz_dep.module("cudaz");
exe.root_module.addImport("cudaz", cudaz_module);
I haven't seen a dependency linked like this. I tried to copy/paste this code and it complains there is no addImport in root_module.
This module gets imported here - https://github.com/akhildevelops/cudaz/blob/304adc4ad82f14689aa1d311bd601da30372b729/example/increment/src/main.zig#L2 - but I don't understand where the other values are coming from:
const Cuda = @import("cudaz");
const CuDevice = Cuda.Device;
const CuCompile = Cuda.Compile;
const CuLaunchConfig = Cuda.LaunchConfig;
Where is Device, Compile, LaunchConfig coming from? My running theory is that cudaz is some sort of synthetic module created in build.zig. Please correct my understanding.