{"id":13438325,"url":"https://github.com/tensorflow/rust","last_synced_at":"2026-02-14T01:05:48.125Z","repository":{"id":38050366,"uuid":"51115997","full_name":"tensorflow/rust","owner":"tensorflow","description":"Rust language bindings for TensorFlow","archived":false,"fork":false,"pushed_at":"2025-01-12T17:43:04.000Z","size":30155,"stargazers_count":5459,"open_issues_count":70,"forks_count":433,"subscribers_count":119,"default_branch":"master","last_synced_at":"2026-02-09T15:01:14.337Z","etag":null,"topics":["machine-learning","rust","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tensorflow.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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":"2016-02-05T00:32:17.000Z","updated_at":"2026-02-05T09:13:54.000Z","dependencies_parsed_at":"2023-12-03T02:20:57.374Z","dependency_job_id":"716cb6f7-dc78-4fd9-a80d-dd06d204b92b","html_url":"https://github.com/tensorflow/rust","commit_stats":{"total_commits":665,"total_committers":51,"mean_commits":13.03921568627451,"dds":0.5503759398496241,"last_synced_commit":"454da033e4eb5ac3fff96c7bed9734c49d7e3bd3"},"previous_names":["google/tensorflow-rust"],"tags_count":31,"template":false,"template_full_name":null,"purl":"pkg:github/tensorflow/rust","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tensorflow%2Frust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tensorflow%2Frust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tensorflow%2Frust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tensorflow%2Frust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tensorflow","download_url":"https://codeload.github.com/tensorflow/rust/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tensorflow%2Frust/sbom","scorecard":{"id":438044,"data":{"date":"2025-08-11","repo":{"name":"github.com/tensorflow/rust","commit":"1ddf5a348037402f87d67c076bf3019857eae05f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.1,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":3,"reason":"Found 3/9 approved changesets -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 27 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/tensorflow/rust/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/tensorflow/rust/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/tensorflow/rust/ci.yml/master?enable=pin","Warn: pipCommand not pinned by hash: update-docs:15","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:38","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:39","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   3 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T05:06:53.920Z","repository_id":38050366,"created_at":"2025-08-19T05:06:53.927Z","updated_at":"2025-08-19T05:06:53.927Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29427746,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T22:20:51.549Z","status":"ssl_error","status_checked_at":"2026-02-13T22:20:49.838Z","response_time":78,"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":["machine-learning","rust","tensorflow"],"created_at":"2024-07-31T03:01:04.563Z","updated_at":"2026-02-14T01:05:48.099Z","avatar_url":"https://github.com/tensorflow.png","language":"Rust","funding_links":[],"categories":["Libraries","Rust","库 Libraries","其他_机器学习与深度学习","库","Other Versions of YOLO","Summary","Frameworks","Machine Learning","人工智能（Artificial Intelligence）","Bindings"],"sub_categories":["Artificial Intelligence","Machine learning","人工智能 Artificial Intelligence","人工智能","机器学习（Machine Learning）"],"readme":"# \u003cimg alt=\"SIG Rust TensorFlow\" src=\"https://github.com/tensorflow/community/blob/master/sigs/logos/SIGRust.png\" width=\"340\"/\u003e\n[![Version](https://img.shields.io/crates/v/tensorflow.svg)](https://crates.io/crates/tensorflow)\n[![Build status](https://github.com/tensorflow/rust/actions/workflows/ci.yml/badge.svg)](https://github.com/tensorflow/rust/actions/workflows/ci.yml)\n\nTensorFlow Rust provides idiomatic [Rust](https://www.rust-lang.org) language\nbindings for [TensorFlow](https://www.tensorflow.org).\n\n**Notice:** This project is still under active development and not guaranteed to have a\nstable API.\n\n* [Documentation](https://tensorflow.github.io/rust/tensorflow/)\n* [TensorFlow Rust Google Group](https://groups.google.com/a/tensorflow.org/forum/#!forum/rust)\n* [TensorFlow website](https://www.tensorflow.org)\n* [TensorFlow GitHub page](https://github.com/tensorflow/tensorflow)\n\n## Getting Started\nSince this crate depends on the TensorFlow C API, it needs to be downloaded or compiled first. This\ncrate will automatically download or compile the TensorFlow shared libraries for you, but it is also\npossible to manually install TensorFlow and the crate will pick it up accordingly.\n\n### Prerequisites\nIf the TensorFlow shared libraries can already be found on your system, they will be used.  If your\nsystem is x86-64 Linux or Mac, a prebuilt binary will be downloaded, and no special prerequisites\nare needed.\n\nOtherwise, the following dependencies are needed to compile and build this crate, which involves\ncompiling TensorFlow itself:\n\n - git\n - [bazel](https://bazel.build/)\n - Python Dependencies `numpy`, `dev`, `pip` and `wheel`\n - Optionally, CUDA packages to support GPU-based processing\n\nThe TensorFlow website provides detailed instructions on how to obtain and install said dependencies,\nso if you are unsure please [check out the docs](https://www.tensorflow.org/install/source)\n for further details.\n\nSome of the examples use TensorFlow code written in Python and require a full TensorFlow\ninstallation.\n\nThe minimum supported Rust version is 1.58.\n\n### Usage\nAdd this to your `Cargo.toml`:\n\n```toml\n[dependencies]\ntensorflow = \"0.21.0\"\n```\n\nand this to your crate root:\n\n```rust\nextern crate tensorflow;\n```\n\nThen run `cargo build -j 1`. The tensorflow-sys crate's \n[`build.rs`](https://github.com/tensorflow/rust/blob/f204b39/tensorflow-sys/build.rs#L44-L52)\nnow either downloads a pre-built, basic CPU only binary\n([the default](https://github.com/tensorflow/rust/pull/65))\nor compiles TensorFlow if forced to by an environment variable. If TensorFlow\nis compiled during this process, since the full compilation is very memory\nintensive, we recommend using the `-j 1` flag which tells cargo to use only one\ntask, which in turn tells TensorFlow to build with only one task. Though, if\nyou have a lot of RAM, you can obviously use a higher value.\n\nTo include the especially unstable API (which is currently the `expr` module),\nuse `--features tensorflow_unstable`.\n\nFor now, please see the [Examples](https://github.com/tensorflow/rust/tree/master/examples) for more\ndetails on how to use this binding.\n\n## Tensor Max Display\nWhen printing or debugging a tensor, it will print every element by default, this\ncan be modified by changing an environment variable:\n```bash\nTF_RUST_DISPLAY_MAX=5\n```\nWhich will truncate the values if they exceed the limit:\n\n```rust\nlet values: Vec\u003cu64\u003e = (0..100000).collect();\nlet t = Tensor::new(\u0026[2, 50000]).with_values(\u0026values).unwrap();\ndbg!(t);\n```\n```\nt = Tensor\u003cu64\u003e {\n    values: [\n        [0, 1, 2, 3, 4, ...],\n        ...\n    ],\n    dtype: uint64,\n    shape: [2, 50000]\n}\n```\n\n## GPU Support\n\nTo enable GPU support, use the `tensorflow_gpu` feature in your Cargo.toml:\n\n```\n[dependencies]\ntensorflow = { version = \"0.21.0\", features = [\"tensorflow_gpu\"] }\n```\n\n## Manual TensorFlow Compilation\n\nIf you want to work against unreleased/unsupported TensorFlow versions or use a build optimized for\nyour machine, manual compilation is the way to go.\n\nSee [tensorflow-sys/README.md](tensorflow-sys/README.md) for details.\n\n## FAQ's\n\n### Why does the compiler say that parts of the API don't exist?\nThe especially unstable parts of the API (which is currently the `expr` module) are\nfeature-gated behind the feature `tensorflow_unstable` to prevent accidental\nuse. See http://doc.crates.io/manifest.html#the-features-section.\n(We would prefer using an `#[unstable]` attribute, but that\n[doesn't exist](https://github.com/rust-lang/rfcs/issues/1491) yet.)\n\n### How do I...?\nTry the [documentation](https://tensorflow.github.io/rust/tensorflow/) first, and see if it answers\nyour question.  If not, take a look at the examples folder.  Note that there may not be an example\nfor your exact question, but it may be answered by an example demonstrating something else.\n\nIf none of the above help, you can ask your question on\n[TensorFlow Rust Google Group](https://groups.google.com/a/tensorflow.org/forum/#!forum/rust).\n\n## Contributing\nDevelopers and users are welcome to join the\n[TensorFlow Rust Google Group](https://groups.google.com/a/tensorflow.org/forum/#!forum/rust).\n\nPlease read the [contribution guidelines](CONTRIBUTING.md) on how to contribute code.\n\nThis is not an official Google product.\n\nRFCs are [issues tagged with RFC](https://github.com/tensorflow/rust/labels/rfc).\nCheck them out and comment. Discussions are welcomed. After all, that is the purpose of\nRequest For Comment!\n\n## License\nThis project is licensed under the terms of the [Apache 2.0 license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftensorflow%2Frust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftensorflow%2Frust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftensorflow%2Frust/lists"}