Metadata-Version: 2.4
Name: nni-sdk
Version: 1.0.0
Summary: Zero-copy Neural-Native Interconnect for distributed AI.
Home-page: https://github.com/Nidhesh-Sarvaiya/nni-sdk
Author: Nidhesh Sarvaiya
Author-email: support.nni.sdk@gmail.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: requires-python
Dynamic: summary

import os
import ctypes
import platform

# Get the directory where this Python file is installed
dir_path = os.path.dirname(os.path.abspath(__file__))

# Detect OS and load the correct pre-compiled Rust binary
os_name = platform.system()
if os_name == "Windows":
    lib_path = os.path.join(dir_path, "nni_core.dll")
elif os_name == "Linux":
    lib_path = os.path.join(dir_path, "nni_core.so")
elif os_name == "Darwin": # macOS
    lib_path = os.path.join(dir_path, "nni_core.dylib")
else:
    raise RuntimeError(f"Unsupported OS: {os_name}")

# Load the native silicon engine
try:
    _sdk = ctypes.CDLL(lib_path)
except OSError as e:
    raise RuntimeError(f"Failed to load NNI native engine at {lib_path}. Error: {e}")

# --- YOUR PYTHON WRAPPER CODE GOES BELOW HERE ---
# class SharedSlate:
#     ...
