33 lines
881 B
Markdown
33 lines
881 B
Markdown
# wip-interface
|
|
|
|
Public Rust authoring API for Worldspace Interface Protocol (WIP) interfaces and application DTO codecs.
|
|
|
|
The crate re-exports `#[interface]` and `#[derive(WipType)]`, generates Interface Descriptors and typed dispatch companions, and converts application-owned Rust values to and from the transport-independent value model.
|
|
|
|
```toml
|
|
[dependencies]
|
|
wip-interface = "0.2.0"
|
|
```
|
|
|
|
```rust
|
|
use wip_interface as wip;
|
|
|
|
#[derive(wip::WipType)]
|
|
struct Greeting {
|
|
message: String,
|
|
}
|
|
|
|
#[wip::interface]
|
|
pub trait Greeter {
|
|
/// Builds a greeting.
|
|
///
|
|
/// # Returns
|
|
/// The generated greeting.
|
|
fn greet(&self, name: String) -> wip::OperationResult<Greeting>;
|
|
}
|
|
```
|
|
|
|
See the [API documentation](https://docs.rs/wip-interface) for supported interface syntax, DTO shapes, and failure semantics.
|
|
|
|
Licensed under either of Apache-2.0 or MIT at your option.
|