solana_security_txt/
lib.rs1#![doc = include_str!("../README.md")]
2
3#[cfg(feature = "parser")]
4mod parser;
5#[cfg(feature = "parser")]
6pub use crate::parser::*;
7
8pub const SECURITY_TXT_BEGIN: &str = "=======BEGIN SECURITY.TXT V1=======\0";
10pub const SECURITY_TXT_END: &str = "=======END SECURITY.TXT V1=======\0";
12
13#[macro_export]
14macro_rules! security_txt {
16 ($($name:ident: $value:expr),*) => {
17 #[cfg_attr(target_arch = "bpf", link_section = ".security.txt")]
18 #[allow(dead_code)]
19 #[no_mangle]
20 pub static security_txt: &str = concat! {
22 "=======BEGIN SECURITY.TXT V1=======\0",
23 $(stringify!($name), "\0", $value, "\0",)*
24 "=======END SECURITY.TXT V1=======\0"
25 };
26 };
27}