Web3 Development

MakoA From-Scratch Bitcoin Implementation in C for Developers

A from-scratch Bitcoin protocol implementation in almost-C89. Learn what Mako does, who it suits, and how to evaluate it safely.

Free Open source Windows: Unverified Updated 14 Mar 2024
9 min read Last update 14 Mar 2024 github.com/chjj/mako

Mako is an open source project that reimplements the Bitcoin protocol from scratch, written in what its author calls "almost-C89" C. It is aimed at developers who want to study, reuse or port low-level Bitcoin code rather than end users looking for a wallet or a point-and-click node. The documentation mentions Windows alongside Linux as a platform, though Windows support is not formally verified, so readers should treat it as an experimental target.

Because the project is written in plain C with every data structure and primitive coded by hand, it reads more like a educational and engineering reference than a finished application. Its MIT license makes the code easy to reuse in other projects. The most recent code update in the repository dates to March 2024, so anyone planning serious work should check the repository's current activity before depending on it.

02

What Is Mako and Why Does a Bitcoin Reimplementation Matter?

A reimplementation is a new program that follows the same protocol rules as an existing one, written independently from the original source. Mako takes this approach with Bitcoin. Instead of building on the widely used reference client, its author wrote the logic from the protocol itself.

This matters because a protocol is only as strong as its shared understanding. When two independent codebases agree on how a block is validated, confidence in the network grows. When they disagree, the disagreement exposes ambiguity in the specification that would otherwise stay hidden.

For a developer, a small and readable implementation can also be easier to study than a large production client with decades of accumulated code.

03

Who Is Mako For?

Mako is best suited to C programmers, protocol researchers and engineers who want to understand Bitcoin at a low level. Someone who wants to study how serialization, hashing and block validation fit together will find the hand-written approach instructive.

It is less suited to people who simply want to hold bitcoin, send payments or run a node with a graphical interface. For those tasks, mature consumer wallets and full nodes are far more practical choices.

Teams building custom Bitcoin-adjacent infrastructure may also evaluate Mako as a reusable core, provided they are comfortable maintaining a low-level codebase themselves.

04

Practical Use Cases

One common use case is education. A student or engineer can read the source to see how transactions are encoded, how Merkle roots are computed and how scripts are interpreted, without the layers of abstraction found in larger software.

Another use case is testing. A second implementation can be used to cross-check the output of another node on the same data, helping to catch divergence in edge cases.

A third is embedding. Because the code is portable C with a permissive MIT license, it can be incorporated into other projects, subject to the license terms and thorough testing on the target platform.

05

How a Low-Level Implementation Differs From Higher-Level Libraries

Many Bitcoin libraries are written in higher-level languages such as JavaScript, Python or Go. They trade performance and control for convenience and safety features such as automatic memory management.

A C implementation makes memory handling explicit. The developer decides when buffers are allocated and freed, which can yield precise control and small binaries but also places more responsibility on the author to avoid memory errors. Readers should weigh this trade-off before adopting the code for anything security-sensitive.

The restricted C89-style dialect also reflects a deliberate choice for conservatism: fewer language features means fewer compiler-specific behaviors to reason about.

06

Why Protocol Documentation Deserves Multiple Implementations

The project's stated philosophy is that the Bitcoin protocol should be recorded in as many places as possible. Written specifications can be ambiguous, while working code is unambiguous about what it does, even when it is wrong.

Having several independent implementations is therefore a form of redundancy for the protocol's knowledge. Developers who read Mako alongside other implementations can compare how each handles the same rule, which is one of the most effective ways to learn the subtle details of consensus.

07

Key features

Hand-Written Core Primitives

Every data structure and cryptographic primitive is implemented manually in C rather than pulled in from large external frameworks. This makes the control flow transparent, so a developer can follow exactly how a block or transaction is parsed and validated, line by line.

Minimal C Standard Requirements

The code is written in a restricted dialect close to C89. The only exception is the use of stdint.h for fixed-width integer types, which means the project can be compiled by older or conservative compilers without relying on most modern language features.

Portable, Reusable Codebase

The project is designed as a low-level base that other software can build on. Its focus on portability and reuse makes it a candidate for embedding Bitcoin logic into different environments, from desktop tools to constrained systems.

Independent Implementation of the Protocol

Mako is an independent reimplementation of the Bitcoin protocol rather than a fork of the reference client. Independent implementations are valuable because they help confirm that the protocol specification is precise enough to be built correctly by different teams.

Planned Handshake Port

The author has stated an intention to use Mako as the foundation for a port to the Handshake naming protocol. This shows the codebase is intended as a general starting point for related decentralized systems, not only a single Bitcoin tool.
08

Supported coins

The documentation mentions Bitcoin (BTC) as the network Mako implements. It is a Bitcoin-focused codebase and does not present itself as a multi-coin library.

09

How to install Mako on Windows

  1. 1

    Get the Source Code

    Mako is distributed as source code rather than as a ready-made Windows installer. Download the repository from its official GitHub page at https://github.com/chjj/mako, or clone it with Git. Only use the official repository to avoid tampered copies.

  2. 2

    Prepare a C Compiler

    On Windows you will need a C compiler toolchain, such as one provided by MinGW-w64 or Microsoft's build tools. Because the code targets a C89-like dialect, make sure the compiler supports stdint.h, which the project requires.

  3. 3

    Review the Build Instructions

    Read the repository's documentation for the current build procedure, since Windows support is not formally verified. Note that the project was last updated in March 2024, so some instructions may need adjustment for newer toolchains.

  4. Compile and Verify

    Compile the source with your chosen toolchain and inspect any warnings. Run whatever tests the repository provides before relying on the output. Treat the resulting binary as experimental until you have validated it yourself.

10

System requirements

  • A C compiler that supports stdint.h
  • Sufficient disk space for the source checkout and build output
  • A Windows environment with a working C toolchain, if building on Windows
11

How to use Mako

Mako is a codebase rather than a point-and-click application, so using it means compiling and then exercising its functions, typically through test programs or by linking its code into your own project. The workflow below describes a general approach for developers.

  1. Clone the official repository from GitHub and check out the revision you want to study or build.
  2. Read the README and any documentation to understand which parts of the protocol are covered.
  3. Set up a C compiler and confirm it accepts the project's C89-style code with stdint.h available.
  4. Compile the library or example programs, noting any warnings that appear.
  5. Run the included tests, if present, to confirm the code behaves as expected on your platform.
  6. Compare specific functions, such as serialization or hashing routines, against another Bitcoin implementation using the same input data.
  7. If you plan to embed the code, isolate it behind a clear interface so you can replace or audit it independently.

Because the code is low-level, expect to spend time reading the source rather than relying on a user guide.

12

Pros & cons

Pros
  • Clean, hand-written C that is easy to follow for learning Bitcoin internals
  • Restricted language dialect makes the code portable to conservative compilers
  • Permissive MIT license allows reuse in other projects
  • Useful as a second independent implementation for protocol cross-checking
  • Open source, so the full source can be audited
Cons
  • Windows support is listed but not formally verified
  • Last code update was in March 2024, so activity may be limited
  • Requires C programming knowledge and a build environment
  • Not a wallet or ready-made node for everyday users
  • Documentation may be sparse compared with large production projects
13

Is Mako safe?

Because Mako is source code that you compile yourself, the main risks are in the source you obtain and the build you produce. Download only from the official GitHub repository at https://github.com/chjj/mako. Avoid unofficial mirrors or prebuilt binaries from unknown sites, since they could contain modified code.

When you receive any binary or archive, verify its SHA-256 checksum or signature against values published by the maintainer where available. Never enter a seed phrase or private key into third-party websites or tools claiming to work with Mako. Since the project does not handle funds on its own, treat any code that touches real keys as untrusted until it has been reviewed and tested thoroughly.

  • Official source only. Download from github.com/chjj/mako. Ignore ads and lookalike domains.
  • Check the SHA-256. Compare the installer hash with the value the developer publishes before running it.
  • Never share your seed phrase. No developer, support agent or website — including CryptApps — will ever ask for it.
14

Alternatives

Mako differs from many Bitcoin tools in its goal. Full nodes such as Bitcoin Core focus on running a production client for the live network, while Mako is an independent, from-scratch reimplementation intended for study, reuse and cross-checking. Its minimalist C style also contrasts with higher-level development frameworks that prioritize convenience.

For developers working around Bitcoin on the application side, the catalog's related tools cover different layers. Nigiri provides a local Bitcoin and Liquid environment for development, which is useful for testing applications rather than implementing the protocol. The guide to Bitcoin storage addresses key management, a topic that a protocol implementation does not solve on its own. Choose Mako when your focus is the protocol code itself, and choose the other tools when you need a running environment or operational guidance.

15

Specifications

Price
Free
Type
Open source
License
MIT
Latest version
—
Last update
14 Mar 2024
Windows support
Unverified (Windows mentioned in docs)
Source code
github.com/chjj/mako
16

Frequently asked questions

No. Mako is a reimplementation of the Bitcoin protocol written in C. It is a codebase for developers rather than a consumer wallet. If you want to store or send bitcoin, you need a dedicated wallet application instead, one that has been built, tested and maintained for that purpose.

The documentation mentions Windows alongside Linux as a supported platform, but Windows support has not been formally verified. You will likely need to build the code yourself with a C toolchain that supports stdint.h. Expect to troubleshoot platform-specific issues and treat the build as experimental.

Mako is written in C, using a restricted style the author describes as almost-C89. Apart from the stdint.h header for fixed-width integer types, it avoids C99 features, so it can be compiled by older or conservative C compilers in a portable manner.

Mako is intended as a reference and reusable codebase, not as a hardened tool for managing funds. Before using any code derived from it with real keys, you should audit it thoroughly, test it extensively and understand its current maintenance status. Never enter seed phrases into unrelated websites.

Mako is released under the MIT license. This permissive license generally allows you to use, copy, modify and distribute the code, including in commercial projects, as long as the copyright notice and license text are preserved. Review the full license file in the repository for the exact terms.

Independent implementations help verify that the protocol specification is clear enough to be built correctly. They also teach developers how consensus rules work at a detailed level. Mako's author has argued that the protocol should be recorded in as many places as possible, and this is the main reason such projects matter.

The most recent code update recorded for the project is from March 2024, so ongoing activity may be limited. Before depending on it, check the GitHub repository for recent commits, open issues and release history to judge its current status for your needs.

17

Verdict

Mako suits C developers, protocol researchers and students who want a compact, independent view of the Bitcoin protocol. Its hand-written, portable codebase under the MIT license is valuable for learning and cross-checking. It is not a wallet or a ready-made node, Windows support is unverified, and the last update dates to March 2024, so check the repository's current state before relying on it.

Download now