Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

zig-http-server

Why

I wanted to learn Zig and also wanted to look into HTTP so I decided to write a very small server as a proof of concept.

Description

Very very basic proof of concept http-server written as a way to learn Zig.

When I mean very basic, I mean it:

  • it only parses and prints out the header list and returns an hardcoded html page
  • it also probably does not work with concurrent requests (haven't tested yet)
  • it's probably as slow as it could be

Also this is not following the good practices so you should not use this code or server other than for educational purpose! :)

Requirements

The server has been developed using Zig 0.13.0. As the language is quite a moving target, this may very well fail to build with a future version.

How to build

zig build-exe ./server.zig

Acknowledgements

  • openmymind.net provied valuable information about how to write a server using the standard posix interface of Zig
  • zig.guide is an alternative to the official Zig documentation that's more accessible

About

Very basic http-server written in zig

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages