Skip to content

JonasCir/java2rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

java2rs

A Java to Rust transpiler written in Rust.

How is it built?

Java parsing -> IR -> Rust code generation.

Java parsing

Java parsing is done with tree-sitter-java. Find the grammar here.

IR

Small intermediate representation to run transformations on, e.g., grouping of static class methods.

Rust codegen

This is done by using the quote library which is well known in the context of Rust's procedural macros. By using quote, we can quasi-quote the Rust code we want to generate. syn is used in case we need to run preprocessing for quote. prettyplease is used for pretty printing the resulting Rust code.

FAQ

Can I use it in production?

No!

Will it eat my laundry?

Yes!

About

A Java to Rust source-to-source/transpiler (WIP)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published