16 releases

0.1.16 Jul 5, 2021
0.1.15 Jul 2, 2021
0.1.12 Jun 11, 2021
0.1.8 May 28, 2021
0.1.1 Dec 12, 2019

#1982 in Development tools

Download history 48/week @ 2024-04-01 14/week @ 2024-04-08 19/week @ 2024-04-15 22/week @ 2024-04-22 19/week @ 2024-04-29 29/week @ 2024-05-06 24/week @ 2024-05-13 19/week @ 2024-05-20 20/week @ 2024-05-27 15/week @ 2024-06-03 19/week @ 2024-06-10 19/week @ 2024-06-17 23/week @ 2024-06-24 4/week @ 2024-07-08 30/week @ 2024-07-15

58 downloads per month
Used in 9 crates (2 directly)

Apache-2.0

105KB
2.5K SLoC

Ligen

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 }
}

Getting started

Here are a few links to get started:

Dependencies

~1.3–2.2MB
~45K SLoC