docs.rs failed to build gmsh_ffi-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Gmsh Rust Bindings
本项目提供 Rust 对 Gmsh SDK 的 FFI 绑定。
生成 src/bindings.rs
绑定文件由 bindgen 命令行工具从 Gmsh 的 C API 头文件生成。不要在构建时自动生成,因为 Windows 下 bindgen 库可能无法正常运行,且头文件很少变动,手动生成即可。
前提
- 已安装 bindgen 命令行工具:
- Gmsh SDK 已下载到
external/<platform>/gmsh/(运行cargo build会自动下载)。
命令
其中 <platform> 根据您的操作系统选择:
- Linux:
linux - Windows:
windows - macOS (Intel):
macos - macOS (Apple Silicon):
macos_arm
Windows 示例:
注意事项
- 绑定仅在安装有对应平台 Gmsh SDK 的开发机上生成一次,生成结果提交到版本管理,后续其他开发者直接使用。
- 如需升级 Gmsh SDK 版本,更新
build.rs中的GMSH_VERSION常量后重新执行上述命令。