Sign inSign up

sctg/libtermcap

By sctg

Updated 9 months ago

Image
0

1.2K

sctg/libtermcap repository overview

libtermcap for Rust/musl targets

Static library build of GNU termcap (v1.3.2) compiled with C23 support.

Features

  • C23 standard support (-std=gnu23)
  • Static library (no external dependencies)
  • Compiled with musl libc
  • Multi-architecture: linux/amd64, linux/arm64

Usage with Rust

docker run --rm -v $(pwd):/output sctg/libtermcap:musl \
  cp /usr/local/lib/libtermcap.a /output/

RUSTFLAGS="-C target-feature=+crt-static -L $(pwd)" \
  cargo build --target aarch64-unknown-linux-musl

Tags

  • sctg/libtermcap:musl - Latest musl build
  • sctg/libtermcap:musl-1.3.2 - Version specific
  • sctg/libtermcap:1.3.2 - Alias for musl-1.3.2
  • sctg/libtermcap:latest - Latest build

Files in container

  • /usr/local/lib/libtermcap.a - Static library
  • /usr/local/include/termcap.h - Header file

Building locally

Build the static termcap library in Alpine Linux:

docker build -t termcap:latest .

Extract the Library

Extract the compiled static library from the image:

docker run --rm -v $(pwd):/output termcap:latest \
  cp /usr/local/lib/libtermcap.a /output/

C23 Compilation

The library is compiled with:

  • -std=gnu23 - C23 standard with GNU extensions
  • -static - Static linking
  • -O2 - Optimization level 2

Tag summary

Content type

Image

Digest

sha256:f0eab7071

Size

3.7 MB

Last updated

9 months ago

docker pull sctg/libtermcap