solana-playground / solana-playground

Quickly develop, deploy and test Solana programs from browsers
https://beta.solpg.io
Apache License 2.0
399 stars 135 forks source link

Trouble Adding Cargo.toml File to Solana Playground #217

Open ferdasonmez opened 1 month ago

ferdasonmez commented 1 month ago

I'm currently working on converting my Solidity-based implementation to Rust within the Solana Playground environment. I understand that I need to use a Cargo.toml file to manage dependencies, but I'm encountering issues when trying to add this file.

When I create a Cargo.toml file manually and place it in the src folder, I receive an "invalid file" error. Could someone please guide me on the correct way to use a Cargo.toml file in Solana Playground?

Thank you in advance for your help! Ferda

acheroncrypto commented 1 month ago

It's currently not possible to add a custom Cargo.toml file, mainly because of the need to cache the builds in order to save compilation time.

You can see the supported crates here. If you need to use any crates that's not listed there, you can request it here by creating an issue and we'll most likely support it.