I begin to learn Zig through this project. But I found that this project can not be compiled with the latest Zig compiler.
I'm trying to fix this issue and it should be compiled successfully with the Zig compiler of version 0.15.2.
This project is a Zig implementation of a simple telnet client.
Telnet, one of the earliest internet protocols, is used to provide a bidirectional interactive text-based communication facility, primarily over a terminal interface, allowing users to connect to a remote host or server.
Zig is a general-purpose programming language designed for robustness, optimality, and clarity, primarily aimed at maintaining performance and improving upon concepts from C.
This implementation is not as feature-rich and customizable as the inetutils implementation but aims to cover the same feature set as the curl implementation.
This project initially helped me to learn and evaluate Zig. I documented my insights and reflections in a blog post found here.
- Basic telnet protocol functionality
- Install the Zig compiler
- Run
zig buildto build the project - Run
zig build runto run the telnet client (or use just)
Run with Zig:
zig build run -- telnet://horizons.jpl.nasa.gov:6775Or run the executable directly (after building):
./telnet-zig horizons.jpl.nasa.gov:6775To display the help, run the telnet client with the --help flag:
./telnet-zig --help
-h, --help
Display this help.
-u, --usage
Displays a short command usage
<str>
The telnet URI to connect to.