Top Related Projects
Read-only Git mirror of the Mercurial gecko repositories at https://hg.mozilla.org. How to contribute: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
The official GitHub mirror of the Chromium source
A keyboard-driven, vim-like browser based on Python and Qt.
Google Chromium, sans integration with Google
Quick Overview
Brave Browser is an open-source web browser developed by Brave Software, Inc. It focuses on privacy and security, offering built-in ad blocking, tracker blocking, and HTTPS upgrading. Brave is based on the Chromium web browser project and is compatible with most Chrome extensions.
Pros
- Enhanced privacy and security features out of the box
- Built-in ad blocker and tracker blocker
- Faster browsing experience due to reduced ad content
- Integration with cryptocurrency and rewards system (Brave Rewards)
Cons
- Smaller user base compared to major browsers like Chrome or Firefox
- Some websites may not function properly due to aggressive blocking
- Brave Rewards system can be controversial and not appealing to all users
- Customization options are more limited compared to some other browsers
Getting Started
To get started with Brave Browser:
- Visit the official Brave website: https://brave.com/
- Click on the "Download" button for your operating system (Windows, macOS, or Linux)
- Once downloaded, run the installer and follow the on-screen instructions
- After installation, launch Brave and customize your settings as desired
- To import bookmarks and settings from another browser, go to Settings > Get Started > Import bookmarks and settings
For developers interested in contributing to the Brave Browser project:
- Fork the repository on GitHub: https://github.com/brave/brave-browser
- Clone your fork:
git clone https://github.com/your-username/brave-browser.git
- Follow the build instructions in the repository's README file
- Submit pull requests with your contributions or bug fixes
Competitor Comparisons
Read-only Git mirror of the Mercurial gecko repositories at https://hg.mozilla.org. How to contribute: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
Pros of gecko-dev
- Longer development history and more established codebase
- Larger community of contributors and more extensive documentation
- More comprehensive support for web standards and technologies
Cons of gecko-dev
- Potentially slower development cycle due to larger codebase
- May have more legacy code to maintain
- Less focus on privacy-centric features out-of-the-box
Code Comparison
gecko-dev:
nsresult
nsDocShell::CreateAboutBlankContentViewer()
{
// Create an about:blank content viewer
nsCOMPtr<nsIContentViewer> viewer;
nsresult rv = CreateContentViewer("text/html", nullptr, getter_AddRefs(viewer));
NS_ENSURE_SUCCESS(rv, rv);
}
brave-browser:
void BraveContentBrowserClient::RegisterNonNetworkNavigationURLLoaderFactories(
int frame_tree_node_id,
ukm::SourceIdObj ukm_source_id,
NonNetworkURLLoaderFactoryMap* factories) {
content::ContentBrowserClient::RegisterNonNetworkNavigationURLLoaderFactories(
frame_tree_node_id, ukm_source_id, factories);
factories->emplace(
url::kBraveUIScheme,
std::make_unique<BraveURLLoaderFactory>(frame_tree_node_id));
}
Both repositories contain complex C++ codebases for browser development. gecko-dev's code snippet shows content viewer creation, while brave-browser's code focuses on URL loader factory registration. The brave-browser code specifically includes Brave-specific schemes and factories.
The official GitHub mirror of the Chromium source
Pros of Chromium
- Larger developer community and more frequent updates
- Broader compatibility with web standards and extensions
- More extensive documentation and resources for developers
Cons of Chromium
- Less focus on privacy and security features out-of-the-box
- Higher resource usage and potential performance impact
- More complex codebase, which can be challenging for new contributors
Code Comparison
Brave Browser (privacy-focused feature):
const shields = {
ads: true,
trackers: true,
scripts: false,
fingerprinting: true
};
Chromium (standard feature):
const settings = {
safeBrowsing: true,
autoFill: true,
passwordSaving: true,
extensions: true
};
Key Differences
- Brave Browser is built on Chromium but adds privacy-focused features
- Brave includes a built-in ad-blocker and tracker prevention
- Chromium offers more customization options for developers
- Brave has a smaller codebase, focusing on core privacy features
- Chromium provides a more vanilla browsing experience, leaving privacy enhancements to user discretion
Community and Development
- Chromium has a larger, more diverse contributor base
- Brave has a more focused development team with specific privacy goals
- Both projects are open-source, but Brave's development is more centralized
- Chromium's release cycle is more frequent, with rapid updates and bug fixes
A keyboard-driven, vim-like browser based on Python and Qt.
Pros of qutebrowser
- Lightweight and minimalist design, focusing on keyboard-driven navigation
- Highly customizable through a Python configuration file
- Built-in ad-blocking and privacy features without relying on external extensions
Cons of qutebrowser
- Smaller user base and community compared to Brave
- Less comprehensive out-of-the-box privacy features and cryptocurrency integration
- Limited support for traditional browser extensions
Code Comparison
qutebrowser (Python-based configuration):
c.url.searchengines = {
'DEFAULT': 'https://duckduckgo.com/?q={}',
'g': 'https://google.com/search?q={}',
}
c.content.blocking.enabled = True
c.content.blocking.method = 'both'
Brave (C++ based, Chromium fork):
const char kBraveShieldsEnabled[] = "brave.shields.enabled";
const char kBraveShieldsAdControlType[] = "brave.shields.ad_control_type";
const char kBraveShieldsHTTPSEverywhereEnabled[] = "brave.shields.https_everywhere_enabled";
Both browsers focus on privacy and security, but qutebrowser offers a more minimalist, keyboard-centric approach with extensive customization through its Python configuration. Brave, on the other hand, provides a more traditional browsing experience with built-in privacy features and cryptocurrency integration, appealing to a broader user base. qutebrowser's configuration allows for easy customization of search engines and content blocking, while Brave's codebase reflects its Chromium heritage and focus on shield-based protection mechanisms.
Google Chromium, sans integration with Google
Pros of ungoogled-chromium
- Stronger focus on privacy by removing Google-specific integrations
- More customizable with extensive configuration options
- Lighter resource usage due to removal of unnecessary features
Cons of ungoogled-chromium
- Less user-friendly, requires more technical knowledge to set up and maintain
- Slower update cycle compared to Brave
- Lacks built-in ad-blocking and cryptocurrency features
Code Comparison
Brave Browser:
// Example of Brave's ad-blocking implementation
const brave_shields = {
blockAds: true,
blockTrackers: true,
blockMalware: true
};
ungoogled-chromium:
# Example of ungoogled-chromium's configuration
DISABLE_GOOGLE_HOST_DETECTION = True
DISABLE_CRASH_REPORTER = True
DISABLE_GOOGLE_API_KEY_WARNING = True
Both projects aim to enhance privacy and security in Chromium-based browsers, but they take different approaches. Brave focuses on user-friendly features and built-in privacy tools, while ungoogled-chromium provides a more stripped-down and customizable experience for tech-savvy users. The code examples illustrate Brave's emphasis on built-in protection features, whereas ungoogled-chromium relies more on configuration options to disable unwanted functionalities.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Overview
This repository holds the build tools needed to build the Brave desktop browser for macOS, Windows, and Linux. In particular, it fetches and syncs code from the projects defined in package.json
and src/brave/DEPS
:
- Chromium
- Fetches code via
depot_tools
. - Sets the branch for Chromium (ex: 65.0.3325.181).
- Fetches code via
- brave-core
- Mounted at
src/brave
. - Maintains patches for 3rd party Chromium code.
- Mounted at
- adblock-rust
- Implements Brave's ad-block engine.
- Linked through brave/adblock-rust-ffi.
Downloads
You can visit our website to get the latest stable release.
Contributing
Please see the contributing guidelines.
Our Wiki also has some useful technical information.
Community
Join the Q&A community if you'd like to get more involved with Brave. You can ask for help, discuss features you'd like to see, and a lot more. We'd love to have your help so that we can continue improving Brave.
Help us translate Brave to your language by submitting translations at https://explore.transifex.com/brave/brave_en/.
Follow @brave on Twitter for important news and announcements.
Install prerequisites
Follow the instructions for your platform:
Clone and initialize the repo
Once you have the prerequisites installed, you can get the code and initialize the build environment.
git clone git@github.com:brave/brave-core.git path-to-your-project-folder/src/brave
cd path-to-your-project-folder/src/brave
npm install
# the Chromium source is downloaded, which has a large history (gigabytes of data)
# this might take really long to finish depending on internet speed
npm run init
brave-core based android builds should use npm run init -- --target_os=android --target_arch=arm
(or whichever CPU type you want to build for)
brave-core based iOS builds should use npm run init -- --target_os=ios
You can also set the target_os and target_arch for init and build using:
npm config set target_os android
npm config set target_arch arm
Additional parameters needed to build are documented at https://github.com/brave/brave-browser/wiki/Build-configuration
Internal developers can find more information at https://github.com/brave/devops/wiki/%60.env%60-config-for-Brave-Developers
Build Brave
The default build type is component.
# start the component build compile
npm run build
To do a release build:
# start the release compile
npm run build Release
brave-core based android builds should use npm run build -- --target_os=android --target_arch=arm
or set the npm config variables as specified above for init
brave-core based iOS builds should use the Xcode project found in ios/brave-ios/App
. You can open this project directly or run npm run ios_bootstrap -- --open_xcodeproj
to have it opened in Xcode. See the iOS Developer Environment for more information on iOS builds.
Build Configurations
Running a release build with npm run build Release
can be very slow and use a lot of RAM, especially on Linux with the Gold LLVM plugin.
To run a statically linked build (takes longer to build, but starts faster):
npm run build -- Static
To run a debug build (Component build with is_debug=true):
npm run build -- Debug
NOTE: the build will take a while to complete. Depending on your processor and memory, it could potentially take a few hours.
Run Brave
To start the build:
npm start [Release|Component|Static|Debug]
Update Brave
npm run sync -- [--force] [--init] [--create] [brave_core_ref]
This will attempt to stash your local changes in brave-core, but it's safer to commit local changes before running this
npm run sync
will (depending on the below flags):
- ð¥ Update sub-projects (chromium, brave-core) to latest commit of a git ref (e.g. tag or branch)
- ð¤ Apply patches
- ð Update gclient DEPS dependencies
- â© Run hooks (e.g. to perform
npm install
on child projects)
flag | Description |
---|---|
[no flags] | updates chromium if needed and re-applies patches. If the chromium version did not change, it will only re-apply patches that have changed. Will update child dependencies only if any project needed updating during this script run. **Use this if you want the script to manage keeping you up to date instead of pulling or switching branches manually. ** |
--force | updates both Chromium and brave-core to the latest remote commit for the current brave-core branch and the Chromium ref specified in brave-browser/package.json (e.g. master or 74.0.0.103 ). Will re-apply all patches. Will force update all child dependencies. **Use this if you're having trouble and want to force the branches back to a known state. ** |
--init | force update both Chromium and brave-core to the versions specified in brave-browser/package.json and force updates all dependent repos - same as npm run init |
--sync_chromium (true/false) | Will force or skip the chromium version update when applicable. Useful if you want to avoid a minor update when not ready for the larger build time a chromium update may result in. A warning will be output about the current code state expecting a different chromium version. Your build may fail as a result. |
-D, --delete_unused_deps | Will delete from the working copy any dependencies that have been removed since the last sync. Mimics gclient sync -D . |
Run npm run sync brave_core_ref
to checkout the specified brave-core ref and update all dependent repos including chromium if needed.
Scenarios
Create a new branch:
brave-browser> cd src/brave
brave-browser/src/brave> git checkout -b branch_name
Checkout an existing branch or tag:
brave-browser/src/brave> git fetch origin
brave-browser/src/brave> git checkout [-b] branch_name
brave-browser/src/brave> npm run sync
...Updating 2 patches...
...Updating child dependencies...
...Running hooks...
Update the current branch to the latest remote:
brave-browser/src/brave> git pull
brave-browser/src/brave> npm run sync
...Updating 2 patches...
...Updating child dependencies...
...Running hooks...
Reset to latest brave-browser master and brave-core master (via init
, will always result in a longer build and will remove any pending changes in your brave-core working directory):
brave-browser> git checkout master
brave-browser> git pull
brave-browser> npm run sync -- --init
When you know that DEPS didn't change, but .patch files did (quickest attempt to perform a mini-sync before a build):
brave-browser/src/brave> git checkout featureB
brave-browser/src/brave> git pull
brave-browser/src/brave> cd ../..
brave-browser> npm run apply_patches
...Applying 2 patches...
Enabling third-party APIs:
- Google Safe Browsing: Get an API key with SafeBrowsing API enabled from https://console.developers.google.com/. Update the
GOOGLE_API_KEY
environment variable with your key as per https://www.chromium.org/developers/how-tos/api-keys to enable Google SafeBrowsing.
Development
- Security rules from Chromium
- IPC review guidelines (in particular this reference)
- Brave's internal security guidelines (for employees only)
- Rust usage
Troubleshooting
See Troubleshooting for solutions to common problems.
Top Related Projects
Read-only Git mirror of the Mercurial gecko repositories at https://hg.mozilla.org. How to contribute: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
The official GitHub mirror of the Chromium source
A keyboard-driven, vim-like browser based on Python and Qt.
Google Chromium, sans integration with Google
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot