|
@@ -37,7 +37,7 @@ pub fn create_program(name: &str, template: ProgramTemplate, with_mollusk: bool)
|
|
program_path.join("Cargo.toml"),
|
|
program_path.join("Cargo.toml"),
|
|
cargo_toml(name, with_mollusk),
|
|
cargo_toml(name, with_mollusk),
|
|
),
|
|
),
|
|
- (program_path.join("Xargo.toml"), xargo_toml().into()),
|
|
|
|
|
|
+ // Note: Xargo.toml is no longer needed for modern Solana builds using SBF
|
|
];
|
|
];
|
|
|
|
|
|
let template_files = match template {
|
|
let template_files = match template {
|
|
@@ -204,11 +204,17 @@ no-entrypoint = []
|
|
no-idl = []
|
|
no-idl = []
|
|
no-log-ix-name = []
|
|
no-log-ix-name = []
|
|
idl-build = ["anchor-lang/idl-build"]
|
|
idl-build = ["anchor-lang/idl-build"]
|
|
|
|
+anchor-debug = []
|
|
|
|
+custom-heap = []
|
|
|
|
+custom-panic = []
|
|
{2}
|
|
{2}
|
|
|
|
|
|
[dependencies]
|
|
[dependencies]
|
|
anchor-lang = "{3}"
|
|
anchor-lang = "{3}"
|
|
{4}
|
|
{4}
|
|
|
|
+
|
|
|
|
+[lints.rust]
|
|
|
|
+unexpected_cfgs = {{ level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] }}
|
|
"#,
|
|
"#,
|
|
name,
|
|
name,
|
|
name.to_snake_case(),
|
|
name.to_snake_case(),
|
|
@@ -218,12 +224,6 @@ anchor-lang = "{3}"
|
|
)
|
|
)
|
|
}
|
|
}
|
|
|
|
|
|
-fn xargo_toml() -> &'static str {
|
|
|
|
- r#"[target.bpfel-unknown-unknown.dependencies.std]
|
|
|
|
-features = []
|
|
|
|
-"#
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
/// Read the program keypair file or create a new one if it doesn't exist.
|
|
/// Read the program keypair file or create a new one if it doesn't exist.
|
|
pub fn get_or_create_program_id(name: &str) -> Pubkey {
|
|
pub fn get_or_create_program_id(name: &str) -> Pubkey {
|
|
let keypair_path = Path::new("target")
|
|
let keypair_path = Path::new("target")
|