https://github.com/polywrap/rust-wrap-client
https://github.com/polywrap/rust-wrap-client
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/polywrap/rust-wrap-client
- Owner: polywrap
- Created: 2022-10-17T19:30:28.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-09T07:35:11.000Z (about 2 years ago)
- Last Synced: 2025-04-13T00:55:28.940Z (11 months ago)
- Language: Rust
- Size: 97.8 MB
- Stars: 7
- Watchers: 3
- Forks: 3
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- awesome-polywrap - Rust / Native
README

# Rust Client [](https://codecov.io/gh/polywrap/rust-client)
Implementation of the Polywrap client in Rust.
## Installation
Add this to your Cargo.toml:
```toml
[dependencies]
polywrap = 0.1.9
```
## Getting started
Create a new Polywrap Client Config Builder instance, add the bundles you want to use, and then create a new Polywrap Client instance from the builder.
```rust
use polywrap::*;
#[derive(Serialize)]
struct Sha3_256Args {
message: String,
}
fn main() {
let mut config = ClientConfig::new();
config.add(SystemClientConfig::default().into());
let client = Client::new(config.build());
let result = client.invoke::(
&uri!("wrapscan.io/polywrap/sha3@1.0"),
"sha3_256",
Some(&to_vec(
&Sha3_256Args {
message: "Hello Polywrap!".to_string(),
}
).unwrap()),
None,
None
);
match result {
Ok(v) => println!("{}", v),
Err(e) => panic!("{}", e),
}
}
```
## Resources
- [Documentation](https://docs.polywrap.io/)
- [Examples](./examples/)
- [Features supported](https://github.com/polywrap/client-readiness/tree/main/clients/rs/src/features)
- [Support](https://discord.polywrap.io)
## Contributions
Please check out our [contributing guide](./CONTRIBUTING.md) for guidelines about how to proceed.