# Hubro SDK
This package facilitates the 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.
Feel free to refer to the `AGENTS.md` file for detailed information on the SDK's features and development practices.
## 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/mobile.rs` implements routines for interacting with a phone
`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 unoptimized.wasm
```