Skip to content

violinmeng/telnet-zig

 
 

Repository files navigation

Telnet Client in Zig

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.

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

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages