()
| 94 | |
| 95 | #[napi] |
| 96 | pub fn contract_info() -> ContractInfo { |
| 97 | ContractInfo { |
| 98 | abi_version: buffers::KERNEL_ABI_VERSION as u32, |
| 99 | kernel_version: env!("CARGO_PKG_VERSION").to_string(), |
| 100 | node_kinds: buffers::NODE_KINDS.iter().map(|s| s.to_string()).collect(), |
| 101 | edge_kinds: buffers::EDGE_KINDS.iter().map(|s| s.to_string()).collect(), |
| 102 | languages: langs::LANGUAGES.iter().map(|s| s.to_string()).collect(), |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | #[napi] |
| 107 | pub fn grammar_info(language: String) -> Option<GrammarInfo> { |