Data Modelling SDK
Shared SDK for model operations across platforms (API, WASM, Native).
Copyright (c) 2025 Mark Olliver - Licensed under MIT
Features
- Storage Backends: File system, browser storage (IndexedDB/localStorage), and HTTP API
- Model Loading/Saving: Load and save models from various storage backends
- Import/Export: Import from SQL, ODCL, JSON Schema, AVRO, Protobuf; Export to various formats
- Validation: Table and relationship validation (naming conflicts, circular dependencies)
Usage
File System Backend (Native Apps)
use FileSystemStorageBackend;
use ModelLoader;
let storage = new;
let loader = new;
let result = loader.load_model.await?;
Browser Storage Backend (WASM Apps)
use BrowserStorageBackend;
use ModelLoader;
let storage = new;
let loader = new;
let result = loader.load_model.await?;
API Backend (Online Mode)
use ApiStorageBackend;
use ModelLoader;
let storage = new;
let loader = new;
let result = loader.load_model.await?;
Development
Pre-commit Hooks
This project uses pre-commit hooks to ensure code quality. Install them with:
# Install pre-commit (if not already installed)
# Install the git hooks
# Run hooks manually on all files
The hooks will automatically run on git commit and check:
- Rust formatting (
cargo fmt) - Rust linting (
cargo clippy) - Security audit (
cargo audit) - File formatting (trailing whitespace, end of file, etc.)
- YAML/TOML/JSON syntax
CI/CD
GitHub Actions workflows automatically run on push and pull requests:
- Lint: Format check, clippy, and security audit
- Test: Unit and integration tests on Linux, macOS, and Windows
- Build: Release build verification
- Publish: Automatic publishing to crates.io on main branch (after all checks pass)
Status
The SDK structure is in place. The actual implementation of import/export/validation logic is being migrated incrementally from the parent crate. Currently, the SDK provides:
- ✅ Storage backend abstraction and implementations
- ✅ Model loader/saver structure
- ✅ Import/export module structure
- ✅ Validation module structure
- ⏳ Full implementation of parsers/exporters (in progress)