meson VS ninja

Compare meson vs ninja and see what are their differences.

meson

The Meson Build System (by mesonbuild)

ninja

a small build system with a focus on speed (by ninja-build)
Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
meson ninja
109 51
5,212 10,411
2.1% 1.6%
9.8 7.9
about 12 hours ago 6 days ago
Python C++
Apache License 2.0 Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

meson

Posts with mentions or reviews of meson. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-09-22.
  • Makefile Tutorial
    5 projects | news.ycombinator.com | 22 Sep 2023
    Came here to post the same. The answer for How to build software? is Meson[1] for C and C++ and also other languages. Works well on Windows and Mac, too.

    I’ve written a small Makefile to learn the basic and backgrounds. Make is fine. But the next high-level would have been Autotools, which is an intimidating and weird set of tools. Most new stuff written in C/C++ use now Meson and it feels sane.

    [1] https://mesonbuild.com

  • CMake x make?
    2 projects | /r/C_Programming | 20 Sep 2023
    If you are very fortunate, you'll be able to choose something else. I like meson myself: it looks a bit like python, it's popular, small, simple, well-documented, easy to install and update, and it works well everywhere.
  • C++ Papercuts
    3 projects | news.ycombinator.com | 28 Aug 2023
    I suggest changing the build tool. Meson improved C and C++ a lot:

    https://mesonbuild.com/

    The dependency declaration and auto-detection is nice. But the hidden extra is WrapDB, built-in package management (if wanted):

        https://mesonbuild.com/Wrap-dependency-system-manual.html
  • A Modern C Development Environment
    7 projects | news.ycombinator.com | 10 Aug 2023
    > C's only REAL problem (in my opinion) which is the lack of dependency management. Most everything else can be done with a makefile and a half decent editor.

    Care to hear about our lord and saviour Meson?

    Both of your quoted problems are mutually incompatible: dependency management isn't the job of the compiler, it's a job for the build or host system. If you want to keep writing makefiles, be prepared to write your own `wget` and `git` invocations to download subprojects.

    Meanwhile, Meson solves the dependency management problem in a way that makes both developers and system integrators/distributions happy. It forces you to make a project that doesn't have broken inter-file or header dependency chains and cleans up all the clutter and cruft of a makefile written for any non-trivial project, while making it trivial to integrate other meson projects into your build, let other people integrate your project into theirs, and provides all of the toggles and environment variables distribution developers need to package your library properly. You can really have your cake and eat it too.

    https://mesonbuild.com/

  • cgen: another declarative CMake configuration generator
    7 projects | /r/cpp | 24 Jun 2023
    Other people going down this route seem to end up writing cmake replacements instead. I'm thinking of something like meson here except that meson never intended to transpile to cmake.
  • Makefile vs Cmake - Objective comparison ?
    2 projects | /r/embedded | 11 Jun 2023
  • Installer script for CMake, Ninja, and Meson
    4 projects | /r/bash | 1 Jun 2023
    I thought I would share my custom installer script for the latest GitHub versions of CMake, Ninja, and Meson.
  • I was wrong about rust
    4 projects | /r/rust | 20 May 2023
    Meson is probably the closest we'll ever get to such a thing, it's kinda declarative and has WrapDB as a dependency repository.
  • Building and Running Pidgin and Finch 3
    3 projects | dev.to | 6 May 2023
    Historically when you're building software you need to install it before you can run it. A while back Meson added support for development environments (aka devenv's). These allow us to run pidgin3 and finch3 from the build directory without installing, which saves a TON of development time!
  • Rendering UTF8 in the bare terminal?
    7 projects | /r/commandline | 22 Apr 2023
    We'll go to meson's github page and download the latest release (opting for the meson-1.1.0.tar.gz file), and extract it somewhere

ninja

Posts with mentions or reviews of ninja. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-12-26.
  • Using Make – writing less Makefile
    6 projects | news.ycombinator.com | 26 Dec 2023
  • What was used to build C++ programs before Cmake?
    5 projects | /r/cpp_questions | 5 Jul 2023
    Ninja showed real promise for a while, but then CMake grew up and people stopped seeing a reason to leave it behind.
    5 projects | /r/cpp_questions | 5 Jul 2023
  • I have spent two whole work days trying to install GLEW
    6 projects | /r/GraphicsProgramming | 3 Jul 2023
    warning: Starting with the September 2023 release, the default triplet for vcpkg libraries will change from x86-windows to the detected host triplet (x64-windows). To resolve this message, add --triplet x86-windows to keep the same behavior. Computing installation plan... The following packages will be built and installed: * egl-registry:x86-windows -> 2022-09-20 glew:x86-windows -> 2.2.0#3 * opengl:x86-windows -> 2022-12-04#3 * opengl-registry:x86-windows -> 2022-09-29#1 * vcpkg-cmake:x64-windows -> 2023-05-04 * vcpkg-cmake-config:x64-windows -> 2022-02-06#1 Additional packages (*) will be modified to complete this operation. Detecting compiler hash for triplet x86-windows... A suitable version of powershell-core was not found (required v7.2.11) Downloading portable powershell-core 7.2.11... Downloading powershell-core... https://github.com/PowerShell/PowerShell/releases/download/v7.2.11/PowerShell-7.2.11-win-x86.zip->C:\vcpkg\downloads\PowerShell-7.2.11-win-x86.zip Downloading https://github.com/PowerShell/PowerShell/releases/download/v7.2.11/PowerShell-7.2.11-win-x86.zip Extracting powershell-core... error: while detecting compiler information: The log file content at "C:\vcpkg\buildtrees\detect_compiler\stdout-x86-windows.log" is: -- Downloading https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-win.zip -> ninja-win-1.10.2.zip... -- Configuring x86-windows CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:112 (message): Command failed: C:/vcpkg/downloads/tools/ninja/1.10.2-windows/ninja.exe -v Working Directory: C:/vcpkg/buildtrees/detect_compiler/x86-windows-rel/vcpkg-parallel-configure Error code: 1 See logs for more information: C:\vcpkg\buildtrees\detect_compiler\config-x86-windows-rel-CMakeCache.txt.log C:\vcpkg\buildtrees\detect_compiler\config-x86-windows-out.log
  • Installer script for CMake, Ninja, and Meson
    4 projects | /r/bash | 1 Jun 2023
    I thought I would share my custom installer script for the latest GitHub versions of CMake, Ninja, and Meson.
  • Building and Running Pidgin and Finch 3
    3 projects | dev.to | 6 May 2023
    Now that you have your build system all generated you can go ahead and build everything. By default Meson will use Ninja as the build tool. Ninja is similar to Make but much much faster. You can also generate additional build systems but that's outside of the scope of this post.
  • Is there any way to configure my project so I can work on it on both Windows and MacOS?
    2 projects | /r/sdl | 16 Apr 2023
    There are also some other tools like https://ninja-build.org/ that you might prefer using instead
  • Just: A Command Runner
    27 projects | news.ycombinator.com | 9 Jan 2023
    Oh excellent, then better (and more portable!) tools are available:

    http://pants.build

    https://ninja-build.org

    https://buck.build

    and, if you hate yourself: https://bazel.build

  • Classifying Python virtual environment workflows
    4 projects | news.ycombinator.com | 7 Jan 2023
  • Flutter 3 on Arch Linux: 始め方
    5 projects | dev.to | 1 Jan 2023
    Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.3.10, on Artix Linux 6.0.12-artix1-1, locale en_US.UTF-8) [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1) [✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome) ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable. [✗] Linux toolchain - develop for Linux desktop ✗ clang++ is required for Linux development. It is likely available from your distribution (e.g.: apt install clang), or can be downloaded from https://releases.llvm.org/ ✗ CMake is required for Linux development. It is likely available from your distribution (e.g.: apt install cmake), or can be downloaded from https://cmake.org/download/ ✗ ninja is required for Linux development. It is likely available from your distribution (e.g.: apt install ninja-build), or can be downloaded from https://github.com/ninja-build/ninja/releases ✗ pkg-config is required for Linux development. It is likely available from your distribution (e.g.: apt install pkg-config), or can be downloaded from https://www.freedesktop.org/wiki/Software/pkg-config/ [✓] Android Studio (version 2021.3) [✓] Connected device (1 available) [✓] HTTP Host Availability ! Doctor found issues in 2 categories.

What are some alternatives?

When comparing meson and ninja you can also consider the following projects:

CMake - Mirror of CMake upstream repository

SCons

Bazel - a fast, scalable, multi-language and extensible build system

cmake-init - The missing CMake project initializer

BitBake - The official bitbake Git is at https://git.openembedded.org/bitbake/. Do not open issues or file pull requests here.

conan - Conan - The open-source C and C++ package manager

xmake - 🔥 A cross-platform build utility based on Lua

PlatformIO - Your Gateway to Embedded Software Development Excellence :alien:

Invoke - Pythonic task management & command execution.