Crates.io | ligen-core |
lib.rs | ligen-core |
version | 0.1.16 |
source | src |
created_at | 2019-12-12 05:12:51.526323 |
updated_at | 2021-07-05 22:17:50.89564 |
description | Language Interface Generator Core |
homepage | |
repository | |
max_upload_size | |
id | 188705 |
size | 103,532 |
Ligen (Language Interface Generator) is an extensible macro-based multi-language binding generator.
We officially support ligen-c
, a binding generator for the Programming Language C.
You can add ligen to your codebase by adding #[ligen]
attributes to the items you want to
export. It is as simple as this:
use ligen::ligen;
use ligen_c::ligen_c;
use ligen_cpp::ligen_cpp;
pub struct Counter {
count: u32
}
#[ligen(c, cpp)]
impl Counter {
pub fn new() -> Self { Self { count: 0 } }
pub fn count(&mut self) { self.count += 1; }
pub fn get_count(&self) -> u32 { self.count }
}
Here are a few links to get started: