Skip to content

jk-gan/obsidian

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Obsidian

What's Obsidian?

Obsidian is a web-application framework in Rust with a vision to make Rust web development fun.

Code Status

Version Master
Actions Status

Hello World

use obsidian::App;

fn main() {
  let mut app = App::new();
  let addr = ([127, 0, 0, 1], 3000).into();

  app.get("/", |_ctx| {
    "Hello World"
  });

  app.listen(&addr, || {
    println!("server is listening to {}", &addr);
  });
}

Hello World (with handler function)

use obsidian::{App, router::Responder, context::Context};

fn hello_world(_ctx: Context) -> impl Responder {
  "Hello World"
}

fn main() {
  let mut app = App::new();
  let addr = ([127, 0, 0, 1], 3000).into();

  app.get("/", hello_world);

  app.listen(&addr, || {
    println!("server is listening to {}", &addr);
  });
}

Example Files

Example are located in example/main.rs.

Run Example

cargo run --example example

Current State

NOT READY FOR PRODUCTION!

About

Rust Web Development Framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 100.0%