Skip to content

Module Description

TechUI Core is not a monolithic "black box," but a microkernel architecture composed of multiple Rust sub-modules that are single-responsibility and collaborative.

This modular design ensures that we maintain high cohesion and low coupling while processing complex graphical computations, high-intensity encryption, and real-time defense.

Because most modules are only called internally by Wasm or within TechUI components, only a brief introduction is provided here.

En/Dec Module

This is the security foundation of the system. It does not rely on any crypto API provided by the browser; instead, it features a built-in encryption algorithm library optimized with assembly.

  • Responsibilities: Responsible for all symmetric and asymmetric encryption operations.
  • Applications:
    • Handles the handshake decryption of Client Key and Keychain.
    • Provides open encryption suites such as md5Enc / openEnc for developers.
    • Decrypts static resource strings.

Validation Module

If ENC is the "translator" (responsible for decryption), VALID is the "visa officer."

  • Responsibilities: Responsible for the determination of core business rules. It receives raw data decrypted by the ENC module and outputs the final authorization result of True/False based on environmental parameters.
  • Applications:
    • Validates whether the license has expired.
    • Compares whether the project name in the license matches the current page title document.title in the browser.
    • Verifies if the current domain is within the whitelist.
    • More... (not all listed).

UI Generation Engine

This is the core of dynamic topology within the TechUI "Hybrid Rendering Strategy."

  • Responsibilities:
    • Real-time calculation of SVG path data for dynamic components based on mathematical formulas (ScifiGeometry).
    • Calculation of dynamic SVG nodes (ScifiPanel, ScifiHeader, ScifiButton, etc.).
    • Management and return of static SVG resources (ScifiDeco, global vector backgrounds, dynamic Loading graphics).
  • Features: Unlike static images, every chamfer, bevel, and perspective structure it generates is calculated via real-time geometry, ensuring sharpness at any resolution.
  • Component Attribution: All SVG components in TechUI are driven by this module.

String

String processing utility.

  • Responsibilities: Responsible for efficient string interaction between Wasm linear memory and the JS host environment.
  • Zero-copy Processing: Optimizes string transmission performance at the WASM/JS boundary, reducing memory jitter.
  • Feature Attribution: All functions involving string processing, such as encryption/decryption, project names, and even Wasm built-in multi-language support.

Advanced Computation Kernel

Note: This is an implicit module serving advanced components.

  • Responsibilities: Processes high-load mathematical and physical calculations.
  • Applications:
    • 3D Panel Calculation: Calculation logic for 3D panel deformation parameters.
    • Complex Chart Paths: Calculates Bézier curve paths for 3D bar charts and pie charts (e.g., Bar3D, Pie3D calculations).
    • Adaptive Layout: Core algorithm for adaptive panels used to calculate adaptive scaling ratios within complex containers.

Scheduling and Watchdog

A time management unit independent of the JS main thread.

  • Responsibilities: Provides high-precision time references that are unaffected by browser UI thread blocking (Long Tasks).
  • Applications:
    • Tamper-proof Polling: Periodically triggers the self-check logic of the Guard.
    • Copyright Information Flash: Occasional display of system title authorization information triggered by advanced components.
    • Trial Countdown: Manages the lifecycle of trial version Keys.

Information

Responsible for the external expression of the Core module.

  • Responsibilities: Manages internal Wasm status output and internationalization copy.
  • Applications:
    • Returns accurate authorization error prompts or circuit-breaker alarm messages based on current language settings (CN/EN).
    • Outputs diagnostic data such as tuiCoreInfo to the console.

Utility Functions

A series of utility functions for internal Wasm calls, while also acting as a bridge between the isolated Wasm environment and the Browser host environment.

  • Responsibilities: Provides utility functions within Wasm components to safely operate browser APIs.
  • Applications:
    • DOM Operations: Such as reading/locking document.title and injecting tamper-proof signature nodes.
    • Persistent Storage: Reading and writing SessionStorage to cache temporary authorization states.

Released under the MIT License.