Skip to content

Commit 39f28c1

Browse files
committed
fix: Add edition and rust-version to workspace.package template
Ensures proper dependency resolution by specifying edition and rust-version in [workspace.package] instead of at program level, allowing dependency resolution to respect these constraints and prevent incompatible crate versions from being selected. Fixes #4047 Signed-off-by: AvhiMaz <avhimazumder5@outlook.com>
1 parent a1f0743 commit 39f28c1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cli/src/rust_template.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,10 @@ members = [
181181
]
182182
resolver = "2"
183183
184+
[workspace.package]
185+
edition = "2021"
186+
rust-version = "1.89.0"
187+
184188
[profile.release]
185189
overflow-checks = true
186190
lto = "fat"
@@ -208,7 +212,8 @@ mollusk-svm = "~0.4"
208212
name = "{0}"
209213
version = "0.1.0"
210214
description = "Created with Anchor"
211-
edition = "2021"
215+
edition.workspace = true
216+
rust-version.workspace = true
212217
213218
[lib]
214219
crate-type = ["cdylib", "lib"]

0 commit comments

Comments
 (0)