From 0d35e76bcb25d94db72cec393993a08059828875 Mon Sep 17 00:00:00 2001 From: Johannes Leupolz Date: Fri, 24 Oct 2025 12:53:48 +0000 Subject: [PATCH] Build instructions added --- README.md | 1 + docs/BUILD.md | 51 +++++++++++++++++++++++++++++++ vuinputd/systemd/vuinputd.service | 2 +- 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 docs/BUILD.md diff --git a/README.md b/README.md index 46acd68..ded94fe 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ This project solves that by introducing a **mediated input stack**: ## Documentation +See [docs/BUILD.md](docs/BUILD.md) for short build and install guide. See [docs/DESIGN.md](docs/DESIGN.md) for detailed architecture, design tradeoffs, and security considerations. --- diff --git a/docs/BUILD.md b/docs/BUILD.md new file mode 100644 index 0000000..774f0ae --- /dev/null +++ b/docs/BUILD.md @@ -0,0 +1,51 @@ +# 📦 vinput Build & Install Guide + +## 🔹 Prerequisites + +* Rust toolchain (recommended: install via [rustup](https://rustup.rs)) +* Linux with `libfuse3-dev`, `libudev-dev` and `pkg-config` installed (for cuse/udev access) + +--- + +## 🔹 Build Everything (Workspace Build) + +Clone the repo: + +```bash +git clone https://github.com/joleuger/vuinputd.git +cd vuinputd +``` + +Build all crates (daemon, forwarder, announce, common): + +```bash +apt-get install libfuse3-dev pkg-config fuse3 libudev-dev + +cargo build --release +``` + +Binaries will be located under: + +``` +target/release/vuinputd (the daemon itself) +target/release/mouse-advanced (for testing, fakes a mouse device) +target/release/keyboard-advanced (for testing, fakes a keyboard device) +``` + + +--- + +## 🔹 Install guide + +As root on host: +``` +cp target/release/vuinputd /usr/local/bin +cp vuinputd/udev/90-vuinputd-protect.rules /etc/udev/rules.d +cp vuinputd/udev/90-vuinputd-protect.rules /etc/udev/rules.d +cp vuinputd/udev/90-vuinputd.hwdb /etc/udev/rules.d/hwdb.d/ +cp vuinputd/systemd/vuinputd.service /etc/systemd/system/ +systemd-hwdb update +udevadm control --reload +systemctl daemon-reload +systemctl enable --now vuinputd +``` \ No newline at end of file diff --git a/vuinputd/systemd/vuinputd.service b/vuinputd/systemd/vuinputd.service index befd251..c3a5a0c 100644 --- a/vuinputd/systemd/vuinputd.service +++ b/vuinputd/systemd/vuinputd.service @@ -4,7 +4,7 @@ After=systemd-udevd.service Requires=systemd-udevd.service [Service] -ExecStart=/usr/bin/vuinputd +ExecStart=/usr/local/bin/vuinputd Restart=on-failure # Needs CAP_SYS_ADMIN for CUSE + /dev/uinput (I am still missing a capability for the correct working mode)