# ebitengine/purego

A library for calling C functions from Go without Cgo

Repository: https://github.com/ebitengine/purego
Canonical: https://ross.abutalabs.com/products/purego
Language: Assembly
License: Apache-2.0
License Family: permissive
Topics: cgo, go, golang, purego
Last push: 2026-08-26T13:15:54+00:00

## Health v2 (maintenance only)
Score: 93/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 81, longevity 100
- inputs: {"age_days": 1572, "days_push": 7, "days_rel": 44, "gap_med": 80, "n_releases_24m": 10}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3806, forks 125 (observed 2026-08-28T04:08:20.394456+00:00)

## What it is
purego is a Go library for calling C functions from Go without using Cgo, using assembly-based FFI and runtime symbol loading. It enables pure-Go cross-compilation, dynamic linking, and calling into shared objects from other languages.

## Use cases
- call C functions from Go without Cgo
- cross-compile Go binaries without a C compiler
- load shared library symbols at runtime as a plugin system
- call into Rust or other languages compiled to shared objects
- reduce binary size by avoiding Cgo wrappers
- incrementally port a Cgo project to pure Go

## When to choose
- you need C interop in Go but want CGO_ENABLED=0 builds and easy cross-compilation
- you want dynamic loading of shared libraries at runtime
- you target Tier 1 platforms (Linux/macOS/Windows amd64+arm64, mobile)

## When to avoid
- you need struct-by-value arguments on Tier 2 architectures
- you rely on Cgo-specific tooling or cgo packages
- you need guaranteed stability - it is beta software with potential API changes

## Facets
- artifact type: library
- maturity: active
- function: sdk, developer-tools
- domain: developer-tools, cross-platform, programming-languages
- platform: go, windows, cross-platform
- tags: ffi, cgo-alternative, foreign-function-interface, dynamic-linking, shared-libraries, assembly, linux, macos, android, ios

## Member repositories
- ebitengine/purego (main) score 93

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:20.394456+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:26:46.361498+00:00, confidence not recorded.
  - readme: https://github.com/ebitengine/purego (fetched 2026-08-28T04:08:20.394456+00:00, sha 954aa3bcb6b0)
- Data as of 2026-08-30T08:39:29.467469+00:00.
