Skip to content

Building rcfg-sim from source

rcfg-sim is built with make. There are no code-generation steps and no external build tools beyond the Go toolchain.

Terminal window
git clone https://github.com/rconfig/rconfig-sim.git
cd rconfig-sim
make build

make build compiles both binaries into bin/ as static executables (CGO_ENABLED=0):

  • bin/rcfg-sim — the SSH server
  • bin/rcfg-sim-gen — the config generator

You can run them straight from bin/, or install them system-wide with make install.

TargetWhat it does
make buildCompile both binaries into bin/
make testRun unit tests (fast, no network)
make integrationRun integration tests (real SSH over loopback; build tag integration)
make benchRun hot-path benchmarks
make vetgo vet, with and without the integration tag
make fmtgofmt -s
make installInstall binaries, systemd unit, sysctl and limits drop-ins
make uninstallStop/disable units and remove installed files
make generate-configsWrapper around rcfg-sim-gen with env-var overrides
make deploy-aliases / make remove-aliasesManage IP aliases via deploy/ip-aliases.sh
make cleanRemove build artifacts
Terminal window
./bin/rcfg-sim --help
./bin/rcfg-sim-gen --help

Both print their full flag set with defaults — see the CLI reference.

Terminal window
make test # unit tests
make integration # spins up real SSH listeners on loopback

The unit suite includes the deterministic-output tests that hash the generated config tree; see Determinism & seeds and Contributing.