Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Zuspec Software Backend

The Zuspec Software (SW) Backend transforms Zuspec hardware component models into executable C/C++ code for simulation, testing, and modeling.

Features

  • Component Translation: Zuspec Components → C structs and functions
  • Async/Sync: Transforms async methods with optional sync conversion
  • Protocol Interfaces: Generates C API structs for Protocol types
  • Type Mapping: Maps Zuspec types to C types
  • Validation: Pre-generation compatibility checks
  • Compilation: Built-in GCC compiler interface
  • Test Execution: Automated test runner
  • Type Specialization: Optional monomorphization (experimental)

Installation

pip install zuspec-be-sw

Quick Start

import zuspec.dataclasses as zdc
from zuspec.be.sw import CGenerator, CValidator, CCompiler, TestRunner
from pathlib import Path

@zdc.dataclass
class Counter(zdc.Component):
    count: int = zdc.field(default=0)
    
    def increment(self):
        self.count += 1
    
    def get_count(self) -> int:
        return self.count

# Build → Validate → Generate → Compile → Run
factory = zdc.DataModelFactory()
ctxt = factory.build(Counter)

validator = CValidator()
assert validator.validate(ctxt)

gen = CGenerator(Path("output"))
sources = gen.generate(ctxt)

compiler = CCompiler(Path("output"))
exe = compiler.compile(sources, Path("output/test"))

runner = TestRunner()
result = runner.run(exe)

Generated C Code

typedef struct Counter {
    int count;
} Counter;

void Counter_init(Counter *self);
void Counter_increment(Counter *self);
int Counter_get_count(Counter *self);

Documentation

Requirements

  • Python >= 3.7
  • zuspec-dataclasses
  • C compiler (GCC)

License

Apache-2.0

Metadata

Release files for zuspec-be-sw 0.0.1.22424422436rc0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for zuspec-be-sw 0.0.1.22424422436rc0
File Interpreter ABI Platform
zuspec_be_sw-0.0.1.22424422436rc0-py3-none-any.whl Python 3 none any Details

Release files / zuspec_be_sw-0.0.1.22424422436rc0-py3-none-any.whl

Download URL zuspec_be_sw-0.0.1.22424422436rc0-py3-none-any.whl
Size 77.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7240fce37ad3c4840eac9d9bb41583b20aafe72c95b42df9dafef7032da3369e
BLAKE2b-256 checksum
How to use checksums
5cb65d73fe3842df660ac342c720f6813358efe87c1a4272f2f9e4ba62364f49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Security for zuspec-be-sw 0.0.1.22424422436rc0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page