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 integration
Go
Concurrent programming with simplicity
Java
JVM applications
Python
Pure Python with optional C extensions
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 browser deployment
Platform Comparison
| Feature | C | C# | Go | Java | Python | Rust | TypeScript | Swift | Kotlin | WASM |
|---|---|---|---|---|---|---|---|---|---|---|
| Build Tool | make/cmake | dotnet | go mod | maven/gradle | pip | cargo | npm | SPM | gradle | npm |
| Async Support | - | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| Type Safety | No | Yes | Yes | Yes | Partial | Yes | Yes | Yes | Yes | Yes |
| Memory Management | Manual | GC | GC | GC | GC | Manual | GC | ARC | GC | Linear |
| No Dependencies | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
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
- Async/await patterns
- Secure string handling
Go
- Goroutine-safe operations
- Channel-based concurrency
- Module versioning support
Java
- JVM optimization
- Android compatibility
Python
- Type hints for better IDE support
- Context managers for secure memory
- Async/await for I/O operations
Rust
- Zero-copy operations
no_stdsupport- Feature flags for selective compilation
- SIMD optimizations
TypeScript
- Full TypeScript definitions
- Tree-shaking support
- Web Crypto API integration
Swift
- SwiftUI integration
- Keychain integration
- Hardware acceleration
Kotlin
- Coroutines for async operations
- Multiplatform support
- Java interoperability
- Android Keystore integration
WASM
- Small binary size
- Web Workers support
- Streaming instantiation
Language Interoperability
MetaMUI Crypto Primitives ensures interoperability across all supported languages:
Cross-Platform Compatibility
- Consistent API design across all platforms
- Identical algorithm implementations
- Compatible serialization formats
- Shared test vectors for validation
Getting Started
- Choose your platform above
- Follow the build-from-source instructions
- Review platform-specific examples
- Run the self-tests to verify your build
- Implement security best practices