update README
This commit is contained in:
parent
312e510eff
commit
4493b4408c
39
README.md
39
README.md
@ -20,20 +20,19 @@ pre-cached `nscd`, ~8 milliseconds with `turbonss`.
|
|||||||
Project status
|
Project status
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
The project is finished and is not recommended for production; just use nscd.
|
The project is finished and was never used recommended for production. If you
|
||||||
Turbonss duly implements the full user/group API in `src/libnss.zig`: feel free
|
are considering using turbonss, try nscd first. Turbonss is only 2-5 times
|
||||||
to copy that. turbonss is only 2-5 times faster than nscd, which usually does
|
faster than pre-warmed nscd, which usually does not matter enough to go through
|
||||||
not matter (including for my original use case).
|
the hoops of using a nonstandard nss library in the first place.
|
||||||
|
|
||||||
Yours truly (the author) worked on this for about 7 months. And when this was
|
Yours truly worked on this for about 7 months. This was also my first zig
|
||||||
finished it turned out that just slapping nscd on top of the existing NSS
|
project which I never went to (nor really needed to) come back and clean up.
|
||||||
implementation is fast enough.
|
|
||||||
|
|
||||||
Dependencies
|
Dependencies
|
||||||
------------
|
------------
|
||||||
|
|
||||||
1. zig v0.10. turbonss uses stage1 (the C++ version) and is not compatible with
|
1. zig v0.10. turbonss is implemented in stage1, so will not work with zig
|
||||||
stage2.
|
v0.11+.
|
||||||
2. [cmph][cmph]: bundled with this repository.
|
2. [cmph][cmph]: bundled with this repository.
|
||||||
|
|
||||||
Trying it out
|
Trying it out
|
||||||
@ -43,7 +42,7 @@ Clone, compile and test first:
|
|||||||
|
|
||||||
$ git clone --recursive https://git.sr.ht/~motiejus/turbonss
|
$ git clone --recursive https://git.sr.ht/~motiejus/turbonss
|
||||||
$ zig build test
|
$ zig build test
|
||||||
$ zig build -Dtarget=x86_64-linux-gnu.2.31 -Dcpu=x86_64_v3 -Drelease-safe=true
|
$ zig build -Dtarget=x86_64-linux-gnu.2.16 -Dcpu=baseline -Drelease-safe=true
|
||||||
|
|
||||||
One may choose different options, depending on requirements. Here are some
|
One may choose different options, depending on requirements. Here are some
|
||||||
hints:
|
hints:
|
||||||
@ -54,8 +53,19 @@ hints:
|
|||||||
3. `-Drelease-small=true` for smallest binary sizes.
|
3. `-Drelease-small=true` for smallest binary sizes.
|
||||||
4. `-Dstrip=true` to strip debug symbols.
|
4. `-Dstrip=true` to strip debug symbols.
|
||||||
|
|
||||||
Test it on a real system
|
For reference, size of the shared library and helper binaries when compiled
|
||||||
------------------------
|
with `-Dstrip=true -Drelease-small=true`:
|
||||||
|
|
||||||
|
17K Nov 30 11:53 turbonss-analyze
|
||||||
|
16K Nov 30 11:53 turbonss-getent
|
||||||
|
17K Nov 30 11:53 turbonss-makecorpus
|
||||||
|
166K Nov 30 11:53 turbonss-unix2db
|
||||||
|
22K Nov 30 11:53 libnss_turbo.so.2.0.0
|
||||||
|
|
||||||
|
Many thanks to Ulrich Drepper for [teaching how to link it properly][dso].
|
||||||
|
|
||||||
|
Test turobnss on a real system
|
||||||
|
------------------------------
|
||||||
|
|
||||||
`db.turbo` is the TurboNSS database file. To create one from `/etc/group` and
|
`db.turbo` is the TurboNSS database file. To create one from `/etc/group` and
|
||||||
`/etc/passwd`, use `turbonss-unix2db`:
|
`/etc/passwd`, use `turbonss-unix2db`:
|
||||||
@ -151,9 +161,10 @@ by 10x (to 100k each), the difference becomes even crazier:
|
|||||||
Documentation
|
Documentation
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
Architecture is detailed in `docs/architecture.md`
|
- Architecture is detailed in `docs/architecture.md`
|
||||||
Development notes are in `docs/development.md`
|
- Development notes are in `docs/development.md`
|
||||||
|
|
||||||
[nsswitch]: https://linux.die.net/man/5/nsswitch.conf
|
[nsswitch]: https://linux.die.net/man/5/nsswitch.conf
|
||||||
[id]: https://linux.die.net/man/1/id
|
[id]: https://linux.die.net/man/1/id
|
||||||
[cmph]: http://cmph.sourceforge.net/
|
[cmph]: http://cmph.sourceforge.net/
|
||||||
|
[dso]: https://akkadia.org/drepper/dsohowto.pdf
|
||||||
|
Loading…
Reference in New Issue
Block a user