1export fn foo() void {}
2export const bar: u32 = 123;
3export const other: u32 = 456;
4const does_exports = {
5 @export(&bar, .{ .name = "bar" });
6 @export(&other, .{ .name = "other" });
7};
8comptime {
9 _ = does_exports;
10}
11pub 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}
21const std = @import("std");
22const io = std.Io.Threaded.global_single_threaded.io();