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