Thank you for your interest in contributing to asmqdm! This document provides guidelines and information for contributors.
- Linux x86_64 (required — the Assembly code uses Linux system calls)
- NASM (Netwide Assembler)
- Python 3.8+
- uv package manager (recommended) or pip
-
Fork the repository on GitHub
-
Clone your fork:
git clone https://github.com/YOUR_USERNAME/asmqdm.git cd asmqdm -
Install NASM if not already installed:
# Debian/Ubuntu sudo apt-get install nasm # Fedora sudo dnf install nasm # Arch Linux sudo pacman -S nasm
-
Build the shared library:
make
-
Install in development mode:
make install
-
Run tests to verify setup:
make test
asmqdm/
├── src/
│ ├── asm/ # x86_64 Assembly implementation
│ │ ├── asmqdm.asm # Main library source
│ │ └── include/
│ │ └── constants.inc # Syscall numbers, constants
│ └── python/
│ └── asmqdm/ # Python package
│ ├── __init__.py # Public API
│ ├── core.py # asmqdm class
│ └── _ffi.py # ctypes FFI bindings
├── tests/ # Test suite
├── examples/ # Usage examples
└── build/ # Build artifacts (generated)
Python:
- Follow PEP 8 guidelines
- Use descriptive variable names
- Add docstrings for public functions and classes
- Keep functions focused and reasonably sized
Assembly:
- Use clear section headers and comments
- Document syscall usage and register conventions
- Follow the existing code structure for new functions
- Preserve callee-saved registers (rbx, rbp, r12-r15)
-
Add tests for new functionality
-
Ensure all existing tests pass before submitting
-
Run the test suite:
make test # or python tests/run_tests.py
If your change affects performance, run the benchmark suite:
python tests/benchmark.py-
Create a feature branch:
git checkout -b feature/your-feature-name
-
Make your changes with clear, focused commits
-
Write descriptive commit messages:
Add async rendering mode with CPU affinity - Implement clone() syscall for thread creation - Add lock-free atomic counter updates - Set CPU affinity for render thread isolation -
Push to your fork:
git push origin feature/your-feature-name
-
Open a Pull Request against the
mainbranch
- Provide a clear description of what the PR does
- Reference any related issues
- Include test results if applicable
- Keep PRs focused — one feature or fix per PR
By contributing to asmqdm, you agree that your contributions will be licensed under the Apache License, Version 2.0.
Do not copy code from third-party sources unless the source’s license is compatible with Apache-2.0 and you have the right to contribute it under Apache-2.0. If you’re unsure, call it out in the PR description and link the source and license.
New source files should include the project’s SPDX/copyright header at the top. Use the canonical form below.
Python (.py) header:
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2026-present Steven Baumann (@SBNovaScript)
# Original repository: https://github.com/SBNovaScript/asmqdm
# See LICENSE and NOTICE in the repository root for details.
# Please retain this header, thank you!NASM (.asm) header:
; SPDX-License-Identifier: Apache-2.0
; Copyright (c) 2026-present Steven Baumann (@SBNovaScript)
; Original repository: https://github.com/SBNovaScript/asmqdm
; See LICENSE and NOTICE in the repository root for details.
; Please retain this header, thank you!This project uses the Developer Certificate of Origin, version 1.1 (DCO). By signing off on a commit, you certify the following:
Developer Certificate of Origin Version 1.1
Copyright (C) 2004, 2006 The Linux Foundation and its contributors. https://developercertificate.org/
(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or
(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or
(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.
(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.
All commits must include a DCO sign-off line:
Signed-off-by: Your Name <your.email@example.com>
You can do this automatically by using the -s flag when committing:
git commit -s -m "Your commit message"If you’ve already made commits without sign-off, you can amend the most recent commit:
git commit --amend -sOr rebase to sign off multiple commits:
git rebase --signoff HEAD~N # where N is the number of commitsPlease use a name and email that accurately identify you as the contributor.
When reporting bugs, please include:
- Python version and OS details
- Steps to reproduce the issue
- Expected vs actual behavior
- Any error messages or tracebacks
Feature requests are welcome! Please describe:
- The use case for the feature
- How it would benefit users
- Any implementation ideas you have
Documentation improvements are always appreciated:
- Fix typos or unclear explanations
- Add examples for existing features
- Improve API documentation
Areas where contributions are especially welcome:
- Performance optimizations
- Additional features and functionality
- Better error handling and messages
- Test coverage improvements
The Assembly code (src/asm/asmqdm.asm) implements:
- Memory allocation via
mmapsyscall - Terminal width detection via
ioctl - Time tracking via
clock_gettime - Progress bar string formatting and rendering
- Async mode with thread creation via
clone
Key conventions:
- All public functions follow System V AMD64 ABI
- State is stored in mmap’d memory regions
- Render throttling at 50ms intervals
The Python wrapper (src/python/asmqdm/) provides:
- ctypes foreign function interface (FFI) bindings to the shared library
- Iterator protocol implementation
- Context manager support
- Intuitive Python API
If you have questions about contributing, feel free to:
- Open an issue for discussion
- Check existing issues for similar questions
Thank you for contributing to asmqdm!