Skip to content

mcarvalhor/HIFAL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HIFAL (HIFAL Is Fast And Lightweight)

HIFAL is an ultra-fast, lightweight HTTP server written in C. Designed with a strict focus on minimal memory and CPU footprints, it is the ideal solution for environments where web serving is secondary to the machine's primary function. It's perfect for serving brief instructions, static assets, or simple web interfaces without the overhead of a traditional, full-scale web server. See SPEC.md for the full project specification.

Use Cases

You might need a streamlined HTTP server when web hosting isn't your core objective, or when you need to embed web capabilities directly into your application. Key scenarios include:

  • Dedicated Game Servers: Reserve your system resources for demanding game processes rather than a heavy web server stack. Use HIFAL to serve a simple landing page with player instructions or server rules.
  • Application Integration: Link HIFAL's libraries directly to your program to serve a specific working directory. For instance, a local photo editor could use HIFAL to spin up a quick "Share on Web" feature without relying on external infrastructure.
  • IoT & Embedded Devices: HIFAL's minimal memory footprint makes it highly suitable for resource-constrained environments. (Note: HIFAL strictly targets POSIX-compliant operating systems. Usage on bare-metal embedded systems may require additional porting.)
  • Quick Local File Sharing: Spin up a fast server on your personal machine to share files on your local network without the hassle of installing and configuring a massive web server.

Build Instructions

HIFAL utilizes CMake for its build system. To compile the project from the source, run the following commands in your terminal:

$ cmake .
$ make all

Usage

Once compiled, you can start the server directly from your terminal by executing the binary:

$ ./bin/hifal ./wwwroot

The command above serves static files from the "./wwwroot".

Repository format

This repository is structured as follow:

  • headers/: Contains the C header files defining the server's internal APIs.
  • src/: Contains the core C source code.
  • wwwroot/: Serves as an example document root containing sample web content.
  • CMakeLists.txt: The CMake configuration file containing build instructions.
  • LICENSE: The open-source license governing this project.
  • SPEC.md: The definitive specification, design, architecture and configuration document.

Contributing

Contributions are welcome! To maintain a structured workflow and keep our repository organized, please follow these steps:

  1. Open an Issue: First, describe the bug (e.g., connection handling errors) or the feature (e.g., multithreading enhancements) you intend to work on.
  2. Fork the Repository: Create your own local copy of the project.
  3. Make Your Changes: Implement your code edits or architectural improvements in your fork.
  4. Submit a Pull Request: Open a PR against the main repository, ensuring you reference the original Issue number in your description.

About

HIFAL Is Fast And Lightweight is an ultra-fast, lightweight HTTP server written in C.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages