Skip to content

A library for the Name Service Switch to map arbitrary users to real ones.

License

Notifications You must be signed in to change notification settings

tmu-sprd/libnss-mapper-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libnss-mapper-rs

Build

With Rust installed

Preparation

You need the nightly toolchain and rust-src component installed.
Run:

rustup toolchain install nightly --allow-downgrade --profile minimal --component rust-src

To create Debian packages you need crate cargo-deb.
Run:

cargo install cargo-deb

Compile

To compile a size optimized binary, run:

cargo build_slim

To compile a size optimized binary without the syslog feature, run:

cargo build_slim --no-default-features

To compile a size optimized binary and create a Debian package, run:

cargo deb --cargo-build build_slim

To compile a size optimized binary without the syslog feature and create a Debian package, run:

cargo deb --cargo-build build_slim --variant=no-syslog

Using Docker/Podman

If you don't have Rust installed or don't want to install the nightly toolchain, there is a script ./build.sh, which creates an image from Debian Bullseye and with the needed Rust toolchain.

Invoke it as ./build.sh <command>, where <command> is one of the above. Example:

./build.sh cargo deb --cargo-build build_slim

To start a container with an interactive shell in the working directory, run:

./build.sh shell

To remove the built image, run:

./build.sh clean

About

A library for the Name Service Switch to map arbitrary users to real ones.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published