axodotdev / axodotdev/cargo-dist

Feature: generating pkg-config files

Open
#1,251 0 comments 1 reaction 0 assignees View on GitHub
feature request - new integration
Dominant language
Rust
Stars
2.1k
Forks
150
Avg merge
1d 11h
Merged PRs (30d)
32

Description

Now that we have support for libraries, it would be interesting to add support for generating pkg-config `.pc` files. These are text configuration files which provide a way for buildsystems to check what flags are required to be able to find headers and libraries for a C library. Here's a sample of what one looks like:

```
prefix=/opt/homebrew/Cellar/harfbuzz/8.5.0
includedir=${prefix}/include
libdir=${prefix}/lib

Name: harfbuzz
Description: HarfBuzz text shaping library
Version: 8.5.0
Requires.private: freetype2 >= 12.0.6, glib-2.0 >= 2.30.0, graphite2 >= 1.2.0
Libs: -L${libdir} -lharfbuzz
Libs.private: -lm -framework ApplicationServices
Cflags: -I${includedir}/harfbuzz
```

A few things we'll want to consider:

* Do we want all libraries in a package to get one `.pc` file, or one per library? (This will probably want to be configurable.)
* Will we use the package name for the `.pc` file, or make it configurable?

cc https://github.com/axodotdev/cargo-dist/issues/179#issuecomment-2249517786

Contributor guide

Open the contributing guide

Research direction

The issue names no source files, tests, or implementation entry points. Start by reviewing the existing library packaging support and the linked cargo-dist discussion, then resolve whether packages produce one .pc file or one per library and whether the filename is configurable. Done means generated pkg-config files contain the required library metadata, flags, and dependencies.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, release
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.