Crates.io | rustvate |
lib.rs | rustvate |
version | 0.1.0 |
source | src |
created_at | 2024-09-19 14:04:53.405545 |
updated_at | 2024-09-19 14:04:53.405545 |
description | Rustvate is a browser extension for ad-blocking, powered by Rust and WebAssembly. |
homepage | https://github.com/Blindspot22/rustvate |
repository | https://github.com/Blindspot22/rustvate |
max_upload_size | |
id | 1380301 |
size | 79,968 |
Rustvate is a lightweight, high-performance ad-blocking browser extension developed in Rust and WebAssembly. It aims to block both visual ads and network requests, enhancing user privacy and browsing experience. This project leverages Rust’s efficiency and safety features to create a robust ad-blocker.
Prepare Your Extension Folder:
rustvate-extension
.Open Chrome:
Access Extensions Page:
chrome://extensions/
.Enable Developer Mode:
Load Unpacked Extension:
rustvate-extension
folder and click Open.Prepare Your Extension Folder:
rustvate-extension
.Open Firefox:
Access Add-ons Page:
about:addons
.Enable Debugging:
Load Temporary Add-on:
rustvate-extension
and select any file within it (e.g., manifest.json
).Once the extension is installed:
Visit Websites:
Check Console Logs:
Ctrl + Shift + I
or Cmd + Option + I
on Mac) and go to the Console tab to view logs related to blocked ads.The extension uses a predefined list of ad-related domains to block visual ads and network requests. The domains are specified in the lib.rs
file and include popular ad-serving domains.
The content.js
script identifies and hides ad elements based on their CSS selectors or DOM attributes.
The background.js
script intercepts network requests and blocks those matching ad-related domains using Rust’s WebAssembly functions.
The Rust code is compiled to WebAssembly, which is then loaded and executed in the browser. This enables efficient processing and blocking of ad-related requests.
wasm-pack build --target web