Skip to content

MementoMori11723/rust-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿฆ€ Rust Examples

A collection of simple Rust projects to demonstrate how to build:

  • โœ… A basic Hello World CLI
  • ๐ŸŽฎ A Sample Game using raylib
  • ๐ŸŒ A basic Web Server that serves HTML pages

๐Ÿ“ Directory Structure

rust-examples
โ”œโ”€โ”€ hello-world       # Minimal Hello World CLI app
โ”œโ”€โ”€ sample-game       # A simple interactive game
โ””โ”€โ”€ web-server        # Basic web server with static HTML support

๐Ÿš€ Getting Started

โœ… 1. Hello World

A simple CLI program to verify your Rust setup.

Run it:

cd hello-world
make run

๐ŸŽฎ 2. Sample Game

A basic 2D game using raylib and Rust bindings.

Dependencies:

Install raylib system dependencies:

# Debian/Ubuntu
sudo apt install libraylib-dev

Run it:

cd sample-game
make run

๐ŸŒ 3. Web Server

A minimal static file server written in Rust that serves HTML pages from the pages/ folder.

Run it:

cd web-server
make run

Visit:

Open http://localhost:11500 in your browser.


๐Ÿ›  Requirements

  • Rust (via rustup.rs)
  • Make (for using the provided Makefile)
  • Optional system libraries (e.g. libraylib-dev)