{"id":16028142,"url":"https://github.com/ewpratten/jni-mangle","last_synced_at":"2025-03-17T21:30:21.022Z","repository":{"id":193314148,"uuid":"688044289","full_name":"ewpratten/jni-mangle","owner":"ewpratten","description":"Mangle Rust functions for use with JNI","archived":false,"fork":false,"pushed_at":"2023-09-07T17:22:42.000Z","size":30,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-16T14:48:39.453Z","etag":null,"topics":["jni","jni-rust","rust","rust-proc-macro"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/jni-mangle","language":"Rust","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/ewpratten.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},"funding":{"github":"ewpratten"}},"created_at":"2023-09-06T14:31:29.000Z","updated_at":"2024-07-14T02:46:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"2e2b8827-30ab-41d3-ba5b-64ffeaee58e3","html_url":"https://github.com/ewpratten/jni-mangle","commit_stats":null,"previous_names":["ewpratten/jni-mangle"],"tags_count":0,"template":false,"template_full_name":"ewpratten/rust-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ewpratten%2Fjni-mangle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ewpratten%2Fjni-mangle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ewpratten%2Fjni-mangle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ewpratten%2Fjni-mangle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ewpratten","download_url":"https://codeload.github.com/ewpratten/jni-mangle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244112701,"owners_count":20399995,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["jni","jni-rust","rust","rust-proc-macro"],"created_at":"2024-10-08T20:41:19.972Z","updated_at":"2025-03-17T21:30:20.760Z","avatar_url":"https://github.com/ewpratten.png","language":"Rust","funding_links":["https://github.com/sponsors/ewpratten"],"categories":[],"sub_categories":[],"readme":"# Rust function mangler for JNI\n[![Crates.io](https://img.shields.io/crates/v/jni-mangle)](https://crates.io/crates/jni-mangle)\n[![Docs.rs](https://docs.rs/jni-mangle/badge.svg)](https://docs.rs/jni-mangle)\n[![Build](https://github.com/Ewpratten/jni-mangle/actions/workflows/build.yml/badge.svg)](https://github.com/Ewpratten/jni-mangle/actions/workflows/build.yml)\n[![Clippy](https://github.com/Ewpratten/jni-mangle/actions/workflows/clippy.yml/badge.svg)](https://github.com/Ewpratten/jni-mangle/actions/workflows/clippy.yml)\n\nThe `jni-mangle` crate provides proc macros for working with Rust functions that are called from Java through JNI.\n\nThe main purpose of this crate is to turn rust functions that might look like this:\n\n```rust\n#[no_mangle]\n#[allow(non_snake_case)]\npub extern \"system\" fn Java_com_example_Example_addTwoNumbers(a: i32, b: i32) -\u003e i32 {\n   a + b    \n}\n```\n\nInto something a little more readable:\n\n```rust\nuse jni_mangle::mangle;\n\n#[mangle(package=\"com.example\", class=\"Example\", method=\"addTwoNumbers\")]\npub fn add_two_numbers(a: i32, b: i32) -\u003e i32 {\n   a + b    \n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fewpratten%2Fjni-mangle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fewpratten%2Fjni-mangle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fewpratten%2Fjni-mangle/lists"}