Skip to content

michidk/telnet-zig

Repository files navigation

Telnet Client in Zig

MIT License Build Project Run Zig Tests

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.

Features

  • Basic telnet protocol functionality

Installation

  • Install the Zig compiler
  • Run zig build to build the project
  • Run zig build run to run the telnet client (or use just)

Run

Run with Zig:

zig build run -- telnet://horizons.jpl.nasa.gov:6775

Or run the executable directly (after building):

./telnet-zig horizons.jpl.nasa.gov:6775

Usage

To 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.

About

A telnet client written in Zig.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published