Skip to content

get the number of packages written in Go/Rust/Python/.. in Homebrew Core

Notifications You must be signed in to change notification settings

abanoubha/gobrew

Repository files navigation

gobrew

gobrew

Count all programs written/built in Go/Rust/Python/.. and distributed via Homebrew.

asciicast

Check out the change log and roadmap!

why I built this?

I was curious. Are people actually using Go more than Rust? Are there more software written with cmake or meson or ninja .. ?

Too many curious questions I wanted to answer them using realworld statistics.

I wrote a post about my findings regarding Go vs Rust usage in Homebrew Core formulae on my website.

install gobrew

  • install via the snap store

Get it from the Snap Store

  • install using Go
go install github.com/abanoubha/gobrew@latest
  • install via piping a script into bash
curl -fsSL https://raw.githubusercontent.com/abanoubha/gobrew/main/scripts/install.sh | sh

build CLI app from source

# get deps, build the "gobrew" executable
$ go mod tidy && go build -o gobrew .

uninstall gobrew

  • Remove gobrew executable using the script:
curl -fsSL https://raw.githubusercontent.com/abanoubha/gobrew/main/scripts/uninstall.sh | sh

If you want to specify the installation directory/folder, add INSTALL_DIR="/usr/local/bin" to before bash like this:

curl -fsSL https://raw.githubusercontent.com/abanoubha/gobrew/main/scripts/uninstall.sh | INSTALL_DIR="/usr/local/bin" sh

If you have renamed the executable/binary, specify it with INSTALL_NAME="gobrew" like this:

curl -fsSL https://raw.githubusercontent.com/abanoubha/gobrew/main/scripts/uninstall.sh | INSTALL_NAME="gobrew" INSTALL_DIR="/usr/local/bin" sh
  • if you install gobrew via snap:
sudo snap remove gobrew
  • if you install gobrew via Go toolchain:
go clean -i github.com/abanoubha/gobrew

count all packages that use a specific language

  • will show the count of packages written in Go in Homebrew Core (by default)
$ gobrew
No language nor build system nor library is specified. Counting packages built in Go (by default):
974
  • count all programs written in Go language
$ gobrew -l go
974

or

$ gobrew --lang go
974
  • count all programs written in Rust
$ gobrew -l rust
524
  • count all programs written in Zig programming languages
$ gobrew -l zig
6

specific version vs. all versions of the specified language

  • all versions of python
$ gobrew -l python
771
  • specific version of python
$ gobrew -l [email protected]
718

$ gobrew -l [email protected]
67

$ gobrew -l [email protected]
10

$ gobrew -l [email protected]
6

$ gobrew -l [email protected]
2

count all packages that use a specific build system or library

  • count the packages built with "ninja" build system
$ gobrew -l ninja
253
  • count all packages/programs that use/rely-on "gcc":
$ gobrew -l gcc
75
  • count all programs that use cmake
$ gobrew -l cmake
1011
  • count all apps that depend on meson as a builder
$ gobrew -l meson
213
  • count all programs that use LLVM
$ gobrew -l llvm
51

show all build dependencies and their count

$ gobrew -b
All Build Dependencies Count:  320
[ghostscript openjdk@8 libsigc++@2 ucl m4 pcre scala gengetopt automake [email protected] tl-expected xmake libtool docbook-xsl perl cweb lua pyinvoke cmake swig coreutils imagemagick gperf spdlog gnu-tar libevent sphinx-doc gputils ... trucated]

$ gobrew --build-dep
All Build Dependencies Count:  320
[xmake grep ronn gobject-introspection ocaml font-util mkfontscale lpeg ucl vulkan-volk yarn glib ragel libconfig mandoc xtrans bat libosmium automake flex xz fmt clojure cpanminus vulkan-loader docutils protobuf@21 jinja2-cli doxygen ... truncated]

show all languages/libs and the count of their packages

$ gobrew -s
count of all languages/libraries/frameworks:  1489
pkg-config : 1554
cmake : 1074
go : 1008
[email protected] : 791
rust : 553
openssl@3 : 519
autoconf : 459
automake : 443
libtool : 369
gettext : 280
ninja : 256
openjdk : 230
meson : 216
glib : 214
node : 198
# truncated for brevity ...

show all packages which depend on a certain lib/lang

$ gobrew -d zig

 zigmod :
   Package manager for the Zig programming language

 zls :
   Language Server for Zig

 cargo-zigbuild :
   Compile Cargo project with zig as linker

 fastfec :
   Extremely fast FEC filing parser written in C

 ncdu :
   NCurses Disk Usage

 zf :
   Command-line fuzzy finder that prioritizes matches on filenames

About

get the number of packages written in Go/Rust/Python/.. in Homebrew Core

Topics

Resources

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors