Module platform

Module platform 

Source
Expand description

Copyright © 2025-2026 Wenze Wei. All Rights Reserved.

This file is part of DMSC. The DMSC project belongs to the Dunimd Team.

Licensed under the Apache License, Version 2.0 (the “License”); You may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

§Platform Detection Module

This module provides cross-platform hardware detection capabilities. It automatically detects the operating system and platform characteristics to enable appropriate discovery strategies for any hardware type.

§Supported Platforms

  • Linux: Full support including sysfs, procfs, D-Bus, udev
  • macOS: Full support using IOKit and system calls
  • Windows: Full support using WMI and system APIs
  • WebAssembly: Limited support with virtual devices

§Usage

use dmsc::device::discovery::platform::{PlatformInfo, PlatformType, get_platform_info};

let platform = get_platform_info();
println!("Platform: {:?}", platform.platform_type);
println!("OS: {}", platform.os_name);
println!("Architecture: {}", platform.arch);

Structs§

PlatformCompatibility
Platform detection result for hardware compatibility
PlatformInfo
Platform information container

Enums§

Architecture
CPU architecture types
DiscoveryStrategy
Discovery strategies available on the current platform
HardwareCategory
Categories of hardware that can be discovered
PlatformType
Supported platform types

Functions§

get_platform_info
Detects the current platform and returns platform information