# RUST_LIB dependency on LIB_FILE in Makefile

2 messages from 2026-06-30 to 2026-07-01. Participants: Jan Palus, brian m. carlson.
Thread: https://gitlist.dev/t/65896

## Jan Palus, 2026-06-30 13:07

Subject: RUST_LIB dependency on LIB_FILE in Makefile
Message-ID: <akO9JTUIlHqBrgny@pine.grzadka>

```
According to Makefile $(RUST_LIB) target depends on $(LIB_FILE):

$(RUST_LIB): Cargo.toml $(RUST_SOURCES) $(LIB_FILE)

but is that really the case? As far as I can tell $(RUST_LIB) does not
use $(LIB_FILE) in any way and there's no such dependency in
meson.build.

```

## brian m. carlson, 2026-07-01 16:28

Subject: Re: RUST_LIB dependency on LIB_FILE in Makefile
Message-ID: <akVAI4dJlC_ZdguT@fruit.crustytoothpaste.net>
In-Reply-To: <akO9JTUIlHqBrgny@pine.grzadka>

```
On 2026-06-30 at 13:07:29, Jan Palus wrote:
> According to Makefile $(RUST_LIB) target depends on $(LIB_FILE):
> 
> $(RUST_LIB): Cargo.toml $(RUST_SOURCES) $(LIB_FILE)
> 
> but is that really the case? As far as I can tell $(RUST_LIB) does not
> use $(LIB_FILE) in any way and there's no such dependency in
> meson.build.

It is really the case.  The Rust code in `src/hash.rs` requires C
functions in `libgit.a`.  The tests won't run via `cargo test` if it's
not built.  There will be additional uses of this code in the relatively
  near future and they will definitely require calls to `libgit.a`.

The lack of Meson functionality is likely an oversight and I'm sure a
patch to fix that would be accepted.
-- 
brian m. carlson (they/them)
Toronto, Ontario, CA

```
