Skip to content
GitHub no longer supports this web browser. Learn more about the browsers we support.
Rust Web Development Framework
Rust
Branch: master
Clone or download
jk-gan Merge pull request #28 from obsidian-rs/jk-gan-patch-1
chore: fix readme example error
Latest commit b3b806b Jan 1, 2020
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows Update rust.yml Sep 11, 2019
example fix: fix failed testing Dec 31, 2019
src
.gitignore Remove vscode setting Nov 30, 2018
.travis.yml Add safelist for travis ci Jan 13, 2019
Cargo.toml
LICENSE Create LICENSE Jan 13, 2019
README.md chore: fix readme example error Dec 31, 2019

README.md

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!

You can’t perform that action at this time.