[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-5704":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":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":25,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":30,"readmeContent":31,"aiSummary":32,"trendingCount":16,"starSnapshotCount":16,"syncStatus":17,"lastSyncTime":33,"discoverSource":34},5704,"rust-bindgen","rust-lang\u002Frust-bindgen","rust-lang","Automatically generates Rust FFI bindings to C (and some C++) libraries.","https:\u002F\u002Frust-lang.github.io\u002Frust-bindgen\u002F",null,"Rust",5209,809,50,505,0,2,11,30,10,39.73,"BSD 3-Clause \"New\" or \"Revised\" License",false,"main",true,[27,28,29],"bindings","codegen","ffi","2026-06-12 02:01:14","[![crates.io](https:\u002F\u002Fimg.shields.io\u002Fcrates\u002Fv\u002Fbindgen.svg)](https:\u002F\u002Fcrates.io\u002Fcrates\u002Fbindgen)\n[![docs.rs](https:\u002F\u002Fdocs.rs\u002Fbindgen\u002Fbadge.svg)](https:\u002F\u002Fdocs.rs\u002Fbindgen\u002F)\n\n# `bindgen`\n\n**`bindgen` automatically generates Rust FFI bindings to C (and some C++) libraries.**\n\nFor example, given the C header `doggo.h`:\n\n```c\ntypedef struct Doggo {\n    int many;\n    char wow;\n} Doggo;\n\nvoid eleven_out_of_ten_majestic_af(Doggo* pupper);\n```\n\n`bindgen` produces Rust FFI code allowing you to call into the `doggo` library's\nfunctions and use its types:\n\n```rust\n\u002F* automatically generated by rust-bindgen 0.99.9 *\u002F\n\n#[repr(C)]\npub struct Doggo {\n    pub many: ::std::os::raw::c_int,\n    pub wow: ::std::os::raw::c_char,\n}\n\nextern \"C\" {\n    pub fn eleven_out_of_ten_majestic_af(pupper: *mut Doggo);\n}\n```\n\n## Users Guide\n\n[📚 Read the `bindgen` users guide here! 📚](https:\u002F\u002Frust-lang.github.io\u002Frust-bindgen)\n\n## MSRV\n\nThe `bindgen` minimum supported Rust version is **1.70.0**.\n\nThe `bindgen-cli` minimum supported Rust version is **1.70.0**.\n\nNo MSRV bump policy has been established yet, so MSRV may increase in any release.\n\nThe MSRV is the minimum Rust version that can be used to *compile* each crate. However, `bindgen` and `bindgen-cli` can generate bindings that are compatible with Rust versions below the current MSRV.\n\nMost of the time, the `bindgen-cli` crate will have a more recent MSRV than `bindgen` as crates such as `clap` require it. \n\n## API Reference\n\n[API reference documentation is on docs.rs](https:\u002F\u002Fdocs.rs\u002Fbindgen)\n\n## Environment Variables\n\nIn addition to the [library API](https:\u002F\u002Fdocs.rs\u002Fbindgen) and [executable command-line API][bindgen-cmdline],\n`bindgen` can be controlled through environment variables.\n\nEnd-users should set these environment variables to modify `bindgen`'s behavior without modifying the source code of direct consumers of `bindgen`.\n\n- `BINDGEN_EXTRA_CLANG_ARGS`: extra arguments to pass to `clang`\n    - Arguments are whitespace-separated\n    - Use shell-style quoting to pass through whitespace\n    - Examples:\n        - Specify alternate sysroot: `--sysroot=\u002Fpath\u002Fto\u002Fsysroot`\n        - Add include search path with spaces: `-I\"\u002Fpath\u002Fwith spaces\"`\n- `BINDGEN_EXTRA_CLANG_ARGS_\u003CTARGET>`: similar to `BINDGEN_EXTRA_CLANG_ARGS`,\n   but used to set per-target arguments to pass to clang. Useful to set system include\n   directories in a target-specific way in cross-compilation environments with multiple targets.\n   Has precedence over `BINDGEN_EXTRA_CLANG_ARGS`.\n\nAdditionally, `bindgen` uses `libclang` to parse C and C++ header files.\nTo modify how `bindgen` searches for `libclang`, see the [`clang-sys` documentation][clang-sys-env].\nFor more details on how `bindgen` uses `libclang`, see the [`bindgen` users guide][bindgen-book-clang].\n\n## Releases\n\nWe don't follow a specific release calendar, but if you need a release please\nfile an issue requesting that (ping `@emilio` for increased effectiveness).\n\n## Contributing\n\n[See `CONTRIBUTING.md` for hacking on `bindgen`!](.\u002FCONTRIBUTING.md)\n\n[bindgen-cmdline]: https:\u002F\u002Frust-lang.github.io\u002Frust-bindgen\u002Fcommand-line-usage.html\n[clang-sys-env]: https:\u002F\u002Fgithub.com\u002FKyleMayes\u002Fclang-sys#environment-variables\n[bindgen-book-clang]: https:\u002F\u002Frust-lang.github.io\u002Frust-bindgen\u002Frequirements.html#clang\n","`rust-bindgen`是一个自动为C（以及部分C++）库生成Rust FFI绑定的工具。其核心功能包括从C\u002FC++头文件自动生成Rust代码，使得Rust程序可以直接调用这些库中的函数和使用相关数据类型，极大简化了跨语言开发的工作量。它利用`libclang`解析C\u002FC++头文件，并支持通过环境变量进一步定制行为，如传递额外的`clang`参数等。适用于需要在Rust项目中集成或利用现有C\u002FC++库的场景，特别是在系统级编程、游戏开发等领域，能够有效促进不同语言生态间的协作与复用。","2026-06-11 03:04:49","top_language"]