8 releases

0.1.8 Mar 15, 2024
0.1.7 Mar 15, 2024
0.1.6 Dec 1, 2023
0.1.5 Jul 24, 2023
0.1.0 Mar 24, 2023

#138 in Development tools

Download history 3/week @ 2024-02-19 4/week @ 2024-02-26 206/week @ 2024-03-11 47/week @ 2024-03-18 68/week @ 2024-04-01

133 downloads per month

Apache-2.0 OR MIT

135KB
3K SLoC

Duchess: silky smooth Java integration

Duchess is a Rust crate that makes it easy, ergonomic, and efficient to interoperate with Java code.

TL;DR

Duchess permits you to reflect Java classes into Rust and easily invoke methods on Java objects. For example the following Java code...

Logger logger = new log.Logger();
logger.addEvent(
    Event.builder()
        .withTime(new Date())
        .withName("foo")
        .build()
);

...could be executed in Rust as follows:

let logger = log::Logger::new().global().execute()?;
logger
    .add_event(
        log::Event::builder()
            .with_time(java::util::Date::new())
            .with_name("foo")
            .build(),
    )
    .execute()?;

Curious to learn more?

Check out the...

Curious to get involved?

Look for issues tagged with good first issue and join the Zulip.

Dependencies

~4–13MB
~110K SLoC