From 58bf9c77da822cafd08e3a8b420efb18148b533a Mon Sep 17 00:00:00 2001 From: York Jasper Niebuhr Date: Thu, 11 Sep 2025 19:09:45 +0200 Subject: [PATCH] Updated README --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6cc5bda..5c9f6a2 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,14 @@ Rewire is a command line tool for Linux that allows code to alter the system cal ## Getting Started This repository comes with a simple **Makefile** that does all the building for you. Rewire is written in a mixture of C and C++ and it requires compiler support for the C++-20 standard. It depends on no additional libraries. -Simply run ``make`` in this repository's main directory to build rewire's main executable and all exemplary wire kits. Alternatively, run ``make rewire`` or ``make wirekits`` to compile only the main executable or wire kits, respectively. +Simply create a build directory, enter it and run ``cmake ..`` and then ``make``. This yields rewire's main functionality in a shared library, a command line tool and an exemplary wire kit. -Wire kits must be installed before they can be used with rewire. This installation happens on a per-user basis. To install the provided ``example.so``, use ``rewire install example.so``. For convenience, rewire strips the ``.so`` from the name under which the installed wire kit is accessible, so this kit will be available under the name ``example``. To prevent this, or to choose a different alias for the installation altogether, use ``rewire install example.so alias``. No suffixes are truncated from aliases specified this way. A list of all installed wire kits can be printed with ``rewire list`` and each one can be removed using ``rewire uninstall kitName``. +Wire kits must be installed before they can be used with the command line tool. This installation happens on a per-user basis. To install the provided ``example.so``, use ``rewire install example.so``. For convenience, rewire strips the ``.so`` from the name under which the installed wire kit is accessible, so this kit will be available under the name ``example``. To prevent this, or to choose a different alias for the installation altogether, use ``rewire install example.so alias``. No suffixes are truncated from aliases specified this way. A list of all installed wire kits can be printed with ``rewire list`` and each one can be removed using ``rewire uninstall kitName``. To run commands in rewire, it can be launched in one of two modes. It can either execute a single command with ``rewire kitName command arguments`` or be launched in shell mode using ``rewire kitName``. The latter will initialize the wire kit once and listen for the user to input commands until ``exit`` is given. +To shorten commands, any executable can directly link to the rewire's shared library and internally decide which commands to execute in an altered environment. + ## Wire Kits To work with rewire, wire kits have to implement a set of functions specified in rewire's ``wirekit.hpp``. - ``wirekit_prepare`` is called **once** (even in shell mode) when the kit is loaded.