From 2c94883bfc553e1f3f9cd6abf1ce3bbb3fbb3eaf Mon Sep 17 00:00:00 2001 From: iff Date: Sun, 8 Dec 2024 17:46:43 +0100 Subject: [PATCH] docs: update installation --- Cargo.lock | 4 ++-- README.md | 10 +++++++--- core/Cargo.toml | 2 +- module-request-ai/Cargo.toml | 5 ++++- parser/Cargo.toml | 2 +- rules.md | 4 ++-- 6 files changed, 17 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6e757b4..a7ba005 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -480,7 +480,7 @@ dependencies = [ ] [[package]] -name = "pay-respects-fallback-request-ai" +name = "pay-respects-module-request-ai" version = "0.1.0" dependencies = [ "colored", @@ -504,7 +504,7 @@ dependencies = [ [[package]] name = "pay-respects-parser" -version = "0.3.2" +version = "0.3.3" dependencies = [ "proc-macro2", "quote", diff --git a/README.md b/README.md index c220b43..98378f2 100644 --- a/README.md +++ b/README.md @@ -107,16 +107,20 @@ curl -sSfL https://raw.githubusercontent.com/iffse/pay-respects/main/install.sh > This installation requires you to have Cargo (the Rust package manager) installed. -> Install from [crates.io](https://crates.io/), features are optional +> Install from [crates.io](https://crates.io/), modules are optional > ```shell -> cargo install pay-respects --all-features +> cargo install pay-respects +> cargo install pay-respects-module-runtime-rules +> cargo install pay-respects-module-request-ai > ``` > Clone from git and install, suitable for adding custom compile-time rules: > ``` > git clone --depth 1 https://github.com/iffse/pay-respects > cd pay-respects -> cargo install --path . +> cargo install --path core +> cargo install --path module-runtime-rules +> cargo install --path module-request-ai > ``` diff --git a/core/Cargo.toml b/core/Cargo.toml index 0582b19..1a69de8 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -21,5 +21,5 @@ regex-lite = "0.1" inquire = "0.7.5" -pay-respects-parser = { version = "0.3.2", path = "../parser" } +pay-respects-parser = { version = "0.3.3", path = "../parser" } pay-respects-utils = {version = "0.1.0", path = "../utils"} diff --git a/module-request-ai/Cargo.toml b/module-request-ai/Cargo.toml index 979618b..07c35b9 100644 --- a/module-request-ai/Cargo.toml +++ b/module-request-ai/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "pay-respects-fallback-request-ai" +name = "pay-respects-module-request-ai" version = "0.1.0" edition = "2021" @@ -19,3 +19,6 @@ curl = { version = "0.4", optional = true } # complicates cross compilation libcurl = ["dep:curl"] +[[bin]] +name = "pay-respects-fallback-request-ai" +path = "src/main.rs" diff --git a/parser/Cargo.toml b/parser/Cargo.toml index 689b7a2..960ff2a 100644 --- a/parser/Cargo.toml +++ b/parser/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pay-respects-parser" -version = "0.3.2" +version = "0.3.3" edition = "2021" # for crates.io diff --git a/rules.md b/rules.md index ddf8806..28ec9b9 100644 --- a/rules.md +++ b/rules.md @@ -1,10 +1,10 @@ # Writing Rules -Rule files placed under [rules](./rules) in the project directory are parsed at compilation, everything is parsed to Rust code before compiling. You don't have to know the project structure nor Rust to write blazing fast rules! +Rule files placed under [rules](./core/rules) in the project directory are parsed at compilation, everything is parsed to Rust code before compiling. You don't have to know the project structure nor Rust to write blazing fast rules! For compile-time rules, if only rules are changed, cargo won't recompile the project because Rust code were intact. You will have to notify it manually by: ```shell -touch src/rules.rs && cargo build +touch core/src/rules.rs && cargo build ``` Runtime rules directories are searched with the following priority: