{"id":27962326,"url":"https://github.com/thoughtworks/smip","last_synced_at":"2025-05-07T19:20:31.751Z","repository":{"id":252132095,"uuid":"793965075","full_name":"thoughtworks/smip","owner":"thoughtworks","description":"A framework for SOME/IP development in Rust","archived":false,"fork":false,"pushed_at":"2024-08-07T14:10:11.000Z","size":127,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-08-07T22:50:24.443Z","etag":null,"topics":["rust","sdv","someip"],"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/thoughtworks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2024-04-30T07:47:15.000Z","updated_at":"2024-08-07T22:50:48.383Z","dependencies_parsed_at":"2024-08-08T04:33:25.972Z","dependency_job_id":null,"html_url":"https://github.com/thoughtworks/smip","commit_stats":null,"previous_names":["thoughtworks/smip"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoughtworks%2Fsmip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoughtworks%2Fsmip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoughtworks%2Fsmip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoughtworks%2Fsmip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thoughtworks","download_url":"https://codeload.github.com/thoughtworks/smip/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252941286,"owners_count":21828844,"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":["rust","sdv","someip"],"created_at":"2025-05-07T19:20:30.992Z","updated_at":"2025-05-07T19:20:31.728Z","avatar_url":"https://github.com/thoughtworks.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# smip - A framework for SOME/IP development in Rust\n**smip** aims to make SOME/IP development in Rust feel as natural as building regular web services.\n\nIt offers a higher-level abstraction over the underlying protocol, making it easier to use and understand by providing a cleaner more structured way to define services by leveraging Rust's powerful macro system, something similar to [rocket.rs](https://rocket.rs/) but for SOME/IP.\n\n## Example\nLet's look at a simple \"Hello World\" example using smip. \n\n```rust\nuse smip::{Runtime, RuntimeConfig, Service};\n\n#[smip::service(id = 0x1234, major_version = 1, minor_version = 0)]\nstruct MyService {\n    x: u32,\n}\n\n#[smip::methods_impl]\nimpl MyService {\n\n    #[smip_method(id = 1)]\n    fn add(\u0026mut self, value: u32) -\u003e u32 {\n        self.x += value;\n        self.x\n    }\n\n    #[smip_method(id = 2)]\n    fn hello(\u0026self) -\u003e String {\n        \"Hello World!\".to_string()\n    }\n}\n\nfn main() {\n    let config = smip::RuntimeConfig::new(\"Simple\", 0xABCD, 0x1);\n\n    let application = Runtime::new(config).service(\n        MyService {\n        x: 0\n    }, 30509);\n\n    let _ = application.run();\n}\n```\n\nA service is represented by a struct, `MyService` in this case, with a `service` attribute for providing its `id` and other metadata like the `major_version` (optional) and `minor_version` (optional). This struct will also hold all of the service's state. \n\nSOME/IP methods are just rust methods with a special `smip_method` attribute to indicate its id. Whatever you pass as an argument to your method is parsed automatically from the payload, and whatever you return from it serialized into a response and sent back.\nAll of these need to be in a special impl block marked with a `methods_impl` attribute for the framework to recognize them. \n\nThere are two methods\n\nA `Runtime` needs to be created using a `RuntimeConfig` which which take care of creating and running all of your services.\n\nAfter adding all your services to the `Runtime`, call `runtime.run()` to start all the services.\n\n## Goal\n\n**smip** aims to be a SOME/IP framework and not an implementation of SOME/IP, so its not competing with [vSomeIP](https://github.com/COVESA/vsomeip) or [SommR](https://projects.eclipse.org/projects/automotive.sommr). Currently vSomeIP is used as the underlying implementation but this can be swapped with any compliant implementation in the future. \n\n\n## Key Benefits\n* **Macro-Based Definition**: The smip macro simplifies the definition of services and methods, reducing the amount of code needed.\n* **Automatic Serialization/Deserialization**: smip handles the serialization and deserialization of your service's data types, so you don't have to write it yourself.\n* **Rust-Idiomatic API**: The framework's API is designed to be Rust-friendly, with a focus on clarity and simplicity.\n* **Improved Developer Experience**: smip streamlines the development process, making it easier to create and manage SOME/IP services in Rust.\n\n\n⚠️ **This is a highly experimental framework and doesn't support all of the features in SOME/IP**\n\n## Build\n\n**smip** requires a working installation of vsomeip, for more info refer to the **Install vsomeip** section of the [vsomeip-rs README](crates/vsomeip-rs/README.md).\n\n## Run\nFor a working demo see `examples/simple.rs` and `examples/simple_client.rs`:\n\nTo run locally,\n```bash\ncargo run --example simple\n```\nIn another terminal,\n```bash\ncargo run --example simple_client\n```\n\n- You may need to set the `LD_LIBRARY_PATH` environment to a path that contains the vSomeIP library as this is dynamically loaded `LD_LIBRARY_PATH=/usr/local/lib`\n\n\n## License\n\n- smip is licensed under [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0), check [LICENSE.md](./LICENSE.md) for more information.\n- This project uses the vSomeIP library which is licensed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthoughtworks%2Fsmip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthoughtworks%2Fsmip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthoughtworks%2Fsmip/lists"}