ston-fi / tonlib-rs

Rust SDK for The Open Network
https://github.com/ston-fi/tonlib-rs
MIT License
188 stars 41 forks source link

How does tonlib-rs handle cross-platform compatibility currently? Are there any known issues or limitations? #86

Open earthskyorg opened 2 months ago

earthskyorg commented 2 months ago

Cross-Platform Compatibility

  1. Platform Independence: The library appears to be platform-independent, as it's written in Rust, which is designed to compile to WebAssembly (Wasm) and native platforms.
  2. Crate Dependencies: The library likely depends on platform-specific crates for low-level operations, which Rust handles through its cross-compilation capabilities.
  3. Client Configuration: The library provides options for configuring client behavior, including connection parameters:
let client = TonClientBuilder::new()
    .with_connection_params(&TonConnectionParams {
        config: TESTNET_CONFIG.to_string(),
        blockchain_name: None,
        use_callbacks_for_network: false,
        ignore_cache: false,
        keystore_dir: None,
    })
    .build()
    .await?;

Known Issues or Limitations

  1. System Libraries: The library might require system libraries that vary between platforms. For example, it could depend on OpenSSL for cryptographic operations.
  2. Native Dependencies: Some functionality might rely on native dependencies compiled for specific platforms, which could lead to platform-specific issues.
  3. Cross-CPU Architecture Compatibility: There's no explicit mention of CPU architecture considerations, which could be a potential issue if the library needs to run on ARM-based devices.
  4. WebAssembly Limitations: If the library aims to compile to WebAssembly, there might be limitations in certain low-level operations or memory management.
  5. Platform-Specific Features: Some features might only be available on certain platforms, potentially limiting cross-platform functionality.
  6. Testing Coverage: There could be gaps in testing coverage across different platforms, especially if automated testing doesn't cover all target environments.
  7. Configuration Differences: Different platforms might require different configurations for optimal performance or security, which could complicate cross-platform development.
nnateghi9 commented 1 month ago

let client = TonClientBuilder::new() .with_connection_params(&TonConnectionParams { config: TESTNET_CONFIG.to_string(), blockchain_name: None, use_callbacks_for_network: false, ignore_cache: false, keystore_dir: None, }) .build() .await?;