Skip to content

0.15.2-style Hello World fails #9

@smlavine

Description

@smlavine

Attempting to run the following example:

const std = @import("std");

pub fn main() !void {
    var stdout_buffer: [1024]u8 = undefined;
    var stdout_writer = std.fs.File.stdout().writer(&stdout_buffer);
    const stdout = &stdout_writer.interface;

    try stdout.print("Hello, World!\n", .{});

    try stdout.flush(); // Don't forget to flush!
}

fails with the following message:

Compiling...

error: WriteFailed


---
exit with exit code 1
---

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions