trident_client/
lib.rs

1//! Trident is a suite of tools and libraries for testing, auditing and developing.
2//! [Solana](https://solana.com/) / [Anchor](https://book.anchor-lang.com/chapter_1/what_is_anchor.html) programs (smart contracts).
3//!
4//! Trident could be useful for writing Rust dApps, too.
5
6mod commander;
7mod coverage;
8mod error;
9mod idl_loader;
10mod server;
11mod test_generator;
12mod test_generator_manifest;
13mod test_generator_template;
14mod utils;
15
16pub mod ___private {
17    pub use super::commander::Commander;
18    pub use super::commander::Error;
19    pub use super::idl_loader::load_idls;
20    pub use super::idl_loader::IdlError;
21    pub use super::server::DashboardServer;
22    pub use super::test_generator::TestGenerator;
23}
24
25mod constants {
26    // Tomls
27    pub(crate) const CARGO_TOML: &str = "Cargo.toml";
28    pub(crate) const TRIDENT_TOML: &str = "Trident.toml";
29
30    // Tests
31    /// Directory name for the Trident tests workspace
32    /// To customize: change this value and VSCODE_TESTS_WORKSPACE_PATH accordingly
33    pub(crate) const TESTS_WORKSPACE_DIRECTORY: &str = "trident-tests";
34
35    // VSCode - Paths relative to project root
36    pub(crate) const VSCODE_DIRECTORY: &str = ".vscode";
37    pub(crate) const VSCODE_SETTINGS: &str = "settings.json";
38    /// Path to the tests workspace for VSCode settings (relative to project root)
39    /// This is used in rust-analyzer.linkedProjects configuration
40    /// To customize: ensure this matches TESTS_WORKSPACE_DIRECTORY
41    /// Format: "./{TESTS_WORKSPACE_DIRECTORY}/Cargo.toml"
42    pub(crate) const VSCODE_TESTS_WORKSPACE_PATH: &str = "./trident-tests/Cargo.toml";
43
44    // Fuzzing
45    pub(crate) const FUZZ_ACCOUNTS_FILE_NAME: &str = "fuzz_accounts.rs";
46    pub(crate) const TYPES_FILE_NAME: &str = "types.rs";
47    pub(crate) const FUZZ_TEST: &str = "test_fuzz.rs";
48
49    // Formatting
50    pub(crate) const SKIP: &str = "\x1b[33mSkip\x1b[0m";
51    pub(crate) const FINISH: &str = "\x1b[92mFinished\x1b[0m";
52    pub(crate) const UPDATED: &str = "\x1b[94mUpdated\x1b[0m";
53}