Skip to content

mozsearch

Source code indexing and search backend behind Searchfox, for large codebases

Weak copyleft (OSI) · MPL-2.0

Listed by , founder & editor

56

Health

Active

Overview

Stars

369

Last commit

2 days ago

Nov 2026

Repository age

11 years

since Mar 2015

Latest version

–

Contributors

–

5 active in 90 days

Releases

0

last 12 months

Language

Rust

Mozsearch is the backend of Searchfox, the code search and browsing tool used for Mozilla's source. It indexes a codebase and serves cross-referenced source pages, with search, blame and diffs.

The tooling is written mostly in Rust, with Node and Python used in scripts. Searchfox itself runs on AWS, but you can develop against it locally with Docker, or with a Vagrant-style Ubuntu setup. For front-end work there is a lighter dev server. It renders pages locally from your checkout and pulls analysis data from searchfox.org, so you can test UI changes without a full index.

It is licensed under MPL-2.0. It is best seen as infrastructure for hosting your own code search site, in the role that hosted code browsers and developer portals often fill. Setup takes real effort, since indexing is built around Mozilla's own pipeline.

Who it's for

Teams hosting code search for a very large repository

It builds cross-referenced indexes with definitions, blame and diffs.

Skip if: You only want to search a small repo, where a simple code search tool is enough.

Contributors to Searchfox or Firefox tooling

A local dev server lets you test UI changes against live index data.

Skip if: You do not write Rust, Node or Python.

The problem it solves

Large codebases are hard to navigate with plain text search. You need definitions, references and history in one place. Mozsearch builds that index and serves it as a website.

Strengths

  • Powers Searchfox, which indexes Mozilla's code
  • Front-end dev server needs no full index
  • Docker-based local development
  • Active, with 5 contributors in the last 90 days
  • MPL-2.0 license

Trade-offs

  • Built around Mozilla's workflow, so adapting it takes effort
  • No tagged releases in the last year
  • Full setup needs Docker or an Ubuntu VM and several toolchains
  • MPL-2.0 requires sharing changes to modified files

Self-host mozsearch

Self-hostable
Yes

Quick start

cd tools && cargo build --release --bin output-file --bin crossref --bin searchfox-tool && cd ..
node scripts/dev-server.js

From the project's own install instructions. Check the docs for production settings.

Frequently asked questions

Is it free and open source?

Yes. It is released under MPL-2.0.

Can I run it myself?

Yes. You can develop locally with Docker or an Ubuntu VM. Searchfox itself runs on AWS.

What do I need for UI work?

Rust, protoc, Node 18 or newer and Python 3. The dev server then serves pages locally at port 8000.

Similar tools in Developer portals and documentation

Brief

Developer portals and documentation

Offline GTK4 browser for command-line cheatsheets on Linux

60 2 7 months ago Dormant GPL-3.0

Manuals

Developer portals and documentation

GNOME app for browsing developer documentation offline on Linux

11 9 3 days ago Active GPL-3.0-or-later

Retype

Developer portals and documentation

Unknown

Biblioteca

Developer portals and documentation

GNOME documentation viewer for Linux developers who want API docs in one offline-style app

GPL-3.0

mdBook

Developer portals and documentation

Rust command-line tool that turns Markdown files into an online book

22k 1.9k yesterday Active MPL-2.0