forked from cadey/maj
move majsite to its own crate, crate2nix
This commit is contained in:
parent
5583977151
commit
f48e46bcc7
|
@ -1,2 +1,3 @@
|
|||
/target
|
||||
Cargo.lock
|
||||
result*
|
||||
|
|
|
@ -19,10 +19,12 @@ log = "0.4"
|
|||
url = "2"
|
||||
thiserror = "1"
|
||||
structopt = "0.3"
|
||||
|
||||
[dev-dependencies]
|
||||
pretty_env_logger = "0.4"
|
||||
|
||||
[dependencies.tokio]
|
||||
version = "0.2.0"
|
||||
version = "0.2"
|
||||
features = [
|
||||
"macros",
|
||||
"net",
|
||||
|
@ -42,5 +44,6 @@ server = ["rustls", "webpki", "webpki-roots", "tokio", "async-trait", "tokio-rus
|
|||
|
||||
[workspace]
|
||||
members = [
|
||||
"./majc"
|
||||
"./majc",
|
||||
"./site"
|
||||
]
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
{ pkgs ? import <nixpkgs> { } }:
|
||||
|
||||
let
|
||||
cargo_nix = pkgs.callPackage ./Cargo.nix {
|
||||
defaultCrateOverrides = pkgs.defaultCrateOverrides // {
|
||||
ncurses = attrs: { buildInputs = with pkgs; [ ncurses pkg-config ]; };
|
||||
};
|
||||
|
||||
};
|
||||
in {
|
||||
majc = cargo_nix.workspaceMembers."majc".build;
|
||||
majsite = cargo_nix.workspaceMembers."majsite".build;
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
[package]
|
||||
name = "majsite"
|
||||
version = "0.1.0"
|
||||
authors = ["Christine Dodrill <me@christine.website>"]
|
||||
edition = "2018"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
structopt = "0.3"
|
||||
tokio = { version = "0.2", features = ["full"] }
|
||||
tokio-rustls = { version = "0.14", features = ["dangerous_configuration"] }
|
||||
async-trait = "0"
|
||||
pretty_env_logger = "0.4"
|
||||
|
||||
maj = { path = ".." }
|
|
@ -0,0 +1,21 @@
|
|||
# maj
|
||||
```
|
||||
__
|
||||
_____ _____ |__|
|
||||
/ \ \__ \ | |
|
||||
| Y Y \ / __ \_ | |
|
||||
|__|_| /(____ //\__| |
|
||||
\/ \/ \______|
|
||||
```
|
||||
|
||||
A gemini ecosystem for Rust
|
||||
|
||||
=> gemini://gemini.circumlunar.space/ Gemini homepage
|
||||
|
||||
## Homepage
|
||||
The main homepage for maj is on tulpa.dev:
|
||||
=> https://tulpa.dev/cadey/maj
|
||||
|
||||
## Projects
|
||||
=> /majc majc, an interactive curses client
|
||||
=> /majd majd, a high-power gemini server with Lua capabilities
|
|
@ -54,7 +54,7 @@ async fn main() -> Result<(), maj::server::Error> {
|
|||
struct Handler {}
|
||||
|
||||
fn index() -> Result<maj::Response, maj::server::Error> {
|
||||
let msg = include_bytes!("../../majc/src/help.gmi");
|
||||
let msg = include_bytes!("index.gmi");
|
||||
|
||||
Ok(maj::Response {
|
||||
status: maj::StatusCode::Success,
|
Loading…
Reference in New Issue