소스 검색

Add anchor as optional feature in Rust client

Loris Leiva 1 년 전
부모
커밋
c9fb22be1b
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"