> For the complete documentation index, see [llms.txt](https://0xkowloon.gitbook.io/anchor-for-evm-developers/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://0xkowloon.gitbook.io/anchor-for-evm-developers/feature-flags.md).

# Feature Flags

**Solana**

```rust
#[cfg(feature = "devnet")]
pub const RANDOM_CONSTANT: u64 = 1;
#[cfg(not(feature = "devnet"))]
pub const RANDOM_CONSTANT: u64 = 2;

#[cfg(feature = "devnet")]
msg!("This should only be logged when devnet is enabled!")
```

Then run

`anchor build — --features devnet`
