use opengl_registry::command::Command; use proc_macro2::TokenStream; use quote::{format_ident, quote}; pub fn create_command_globals(commands: &[Command]) -> Vec { commands.iter().map(|command| { let command_name = format_ident!("{}", command.prototype().name()); quote! { #[allow(non_upper_case_globals)] pub static mut #command_name: unsafe extern "C" fn() = function_not_loaded; } }).collect() }