{"id":26005369,"url":"https://github.com/precice/rust-bindings","last_synced_at":"2025-03-05T20:53:42.080Z","repository":{"id":77883632,"uuid":"603867717","full_name":"precice/rust-bindings","owner":"precice","description":"preCICE language bindings for rust","archived":false,"fork":false,"pushed_at":"2024-12-14T19:26:22.000Z","size":42,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-02-28T14:08:39.207Z","etag":null,"topics":["bindings","rust"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/precice","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/precice.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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},"funding":{"custom":"https://precice.org/community-support-precice"}},"created_at":"2023-02-19T19:49:08.000Z","updated_at":"2024-12-14T19:26:25.000Z","dependencies_parsed_at":"2023-02-28T14:03:03.469Z","dependency_job_id":"adadd6f9-055f-40a0-a981-536cfb00d435","html_url":"https://github.com/precice/rust-bindings","commit_stats":{"total_commits":28,"total_committers":2,"mean_commits":14.0,"dds":0.0357142857142857,"last_synced_commit":"d8c32a977eb0d2ce96f2a3434ee3d5154afe823d"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/precice%2Frust-bindings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/precice%2Frust-bindings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/precice%2Frust-bindings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/precice%2Frust-bindings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/precice","download_url":"https://codeload.github.com/precice/rust-bindings/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242103923,"owners_count":20072366,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["bindings","rust"],"created_at":"2025-03-05T20:53:41.591Z","updated_at":"2025-03-05T20:53:42.075Z","avatar_url":"https://github.com/precice.png","language":"Rust","funding_links":["https://precice.org/community-support-precice"],"categories":[],"sub_categories":[],"readme":"# Rust language bindings for the C++ library preCICE\n\nThis package provides rust language bindings for the C++ library [preCICE](https://github.com/precice/precice). Note that the first two digits of the version number of the bindings indicate the preCICE version that the bindings support. The last digit represents the version of the bindings. Example: `2.5.0` and `2.5.2` of the bindings represent versions `0` and `2` of the bindings that are compatible with preCICE `2.5.x`.\n\n## User documentation\n\nPlease refer to [the preCICE documentation](https://www.precice.org/installation-bindings-rust.html) for information on how to install and use the rust bindings.\n\n## Required dependencies\n\n**preCICE**: Refer to [the preCICE documentation](https://precice.org/installation-overview.html) for information on building and installation.\n\n**pkg-config**: A working installation of pkg-config, which is able to find preCICE\n\n**cargo**: A working installation of cargo\n\n## Installing the package from the registry\n\n```\n$ cargo add precice@3\n```\n\n## Installing the package from the git repository\n\n```\n$ cargo add --git https://github.com/precice/rust-bindings.git --rev v3.0.0 precice\n```\n\n## Usage\n\n```rust\nuse precice\n\n// create a solver interface\nlet mut participant = precice::Participant::new(\"Solver\", \"config.xml\", 0, 1);\n\n// get dimensions of a mesh\nlet meshDims = participant.get_mesh_dimensions(\"Mesh\");\nassert!(meshDims == 2);\n\n// define coordinates\nlet coords = Vec::from([1., 1., 2., 2., 3., 3., 4., 4.]);\nlet mut vertices = vec![0_i32; 4]\nparticipant.set_mesh_vertices(\"Mesh\", \u0026coords, \u0026mut vertices);\n\nparticipant.initialize();\n```\n\nSee the solverdummy under `examples/` for more details.\n\n## Contributors\n\n* [Frédéric Simonis](https://github.com/fsimonis)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprecice%2Frust-bindings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprecice%2Frust-bindings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprecice%2Frust-bindings/lists"}