Platform-Specific Guides
MetaMUI Crypto Primitives provides consistent APIs across 10 platforms while leveraging platform-specific optimizations.
Choose Your Platform
C
High-performance systems programming
C#
.NET ecosystem with enterprise features
Go
Concurrent programming with simplicity
Java
Enterprise-grade JVM applications
Python
Pure Python with optional C extensions for performance
Rust
Zero-cost abstractions with memory safety
TypeScript
Type-safe JavaScript for Node.js and browsers
Swift
Native performance on Apple platforms
Kotlin
JVM and Android with coroutines support
WASM
WebAssembly for universal deployment
Platform Comparison
| Feature | C | C# | Go | Java | Python | Rust | TypeScript | Swift | Kotlin | WASM |
|---|---|---|---|---|---|---|---|---|---|---|
| Package Manager | make/cmake | nuget | go mod | maven/gradle | pip | cargo | npm | SPM | gradle | npm |
| Async Support | 🟡 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Type Safety | ❌ | ✅ | ✅ | ✅ | 🟡 | ✅ | ✅ | ✅ | ✅ | ✅ |
| Memory Management | Manual | GC | GC | GC | GC | Manual | GC | ARC | GC | Linear |
| Native Performance | ✅ | 🟡 | 🟡 | 🟡 | 🟡 | ✅ | 🟡 | ✅ | 🟡 | ✅ |
| No Dependencies | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Hardware Acceleration | ✅ | 🟡 | 🟡 | 🟡 | 🟡 | ✅ | 🟡 | ✅ | 🟡 | ✅ |
| Enterprise Support | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Common Features Across All Platforms
Consistent API Design
All platforms follow the same API patterns:
// Key generation
keypair = Algorithm.generate_keypair()
// Encryption
ciphertext = Algorithm.encrypt(plaintext, key)
// Signing
signature = Algorithm.sign(message, private_key)
// Hashing
hash = Algorithm.hash(data)
Security Guarantees
- Constant-time operations for secret data
- Automatic memory clearing
- No logging of sensitive information
- Comprehensive input validation
Error Handling
Each platform uses idiomatic error handling:
- C: Error codes (int return values)
- C#: Exceptions with try/catch
- Go: Error return values (error interface)
- Java: Checked/unchecked exceptions
- Python: Exceptions
- Rust: Result<T, E>
- TypeScript: Exceptions/Promises
- Swift: Result/throws
- Kotlin: Exceptions/Result
- WASM: Exceptions
Serialization
All platforms support:
- Hex encoding/decoding
- Base64 encoding/decoding
- Raw byte arrays
- JSON for structured data
Platform-Specific Features
C
- Direct hardware access
- Minimal memory footprint
- SIMD/AVX optimizations
- Static and dynamic linking options
C#
- .NET ecosystem integration
- NuGet package management
- Async/await patterns
- Secure string handling
Go
- Goroutine-safe operations
- Channel-based concurrency
- CGO for native optimizations
- Module versioning support
Java
- JVM optimization
- Spring Boot integration
- Android compatibility
- JNI for native performance
Python
- Type hints for better IDE support
- Context managers for secure memory
- Async/await for I/O operations
- NumPy compatibility for scientific computing
Rust
- Zero-copy operations
no_stdsupport- Feature flags for selective compilation
- SIMD optimizations
TypeScript
- Full TypeScript definitions
- Tree-shaking support
- Web Crypto API integration
- Node.js crypto module compatibility
Swift
- SwiftUI integration
- Combine framework support
- Keychain integration
- Hardware acceleration
Kotlin
- Coroutines for async operations
- Multiplatform support
- Java interoperability
- Android Keystore integration
WASM
- Small binary size
- Web Workers support
- SharedArrayBuffer optimization
- Streaming instantiation
Language Interoperability
MetaMUI Crypto Primitives ensures seamless interoperability across all supported languages:
Native Integration
- C: Base implementation providing foundation for all bindings
- C#: P/Invoke bindings for direct C library access
- Go: CGO bindings for performance-critical operations
- Java: JNI integration with native C code
- Python: CPython extensions for optimal performance
- Rust: Direct implementation with FFI compatibility
Cross-Platform Compatibility
- Consistent API design across all platforms
- Identical algorithm implementations
- Compatible serialization formats
- Shared test vectors for validation
Performance Optimization
- Hardware acceleration available on all platforms
- Platform-specific optimizations (SIMD, AVX, etc.)
- Memory management tailored to each language
- Thread-safe implementations
Getting Started
- Choose your platform above
- Follow the installation guide
- Review platform-specific examples
- Check performance considerations
- Implement security best practices