# Hubro SDK
This package facilitates development of [Hubro Platform](https://live.hubroplatform.no) plugins.
See [https://docs.hubroplatform.no/extending-hubro.html](https://docs.hubroplatform.no/extending-hubro.html) to get guidance on how to use this library.
## Development
Crate integrates two features as defined in the `Cargo.toml` file:
```toml
[features]
server = []
mobile = []
```
Server feature is meant to be used for plugins that run on a server side, mobile feature is meant to be used for plugins that run on a mobile device.
@src/fhir.rs implements the FHIR related logic
@src/plugin.rs implements the plugin related logic necessary for its deployment
@src/toolbox.rs implements the toolbox related logic e.g. OTP (One Time Password) interception
## Deployment
Make sure that the build is clean
```bash
cargo build --target wasm32-wasip1 --release
```
Publish the crate afterward
```bash
cargo publish --allow-dirty
```
For further binary size reduction, run:
```Bash
wasm-opt --all-features -Oz -o optimized.wasm /Users/muznymir/hello-wasi/target/wasm32-wasip1/release/federated_sample.wasm
```