Skip to content

Commit b131b2d

Browse files
dcbakereli-schwartz
authored andcommitted
modules/rust: Add support for autolib field in the Cargo.toml
This adds support for parsing the new `autolib` member (rust-lang/cargo#14591). This is a quick and easy fix, suitable for backport. A larger more involved fix will be to stop splatting out the cargo dictionaries, and instead pass the fields we know about 1 by 1, and warning the user if we come across unknown fields. Fixes: #13826
1 parent 8c5505c commit b131b2d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

mesonbuild/cargo/interpreter.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ class Package:
146146
publish: bool = True
147147
metadata: T.Dict[str, T.Any] = dataclasses.field(default_factory=dict)
148148
default_run: T.Optional[str] = None
149+
autolib: bool = True
149150
autobins: bool = True
150151
autoexamples: bool = True
151152
autotests: bool = True

mesonbuild/cargo/manifest.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# SPDX-License-Identifier: Apache-2.0
2-
# Copyright © 2022-2023 Intel Corporation
2+
# Copyright © 2022-2024 Intel Corporation
33

44
"""Type definitions for cargo manifest files."""
55

@@ -33,6 +33,7 @@
3333
'publish': bool,
3434
'metadata': T.Dict[str, T.Dict[str, str]],
3535
'default-run': str,
36+
'autolib': bool,
3637
'autobins': bool,
3738
'autoexamples': bool,
3839
'autotests': bool,
@@ -65,6 +66,7 @@ class FixedPackage(TypedDict, total=False):
6566
publish: bool
6667
metadata: T.Dict[str, T.Dict[str, str]]
6768
default_run: str
69+
autolib: bool
6870
autobins: bool
6971
autoexamples: bool
7072
autotests: bool

0 commit comments

Comments
 (0)