Quantcast
Channel: Recent Questions - Solana Stack Exchange
Viewing all articles
Browse latest Browse all 7939

Unable to Use External Crates (e.g., `orao_solana_vrf`) in Solana Playground

$
0
0

I am developing a Solana smart contract and am currently using the Solana Playground environment for testing and development. However, I am encountering an issue where I am unable to use the crate orao_solana_vrf in the Playground environment. The error message I am seeing is:

error[E0433]: failed to resolve: use of undeclared crate or module `orao_solana_vrf` --> src/misc.rs:5:5  |5 | use orao_solana_vrf::state::RandomnessAccountData;  |     ^^^^^^^^^^^^^^^ use of undeclared crate or module `orao_solana_vrf`

When trying to import the crate, the Playground fails to resolve it. As the Playground doesn’t seem to support running cargo commands or managing external dependencies like a local setup, I'm unsure how to proceed.

What I've tried:

  • I tried modifying the Cargo.toml locally, but I cannot run cargo commands in the Playground.

Questions:

  1. Is there any way to use external crates like orao_solana_vrf in Solana Playground, or is this environment limited to only the built-in libraries?
  2. If not, what is the best approach to develop and test Solana smart contracts that depend on external crates like orao_solana_vrf?

Viewing all articles
Browse latest Browse all 7939

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>