Skip to content

Commit 2b438fa

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 007ed0d commit 2b438fa

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
@@ -178,6 +178,10 @@ members = [
178178
]
179179
resolver = "2"
180180
181+
[workspace.package]
182+
edition = "2021"
183+
rust-version = "1.89.0"
184+
181185
[profile.release]
182186
overflow-checks = true
183187
lto = "fat"
@@ -205,7 +209,8 @@ mollusk-svm = "~0.4"
205209
name = "{0}"
206210
version = "0.1.0"
207211
description = "Created with Anchor"
208-
edition = "2021"
212+
edition.workspace = true
213+
rust-version.workspace = true
209214
210215
[lib]
211216
crate-type = ["cdylib", "lib"]

0 commit comments

Comments
 (0)