[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-5679":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":22,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":30,"lastSyncTime":31,"discoverSource":32},5679,"rust","tensorflow\u002Frust","tensorflow","Rust language bindings for TensorFlow","",null,"Rust",5482,435,119,63,0,5,13,1,38.92,"Apache License 2.0",true,false,"master",[26,5,7],"machine-learning","2026-06-12 02:01:13","# \u003Cimg alt=\"SIG Rust TensorFlow\" src=\"https:\u002F\u002Fgithub.com\u002Ftensorflow\u002Fcommunity\u002Fblob\u002Fmaster\u002Fsigs\u002Flogos\u002FSIGRust.png\" width=\"340\"\u002F>\n[![Version](https:\u002F\u002Fimg.shields.io\u002Fcrates\u002Fv\u002Ftensorflow.svg)](https:\u002F\u002Fcrates.io\u002Fcrates\u002Ftensorflow)\n[![Build status](https:\u002F\u002Fgithub.com\u002Ftensorflow\u002Frust\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Ftensorflow\u002Frust\u002Factions\u002Fworkflows\u002Fci.yml)\n\nTensorFlow Rust provides idiomatic [Rust](https:\u002F\u002Fwww.rust-lang.org) language\nbindings for [TensorFlow](https:\u002F\u002Fwww.tensorflow.org).\n\n**Notice:** This project is still under active development and not guaranteed to have a\nstable API.\n\n* [Documentation](https:\u002F\u002Ftensorflow.github.io\u002Frust\u002Ftensorflow\u002F)\n* [TensorFlow Rust Google Group](https:\u002F\u002Fgroups.google.com\u002Fa\u002Ftensorflow.org\u002Fforum\u002F#!forum\u002Frust)\n* [TensorFlow website](https:\u002F\u002Fwww.tensorflow.org)\n* [TensorFlow GitHub page](https:\u002F\u002Fgithub.com\u002Ftensorflow\u002Ftensorflow)\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:\u002F\u002Fbazel.build\u002F)\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:\u002F\u002Fwww.tensorflow.org\u002Finstall\u002Fsource)\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:\u002F\u002Fgithub.com\u002Ftensorflow\u002Frust\u002Fblob\u002Ff204b39\u002Ftensorflow-sys\u002Fbuild.rs#L44-L52)\nnow either downloads a pre-built, basic CPU only binary\n([the default](https:\u002F\u002Fgithub.com\u002Ftensorflow\u002Frust\u002Fpull\u002F65))\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:\u002F\u002Fgithub.com\u002Ftensorflow\u002Frust\u002Ftree\u002Fmaster\u002Fexamples) 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> = (0..100000).collect();\nlet t = Tensor::new(&[2, 50000]).with_values(&values).unwrap();\ndbg!(t);\n```\n```\nt = Tensor\u003Cu64> {\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\u002Funsupported TensorFlow versions or use a build optimized for\nyour machine, manual compilation is the way to go.\n\nSee [tensorflow-sys\u002FREADME.md](tensorflow-sys\u002FREADME.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:\u002F\u002Fdoc.crates.io\u002Fmanifest.html#the-features-section.\n(We would prefer using an `#[unstable]` attribute, but that\n[doesn't exist](https:\u002F\u002Fgithub.com\u002Frust-lang\u002Frfcs\u002Fissues\u002F1491) yet.)\n\n### How do I...?\nTry the [documentation](https:\u002F\u002Ftensorflow.github.io\u002Frust\u002Ftensorflow\u002F) 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:\u002F\u002Fgroups.google.com\u002Fa\u002Ftensorflow.org\u002Fforum\u002F#!forum\u002Frust).\n\n## Contributing\nDevelopers and users are welcome to join the\n[TensorFlow Rust Google Group](https:\u002F\u002Fgroups.google.com\u002Fa\u002Ftensorflow.org\u002Fforum\u002F#!forum\u002Frust).\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:\u002F\u002Fgithub.com\u002Ftensorflow\u002Frust\u002Flabels\u002Frfc).\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","TensorFlow Rust 项目为 TensorFlow 提供了原生的 Rust 语言绑定。它支持机器学习模型的加载、执行和操作，使得 Rust 开发者能够利用 TensorFlow 的强大功能。该项目采用 Apache License 2.0 许可证，目前仍在积极开发中，API 尚未完全稳定。适合需要在 Rust 环境下进行机器学习开发的场景，尤其是对性能和安全性有较高要求的应用。依赖于 TensorFlow C API，自动处理库的下载或编译过程，并且可以通过设置环境变量来定制构建选项，支持 CPU 和 GPU（需额外安装 CUDA 包）计算。最低支持的 Rust 版本为 1.58。",2,"2026-06-11 03:04:39","top_language"]