Standard escape codes are prefixed with Escape:
- Ctrl-Key:
^[ - Octal:
\033 - Unicode:
\u001b - Hexadecimal:
\x1B - Decimal:
27
| const std = @import("std"); | |
| const net = std.net; | |
| const StreamServer = net.StreamServer; | |
| const Options = StreamServer.Options; | |
| const Address = net.Address; | |
| pub fn main() anyerror!void { | |
| const address = Address.initIp4([4]u8{ 127, 0, 0, 1 }, 8080); | |
| var stream = StreamServer.init(Options{ .reuse_address = true }); | |
| defer stream.deinit(); |
In case anyone else wants to play with Zig on webassembly, here's what you need to do to make it work on a mac today.
You'll need LLVM to output to the WASM target. This has just been added by default in trunk, so if LLVM >7 is available, you might be able to just brew install llvm.
If you have wasm support already you should see:
$ llc --version