Metadata-Version: 2.4
Name: bc_edu_sdk
Version: 0.4.0
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
License-File: LICENSE
Summary: BrainCo EDU Serial SDK for educational device integration
Author: BrainCo, Yongle-Fu
License: 	
Requires-Python: >=3.8
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Source Code, https://github.com/BrainCoTech/bc-edu-sdk

# BrainCo Device SDK

[PyPI](https://pypi.org/project/bc-edu-sdk/)
[Python](https://github.com/BrainCoTech/stark-serialport-example/tree/main/python/edu)

## Developer Guide

### Cross-Platform Validation

Since the SDK and its core dependencies (such as `bc-ble-core`) contain target-specific conditional compilations (e.g., Windows WinRT or Android JNI), building on macOS only exercises the macOS code path. 

To easily validate that your code changes compile successfully on Windows without leaving your macOS environment, you can run the cross-platform syntax validation script:

```bash
sh scripts/check_cross_platform.sh
```

Under the hood, this script runs:
- `cargo check --target x86_64-pc-windows-msvc -p bc-ble-core`

Since the complex, platform-specific Windows conditional-compilation code (WinRT BLE adapters) resides entirely inside the pure Rust `bc-ble-core` crate, validating it directly is extremely fast and guaranteed to succeed on macOS/Linux without encountering C-dependency cross-compilation compiler errors. This is highly recommended to verify your Windows-specific fixes before pushing to the repository.

### Updating Private Dependencies

The SDK depends on the private repository `bc-ble-core` via SSH. Cargo locks the specific commit hash in `Cargo.lock`. 

#### 1. Local Development Patching
For local iterative development and debugging between the SDK and `bc-ble-core`, there is a patch configured at the bottom of the workspace `Cargo.toml`:
```toml
[patch."ssh://git@github.com/BrainCoTech/bc-ble-core.git"]
bc-ble-core = { path = "../bc-ble-core" }
```
When this patch is active, Cargo will automatically compile and check against your local, uncommitted changes in `../bc-ble-core` whenever you compile or check this repository.

#### 2. Syncing Remote Updates
When changes in `bc-ble-core` are pushed to the remote branch (e.g., `main`), your local environment and the CI will **NOT** automatically pull the latest commit due to lockfile pinning. 

To force Cargo to pull the latest remote changes of `bc-ble-core`, run:
```bash
cargo update -p bc-ble-core
```
Then, commit and push the updated `Cargo.lock` to trigger the CI with the correct dependency commit.

