Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/duchess-rs/duchess
Silky smooth Java-Rust interop
https://github.com/duchess-rs/duchess
Last synced: 3 days ago
JSON representation
Silky smooth Java-Rust interop
- Host: GitHub
- URL: https://github.com/duchess-rs/duchess
- Owner: duchess-rs
- License: apache-2.0
- Created: 2023-03-24T20:59:25.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-14T04:50:58.000Z (6 days ago)
- Last Synced: 2025-01-14T17:43:00.260Z (5 days ago)
- Language: Rust
- Homepage: https://duchess-rs.github.io/duchess/
- Size: 748 KB
- Stars: 164
- Watchers: 8
- Forks: 17
- Open Issues: 39
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE-APACHE
Awesome Lists containing this project
- awesome-rust-list - nikomatsakis/duchess - Rust interop. (FFI Bindings)
- awesome-rust-list - nikomatsakis/duchess - Rust interop. (FFI Bindings)
README
# Duchess: silky smooth Java integration
[][Zulip]
[][Coverage]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...
```rust
Logger logger = new log.Logger();
logger.addEvent(
Event.builder()
.withTime(new Date())
.withName("foo")
.build()
);
```...could be executed in Rust as follows:
```rust
let logger = log::Logger::new().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...
* The [examples](https://github.com/duchess-rs/duchess/tree/main/test-crates/duchess-java-tests/tests/ui/examples)
* The [tutorials](https://duchess-rs.github.io/duchess/tutorials.html) chapter## Curious to get involved?
Look for [issues tagged with good first issue][] and join the [Zulip][]. For more information on how to develop duchess,
see [Contributing][]. You may also be able to improve test [coverage].[issues tagged with good first issue]: https://github.com/duchess-rs/duchess/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22
[Zulip]: https://duchess.zulipchat.com/
[Contributing]: CONTRIBUTING.md
[Coverage]: https://duchess-rs.github.io/duchess/coverage