浏览代码

Add anchor as optional feature in Rust client (#89)

Loris Leiva 1 年之前
父节点
当前提交
13473159dd
共有 2 个文件被更改,包括 7 次插入0 次删除
  1. 5 0
      .changeset/hungry-fans-promise.md
  2. 2 0
      template/clients/rust/clients/rust/Cargo.toml.njk

+ 5 - 0
.changeset/hungry-fans-promise.md

@@ -0,0 +1,5 @@
+---
+"create-solana-program": patch
+---
+
+Add anchor as optional feature in Rust client

+ 2 - 0
template/clients/rust/clients/rust/Cargo.toml.njk

@@ -8,10 +8,12 @@ readme = "README.md"
 license-file = "../../LICENSE"
 
 [features]
+anchor = ["dep:anchor-lang"]
 test-sbf = []
 serde = ["dep:serde", "dep:serde_with"]
 
 [dependencies]
+anchor-lang = { version = "0.30.0", optional = true }
 borsh = "^0.10"
 num-derive = "^0.3"
 num-traits = "^0.2"