| 1 |
const std = @import("std"); |
| 2 |
const instruments = @import("./instruments/root.zig"); |
| 3 |
const environment = @import("./environment/root.zig"); |
| 4 |
|
| 5 |
const Instrument = instruments.Instrument; |
| 6 |
const Environment = environment.Environment; |
| 7 |
|
| 8 |
pub const InstrumentHooks = struct { |
| 9 |
instrument: Instrument, |
| 10 |
environment: Environment, |
| 11 |
|
| 12 |
const Self = @This(); |
| 13 |
|
| 14 |
pub fn init(allocator: std.mem.Allocator) !Self { |
| 15 |
return .{ |
| 16 |
.instrument = try Instrument.init(allocator), |
| 17 |
.environment = Environment.init(allocator), |
| 18 |
}; |
| 19 |
} |
| 20 |
|
| 21 |
pub fn deinit(self: *Self) void { |
| 22 |
self.instrument.deinit(); |
| 23 |
self.environment.deinit(); |
| 24 |
} |
| 25 |
}; |