Commit 52018a48 authored by sqwishy's avatar sqwishy 🤔
Browse files

correct information about ninja in readme; add toc

parent 33008545
......@@ -11,12 +11,11 @@ instructions on building & running it.
There are some `pictures on the project wiki
<https://gitlab.com/sqwishy/comfy-sheep/wikis/pictures>`_.
(Jump to `installation`_ or `configuration`_. Or to the `retrospective`_ where I
complain about life.)
This is GPL because nobody is going to use it anyway. (If you actually care about this
and don't like it, contact me.)
.. contents::
Overview
--------
......@@ -205,7 +204,11 @@ Requirements:
- `Ninja <https://ninja-build.org/>`_
Run :code:`bootstrap.sh` to generate a build.ninja file. This will be used if you run
:code:`ninja`. The interesting targets include:
:code:`ninja`. :code:`ninja build` will build rust binaries in release mode. :code:`sudo
ninja build` will install the systemd units and all their dependneices to various places
under :code:`/usr/local`.
Other The interesting targets include:
- :code:`build`: Compile the two Rust programs (sheep-scrape and sheep-chat) in release
mode with cargo. This is the default target.
......@@ -217,10 +220,13 @@ Run :code:`bootstrap.sh` to generate a build.ninja file. This will be used if yo
site-package directory (:code:`/usr/local/lib/comfy-sheep/site-packages` by default and
requires sudo in that case). This uses binary wheels where available so it will be
specific to the system's Python runtime and not appropriate for source distribution.
- :code:`install`: Does all the above, after compiling the rust programs as an
unprivileged user with :code:`ninja build`, you can meet the above install targets by
building this target.
- :code:`install-py-src`: Download and bundle source distributions for the project's
Python package and its dependencies under :code:`/usr/local/lib/comfy-sheep/py-src` by
default. This is only something you would when packaging a source RPM. In which case
the output path will be prefixed with some build root and not require sudo.
default. This is only something you would when packaging a source RPM. See the next
section for more about that.
The paths above can be modified by setting environment variables when you run
:code:`bootstrap.sh`. See that file for details. The defaults are likely fine unless
......@@ -232,7 +238,7 @@ Packaging an RPM
Apart from the Python packages. The source RPM is just a bunch of binaries because I'm
dumb and lazy. To create the source RPM, run bootstrap.sh with the appropriate install
root and some prefix other than :code:`/usr/local`. This will give you a ninja file with
which you can build the install-for-rpm target.
which you can build the :code:`install-for-rpm` target.
.. code::
......@@ -348,13 +354,10 @@ job that looks for trends and does like a weekly digest of some super interestin
as a subscription. I don't know, I need a big brain to figure out what "super
interesting stuff" is...
Good & Bad
~~~~~~~~~~
*Everything could have been anything else and it would have just as much meaning.*
I did a neat thing with rust macros for mapping tags.
.....................................................
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
`IRC tags <https://ircv3.net/specs/extensions/message-tags.html>`_ look like
:code:`@aaa=bbb;ccc;example.com/ddd=eee :nick!ident@host.com PRIVMSG me :Hello`.
......@@ -421,7 +424,7 @@ to use :code:`foo` in some type-specific way like to initialize a struct. Wow; w
time to be alive.
Asynchronous programming in rust is a fucking nightmare.
........................................................
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I have these like 400 line monsters that I've spent weeks trying to clean up. I don't
know if there's some sort of trick/drug that everyone else knows about to either produce
......@@ -503,8 +506,9 @@ type" and if you find yourself violating the language somewhere the compiler wil
.. _Iterator: https://doc.rust-lang.org/std/iter/struct.Map.html#impl-Iterator
.. _vomit: https://archive.is/parRY
I can't do name things.
'''''''''''''''''''''''
~~~~~~~~~~~~~~~~~~~~~~~
I couldn't decide whether to use underscores or hyphens. Hyphenating filenames seems
wrong but it looks nicer for some reason. And everybody else is doing it too. So that
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment