Skip to content

Instantly share code, notes, and snippets.

View limads's full-sized avatar

Diego Lima limads

  • University of São Paulo
  • São Paulo
  • X @limads4
View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2022 Diego da Silva Lima (lima.ds@outlook.com). All rights reserved.
This work is licensed under the terms of the GPL v3.0 License.
For a copy, see http://www.gnu.org/licenses.*/
Credits: This file was based on the Rust language definition by the Rust developers
@limads
limads / lib.rs
Last active September 7, 2022 20:41
Procedural macro to describe Rust API in dynamic libraries
use proc_macro::TokenStream;
use syn::{parse_macro_input};
use serde::{Serialize, Deserialize};
use quote::ToTokens;
use std::str::FromStr;
/* Example usage:
#[export_abi]
mod {