Updated README
This commit is contained in:
parent
c19a487436
commit
58bf9c77da
@ -4,12 +4,14 @@ Rewire is a command line tool for Linux that allows code to alter the system cal
|
|||||||
## Getting Started
|
## 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.
|
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 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
|
## Wire Kits
|
||||||
To work with rewire, wire kits have to implement a set of functions specified in rewire's ``wirekit.hpp``.
|
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.
|
- ``wirekit_prepare`` is called **once** (even in shell mode) when the kit is loaded.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user