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