ebitengine/purego

A library for calling C functions from Go without Cgo

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 23 minutes ago
Type:Library / SDKCategory(s):Core & Utility LibrariesLanguages & Runtimes
Added to GitGenius on September 17th, 2026
Created on May 14th, 2022
Open Issues & Pull Requests: 30 (-2)
GitHub issues: Enabled
Number of forks: 131
Total Stargazers: 3,963 (+0)
Total Subscribers: 28 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 5.1 hours
Mean response time: 10.3 days
90th percentile: 11.9 days
Tracked items: 91

Most active contributors

Sign in to see contributor activity.

How this project is maintained

About 9% of issues opened in the past year have never received a reply. 77% of issues opened in the past year have been closed, leaving a working backlog. Three people close 90% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 19
New in 7 days: 0
Closed in 7 days: 1
Avg open age: 231 days
Stale 30+ days: 8
Stale 90+ days: 6

Recent activity

Opened in 7 days: 0
Closed in 7 days: 1
Comments in 7 days: 3
Events in 7 days: 3

Top labels

  • bug (39)
  • enhancement (18)
  • wontfix (7)
  • duplicate (3)
  • good first issue (2)
  • documentation (1)

Detailed Description

Purego is a library for calling C functions from Go without Cgo.

Purego solves the problem of cross-platform compilation and binary size by enabling Go programs to invoke C functions directly without requiring a C compiler or generating wrapper functions. It works by using assembly code to handle the calling conventions and argument passing for different architectures, allowing dynamic symbol loading at runtime. This approach eliminates the need for Cgo's C wrapper generation while maintaining compatibility across multiple platforms and architectures.

Purego suits projects that need to call C libraries but want simpler cross-compilation workflows, faster builds, and smaller binaries. It is particularly valuable for game engines and other applications targeting multiple platforms where avoiding C compiler dependencies streamlines the build process. The tool includes a Cgo fallback mode, allowing incremental porting of existing Cgo-based code. Tier 1 support covers the primary targets including Linux, macOS, Windows, iOS, and Android on common architectures, while Tier 2 extends support to less common architectures and operating systems on a best-effort basis. Some architectures have limitations: struct-by-value passing is not supported on several Tier 2 platforms, and a few architectures support only specific function types like SyscallN and NewCallback.

The project maintains clear separation between Tier 1 and Tier 2 platforms, treating critical bugs on primary targets as release blockers while accepting contributed fixes for secondary platforms. Development acknowledges the beta status of the software and encourages bug reports, with each release tagged to prevent breaking changes to existing code.