Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/duskmoon314/p4runtime-rs
https://github.com/duskmoon314/p4runtime-rs
Last synced: 29 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/duskmoon314/p4runtime-rs
- Owner: duskmoon314
- License: apache-2.0
- Created: 2024-04-23T03:42:59.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-05-15T12:34:31.000Z (6 months ago)
- Last Synced: 2024-05-16T02:19:08.831Z (6 months ago)
- Language: Rust
- Size: 124 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# P4Runtime for Rust
This repo contains the generated Rust code for the P4Runtime protobuf definitions.
## Usage
### Version
`p4runtime`'s version is composed of two parts:
- The version of this crate.
- It will be updated when the generated Rust code differs from the previous version.
- The version of the P4Runtime protobuf definitions.
- `1.4.0-rc.5` becomes `+1.4.0.rc.5`.`googleapis` does not provide a version for me to use, and it seems `rpc/status.proto` has not been updated for a long time. So this may not be a problem.
## Contribution
### Repo Structure
- `src/`: The generated Rust code.
- `src/utils/`: Hand-written utility functions and traits.
- `xtask/`: Rust code for generating this crate.### Generate Rust Code
To generate the Rust code, run the following command:
```sh
# Get git submodule
git submodule update --init# Generate Rust code
cargo xtask
```