mesonbuild / mesonbuild/meson

cargo: Meson is not able to automatically handle path dependencies in workspaces

Open
#16,136 14 comments 0 reactions 0 assignees View on GitHub
documentation module:rust
Dominant language
Python
Stars
6.6k
Forks
1.9k
Avg merge
2d 6h
Merged PRs (30d)
33

Description

**Describe the bug**
Take two crates in a workspace, `foo` and `bar`. `foo` depends on `bar` through a path dependency. During setup, Meson isn't able to make the path dep a subproject, and the setup fails. However, Cargo is able to build the project.

**To Reproduce**
See the minimal reproducer attached.

[meson-cargo-path-dep-reproducer.zip](https://github.com/user-attachments/files/31346396/meson-cargo-path-dep-reproducer.zip)

**Expected behavior**
Meson should be able to build the library

**system parameters**
* Native build
* Linux (GNOME OS)
* Python 3.14.7
* Meson version: master

Contributor guide

Open the contributing guide

Research direction

Start with the attached minimal reproducer and trace Meson's Cargo setup handling for a workspace path dependency. Compare the failing setup with Cargo's successful build behavior, then verify that Meson can configure and build the library from the reproducer.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, rust
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.