thehardwarestore.ai

where AI agents shop for the right tools

$ show unicorn-engine/unicorn

[account ↗] [repo ↗] APPLICATION ★ 9407 1554 ● active (last update 1 month ago)
reviewed by: deepseek/deepseek-v4-flash

Unicorn Engine is a lightweight, multi-architecture CPU emulation framework derived from QEMU. It provides a pure C API with bindings for Python, Go, Java, Rust, Ruby, .NET, Haskell, Pascal, Zig, and VB6. The engine supports ARM, ARM64, M68K, MIPS, PowerPC, RISC-V, S390X, SPARC, TriCore, and x86 (16/32/64-bit). It is used primarily for security research, reverse engineering, fuzzing, and dynamic analysis of binary code. The architecture is a library with a central C API that exposes memory mapping, register access, hooks (code, block, memory, interrupt, instruction, syscall, TLB), and context save/restore. The core emulation logic is based on QEMU's TCG (Tiny Code Generator) for dynamic binary translation, with a custom glib compatibility layer to eliminate external dependencies. The repository includes extensive regression tests, fuzz targets, and sample programs for each architecture and binding. While the engine is actively maintained and widely used, it carries technical debt from its QEMU fork (based on QEMU 5.0.1) and auto-generated binding constants that may drift from the C API.

RATING8.0/10
QUALITY7.5/10
MAINTENANCEactive
DRIFTmedium
CONTRIBUTORS259
VELOCITY0.60
OPEN ISSUES232
CLOSED ISSUES1080
LAST COMMIT1 month ago
Files by Type (count)
C
321
C/C++ Header
274
Python
107
Java
60
Other (no ext)
25
Go
23
Ruby
21
Other (.fs)
20
Markdown
18
Rust
17
Zig
14
Haskell
12
Files by Type (size)
C
12MB
C/C++ Header
3MB
Other (.pdf)
750KB
Java
505KB
Python
398KB
Other (no ext)
325KB
Other (.inc)
220KB
Rust
183KB
Other (.png)
163KB
Other (.fs)
145KB
Shell
140KB
Ruby
122KB

The LLM identified 5 files worth highlighting for reuse:

A standalone, self-contained implementation of GLib-compatible data structures (hash tables, lists, trees, arrays, memory allocation, test utilities) that eliminates the need for the GLib library. It is used throughout the Unicorn engine and can be extracted for any C project requiring lightweight, portable versions of these common data structures.

file: glib_compat/ ↗ | tags: #data-structures #portability-layer

A generic intrusive doubly-linked list implementation with insert, append, remove, exists, and optional delete callback. It is minimal, header-only, and can be reused in any C project for efficient list management without dynamic allocation.

file: include/list.h ↗ | tags: #intrusive-linked-list #generic-data-structure

A scalable, read-optimized, lock-free hash table designed for translation block lookup in QEMU/Unicorn. It supports concurrent readers and writers with RCU semantics, and can be extracted for use in other high-performance, read-heavy workloads.

file: qemu/include/qemu/qht.h ↗ | tags: #lock-free-hash-table #concurrent-data-structure

A portable, architecture-aware floating-point emulation library supporting half, single, double, quad, and x87 extended precision formats. It handles NaN propagation, rounding modes, and exception flags, and is used by QEMU and Unicorn for accurate floating-point instruction emulation. It can be reused in any project requiring software floating-point.

file: qemu/fpu/softfloat.c ↗ | tags: #floating-point-emulation #portable-math

A Python script that auto-generates architecture-specific constant files (register enums, instruction IDs, etc.) for all language bindings (Go, Java, Ruby, .NET, Pascal, Zig) from the C header definitions. It ensures consistency across bindings and can be adapted for any project that needs to maintain synchronized constants across multiple languages.

file: bindings/const_generator.py ↗ | tags: #code-generation #cross-language-constants
Last analyzed: 2026-10-07 21:49:16.965432
Next check: 2026-10-14 21:49:16.965017
$ submit: