Installation Guide
Choose your platform to get started with MetaMUI Crypto Primitives.
Quick Install
Python
pip install metamui-crypto
Requirements:
- Python 3.8 or higher
- pip package manager
Rust
cargo add metamui-crypto
Requirements:
- Rust 1.70 or higher
- Cargo package manager
TypeScript/JavaScript
npm install @metamui/crypto
# or
yarn add @metamui/crypto
# or
pnpm add @metamui/crypto
Requirements:
- Node.js 16 or higher
- npm, yarn, or pnpm package manager
Swift
// Package.swift
dependencies: [
.package(url: "https://github.com/metamui/crypto-swift", from: "3.0.0")
]
Requirements:
- Swift 5.7 or higher
- Swift Package Manager
Kotlin
// build.gradle.kts
dependencies {
implementation("id.metamui:crypto:3.0.0")
}
Requirements:
- Kotlin 1.8 or higher
- Gradle or Maven
WASM
npm install @metamui/crypto-wasm
# or
yarn add @metamui/crypto-wasm
Requirements:
- Modern browser with WebAssembly support
- Node.js 16+ for server-side usage
Verify Installation
Python
import metamui_crypto
print(metamui_crypto.__version__)
Rust
use metamui_crypto::VERSION;
println!("MetaMUI Crypto version: {}", VERSION);
TypeScript
import { version } from '@metamui/crypto';
console.log(`MetaMUI Crypto version: ${version}`);
Platform-Specific Notes
Python
- Pure Python implementations with optional C extensions
- Type hints included for better IDE support
- Async support for I/O operations
Rust
- Zero-copy operations where possible
no_stdsupport for embedded systems- Feature flags for algorithm selection
TypeScript/JavaScript
- Full TypeScript definitions included
- Works in both Node.js and browsers
- Tree-shakeable for optimal bundle size
Swift
- SwiftUI compatible
- Supports iOS 13+, macOS 10.15+
- Objective-C bridging available
Kotlin
- Multiplatform support (JVM, Android, Native)
- Coroutines support for async operations
- Java interoperability
WASM
- Optimized for small binary size
- Runs in Web Workers for non-blocking operations
- Memory-safe with automatic cleanup
Troubleshooting
Common Issues
Python: ImportError
# Ensure you have the latest pip
pip install --upgrade pip
pip install metamui-crypto --force-reinstall
Rust: Version conflicts
# Update to latest version
cargo update -p metamui-crypto
TypeScript: Type errors
# Ensure TypeScript is updated
npm install --save-dev typescript@latest
WASM: Module not found
// For webpack, add to config:
experiments: {
asyncWebAssembly: true
}