{"id":37685528,"url":"https://github.com/yuzawa-san/onnxruntime-java","last_synced_at":"2026-01-16T12:31:52.539Z","repository":{"id":37941756,"uuid":"461034649","full_name":"yuzawa-san/onnxruntime-java","owner":"yuzawa-san","description":"A type-safe, lightweight, modern, and performant binding Java binding of Microsoft's ONNX Runtime","archived":false,"fork":false,"pushed_at":"2025-12-02T23:31:21.000Z","size":2648,"stargazers_count":24,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-12-05T23:47:20.589Z","etag":null,"topics":["ai-framework","deep-learning","java","machine-learning","onnx","onnxruntime","panama"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yuzawa-san.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-02-18T23:20:51.000Z","updated_at":"2025-12-02T23:31:18.000Z","dependencies_parsed_at":"2023-10-02T23:23:34.152Z","dependency_job_id":"684af9be-fde0-4511-9c57-27f4b343735d","html_url":"https://github.com/yuzawa-san/onnxruntime-java","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/yuzawa-san/onnxruntime-java","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuzawa-san%2Fonnxruntime-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuzawa-san%2Fonnxruntime-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuzawa-san%2Fonnxruntime-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuzawa-san%2Fonnxruntime-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yuzawa-san","download_url":"https://codeload.github.com/yuzawa-san/onnxruntime-java/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuzawa-san%2Fonnxruntime-java/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478668,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: 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":["ai-framework","deep-learning","java","machine-learning","onnx","onnxruntime","panama"],"created_at":"2026-01-16T12:31:51.818Z","updated_at":"2026-01-16T12:31:52.531Z","avatar_url":"https://github.com/yuzawa-san.png","language":"Java","funding_links":[],"categories":["人工智能"],"sub_categories":["自然语言处理"],"readme":"# onnxruntime-java\nby [@yuzawa-san](https://github.com/yuzawa-san/)\n\n[![build](https://github.com/yuzawa-san/onnxruntime-java/workflows/build/badge.svg)](https://github.com/yuzawa-san/onnxruntime-java/actions)\n[![codecov](https://codecov.io/gh/yuzawa-san/onnxruntime-java/branch/master/graph/badge.svg)](https://codecov.io/gh/yuzawa-san/onnxruntime-java)\n\nThis is an **performant** and **modern** Java binding to Microsoft's [ONNX Runtime](https://github.com/microsoft/onnxruntime) which uses Java's new Foreign Function \u0026 Memory API (a.k.a. Project Panama).\n\nThis project's goals are to provide a type-safe, lightweight, and performant binding which abstracts a lot of the native and C API intricacies away behind a Java-friendly interface.\nThis is loosely coupled to the upstream project and built off of the public (and stable) [C API](https://onnxruntime.ai/docs/api/c/struct_ort_api.html).\n\nThe minimum supported Java version is 23, since the FFI API was first stabilized in that version.\nThere are [other](https://github.com/bytedeco/javacpp-presets/tree/master/onnxruntime) [fine](https://github.com/microsoft/onnxruntime/tree/main/java) bindings which use JNI and are capable of supporting earlier Java versions.\n\n## Usage\n\n\nThis project is released to [Maven Central](https://search.maven.org/artifact/com.jyuzawa/onnxruntime) and can be used in your project.\n\n### Artifacts\n\nThe library is currently built for Linux, Windows, MacOS and for arm64 and x86_64.\nThese were chosen since the upstream projects publishes artifacts for these enviroments.\nHere are the artifacts published listed below.\nSnapshot releases are periodically released for testing and experimentation.\n\n#### onnxruntime\n\n[![maven](https://img.shields.io/maven-central/v/com.jyuzawa/onnxruntime)](https://search.maven.org/artifact/com.jyuzawa/onnxruntime)  [![javadoc](https://javadoc.io/badge2/com.jyuzawa/onnxruntime/javadoc.svg)](https://javadoc.io/doc/com.jyuzawa/onnxruntime) [![maven-snapshot](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Fs01.oss.sonatype.org%2Fcontent%2Frepositories%2Fsnapshots%2Fcom%2Fjyuzawa%2Fonnxruntime%2Fmaven-metadata.xml)](https://s01.oss.sonatype.org/content/repositories/snapshots/com/jyuzawa/onnxruntime/)\n\nThe binding with no native libraries. For use as a implementation dependency.\n\nThe native library (from [Microsoft](https://github.com/microsoft/onnxruntime/releases)) will need to be provided at runtime using one of the next two artifacts.\nAlternatively, the Java library path (`java.library.path`) will be used if neither of those artifacts is provided.\nThis allows users to \"bring their own\" shared library.\nThe API has a validation to make sure the shared library is minor version compatible with this library.\n\n#### onnxruntime-cpu\n\n[![maven](https://img.shields.io/maven-central/v/com.jyuzawa/onnxruntime-cpu)](https://search.maven.org/artifact/com.jyuzawa/onnxruntime-cpu)  [![maven-snapshot](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Fs01.oss.sonatype.org%2Fcontent%2Frepositories%2Fsnapshots%2Fcom%2Fjyuzawa%2Fonnxruntime-cpu%2Fmaven-metadata.xml)](https://s01.oss.sonatype.org/content/repositories/snapshots/com/jyuzawa/onnxruntime-cpu/)\n\nA collection of native libraries with CPU support for a several common OS/architecture combinations. For use as an optional runtime dependency. Include one of the OS/Architecture classifiers like `osx-x86_64` to provide specific support.\n\n#### onnxruntime-gpu\n\nSee https://github.com/yuzawa-san/onnxruntime-java/issues/258\n\n### In your library\n\nThere is an example library in the `onnxruntime-sample-library` directory.\nThe library should use the `onnxruntime` as a implementation dependency.\nThis puts the burden of providing a native library on your end user.\n\n### In your application\n\nThere is an example application in the `onnxruntime-sample-application` directory.\nThe library should use the `onnxruntime` as a implementation dependency.\nThe application needs to have acccess to the native library.\nYou have the option providing it via a runtime dependency using either a classifier variant from `onnxruntime-cpu`.\nOtherwise, the Java library path will be used to load the native library.\n\n\nThe example application can be ran:\n````bash\n./gradlew onnxruntime-sample-application:run\n````\n\n#### JVM Arguments\n\nSince this uses a native library, this will require the runtime to have the `--enable-native-access` JVM option, likely `--enable-native-access=ALL-UNNAMED`.\n\n### Execution Providers\n\nOnly those which are exposed in the C API are supported.\nIf you wish to use another execution provider which is present in the C API, but not in any of the artifacts from the upstream project, you can choose to bring your own onnxruntime shared library to link against.\n\n## Versioning\n\nThe version of the upstream project used will be reflected in the release notes.\nSemantic versioning is used.\nMajor version will be bumped when this API or the underlying C API has backward incompatible changes.\nUpstream major version changes will typically be major version changes here.\nMinor version will be bumped for smaller, but compatible changes.\nUpstream minor version changes will typically be minor version changes here.\n\nThe `onnxruntime-cpu` artifacts are versioned to match the upstream versions and depend on a minimum compatible `onnxruntime` version.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuzawa-san%2Fonnxruntime-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuzawa-san%2Fonnxruntime-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuzawa-san%2Fonnxruntime-java/lists"}