{"id":18896606,"url":"https://github.com/cguz/java-to-rust","last_synced_at":"2026-03-06T11:32:02.347Z","repository":{"id":45243295,"uuid":"396989259","full_name":"cguz/java-to-rust","owner":"cguz","description":"A command line Java to rust converter","archived":false,"fork":false,"pushed_at":"2024-02-12T12:25:05.000Z","size":43353,"stargazers_count":77,"open_issues_count":0,"forks_count":12,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-07-20T15:39:19.760Z","etag":null,"topics":["converter","java","java-to-rust","rust"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cguz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-16T22:04:10.000Z","updated_at":"2025-07-03T09:48:03.000Z","dependencies_parsed_at":"2024-11-08T08:48:43.633Z","dependency_job_id":null,"html_url":"https://github.com/cguz/java-to-rust","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/cguz/java-to-rust","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cguz%2Fjava-to-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cguz%2Fjava-to-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cguz%2Fjava-to-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cguz%2Fjava-to-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cguz","download_url":"https://codeload.github.com/cguz/java-to-rust/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cguz%2Fjava-to-rust/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30173694,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T07:56:45.623Z","status":"ssl_error","status_checked_at":"2026-03-06T07:55:55.621Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["converter","java","java-to-rust","rust"],"created_at":"2024-11-08T08:34:43.313Z","updated_at":"2026-03-06T11:32:02.328Z","avatar_url":"https://github.com/cguz.png","language":"Java","readme":"# Java 2 Rust\n\n[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://gitHub.com/cguz/)\n[![Eclipse](https://img.shields.io/badge/-Eclipse-blueviolet)](https://eclipse.org/)\n[![Java](https://img.shields.io/badge/Java-ED8B00?\u0026logo=java\u0026logoColor=white)](https://java.org/)\n\nAuthor: Cesar Augusto Guzman Alvarez [@cguz](https://github.com/cguz/)\n\nCo-Author: Jonas Cir [@JonasCir](https://github.com/JonasCir)\n\n## Description\n\nThis is a command line tool based on the version [web-application](https://github.com/aschoerk/converter-page). Thus,\nall the credits for the original author of the web-application.\n\nThe application is a small help when trying to port Java-Code to Rust.\n\nThe author is a beginner in rust, so the generated code will sometimes be kind of \"unrusty\".\n\n## How to build it.\n\nRun `mvn package` and find your `java2rust.jar` in the project's `target` folder.\n\n## How to use it.\n\n$ java -jar java2rust.jar -d [path_file.java | path_directory]\n\nThe converted files will be saved in the folder: \"output\"\n\nOther options are:\n - -o: Specify the output directory path (default: output)\n - -i: Ignore existing files in the output directory (default: false)\n - -v: Specify the verbosity level (default: 2)\n - -cp: Copy other non-java files to the output directory (default: false)\n\n## Implemented funcionality\n\n- might be of use:\n\n    - conversion of declarations Java: \"Type name = init\" to \"let name: Type = init\"\n    - conversion of arrays type[] to vectors\n    - snake-case for camelcase-identifiers starting with lower case\n    - mapping of primitive types\n    - \u0026self as first parameter in non static methods\n    - new type becomes type::new\n    - class becomes struct with its instance-variables\n    - class-methods can be found in extra block impl for { }\n    - decide about usage of mut\n    - conversion of integer-constants to float-constants where necessary\n    - conversion of Exceptions into Results\n    - static methods are called using ::\n    - @Test is converted to #[test]\n    - interfaces become traits\n    - Java methods with declared throws return Result\u003c_,Rc\u003cException\u003e\u003e used rust code can be found in directory rust.\n\n- experimental\n\n    - conversion of throw to break loop with label\n    - mvn-assembly-plugin\n    - convert camel-cased file names to snake-cased names \n\n- very experimental certainly wrongly done:\n\n    - super-classes become instance-variables\n\n- what does not change\n\n    - javadoc-comments\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcguz%2Fjava-to-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcguz%2Fjava-to-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcguz%2Fjava-to-rust/lists"}