| 1 | export fn foo() void {} |
| 2 | export const bar: u32 = 123; |
| 3 | export const other: u32 = 456; |
| 4 | const does_exports = { |
| 5 | @export(&bar, .{ .name = "bar" }); |
| 6 | @export(&other, .{ .name = "other" }); |
| 7 | }; |
| 8 | comptime { |
| 9 | _ = does_exports; |
| 10 | } |
| 11 | pub fn main() !void { |
| 12 | const S = struct { |
| 13 | extern fn foo() void; |
| 14 | extern const bar: u32; |
| 15 | extern const other: u32; |
| 16 | }; |
| 17 | S.foo(); |
| 18 | var stdout_writer = std.Io.File.stdout().writerStreaming(io, &.{}); |
| 19 | try stdout_writer.interface.print("{} {}\n", .{ S.bar, S.other }); |
| 20 | } |
| 21 | const std = @import("std"); |
| 22 | const io = std.Io.Threaded.global_single_threaded.io(); |