# videosdk-iot
ESP-IDF component that bundles a prebuilt Rust staticlib for the VideoSDK
audio path on **ESP32-S3-Korvo-2** boards. The Rust media implementation
ships as bytes only (`libkorvo2_audio_videosdk.a`); the C glue layers
(`libpeer`, `audio_bridge`) ship as source and are compiled by the
consumer's IDF.
## Layout
```
videosdk-iot/
├── CMakeLists.txt
├── idf_component.yml
├── README.md
├── include/
│ └── korvo2_audio_videosdk.h ← public C ABI
├── lib/
│ └── esp32s3/
│ └── libkorvo2_audio_videosdk.a ← closed-source Rust staticlib
└── components/
├── audio_bridge/ ← open-source C glue
└── libpeer/ ← open-source WebRTC stack
```
To support more chips, drop a sibling `.a` (e.g. `lib/esp32c6/...`) — the
top-level `CMakeLists.txt` selects the right one from `IDF_TARGET`
automatically.
## Usage
In your consuming project's `main/idf_component.yml`:
```yaml
dependencies:
jays0223/videosdk-iot: "^0.0.1"
```
In your `app_main`:
```c
#include "korvo2_audio_videosdk.h"
void app_main(void) {
/* Bring up WiFi yourself first. */
korvo2_audio_videosdk_config_t cfg = {
.token = "<jwt>",
.meeting_id = "<id>",
.peer_name = "Korvo2",
.volume = 80,
};
korvo2_audio_videosdk_run(&cfg); /* blocks forever on success */
}
```
## Publishing
```sh
pip install idf-component-manager
export IDF_COMPONENT_API_TOKEN=<token-from-components.espressif.com>
cd /Users/karanrajput/esp-rs/videosdk-iot
compote component upload --namespace jays0223 --name videosdk-iot
```
## Updating the prebuilt staticlib
```sh
# 1. Rebuild from the Rust source tree
cd /Users/karanrajput/videosdk-rust-sdk/esp32/examples/korvo2_audio
cargo build --release --lib --no-default-features
# 2. Copy the fresh .a into this component
cp target/xtensa-esp32s3-espidf/release/libkorvo2_audio_videosdk.a \
/Users/karanrajput/esp-rs/videosdk-iot/lib/esp32s3/
# 3. Bump `version:` in idf_component.yml, then republish.
```
idf.py add-dependency "jays0223/videosdk-iot^0.0.6"