• Stars
    star
    189
  • Rank 203,058 (Top 5 %)
  • Language
    Shell
  • Created over 4 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An easy-to-use template for Rust web extensions. The Rust code is compiled to WASM and ran as a content script.

WASM Extension Template

This template allows you to generate a "Hello World" web extension running a Rust program compiled to WASM.
The program will be executed as a content script, without the need of being injected into the page.

Supports both manifest v2 and v3.

Demo image

Install tools

cargo install cargo-generate
cargo install wasm-pack

Generate an extension

You can use cargo-generate to generate a new crate (modify the name at the end of the command):

cargo generate --git https://github.com/Mubelotix/wasm-extension-template --name amazing-extension

Your crate is now generated and ready to be compiled.

Compile your extension

You cannot use cargo build to compile your crate. Use the build.sh script instead:

sh build.sh

Once compiled, the target files are ready to be used in the pkg folder.

Test your program

Web browsers allow developpers to test web extensions before publishment. See your browser's specific instructions to do that. After build, the manifest.json file is located in the pkg folder. By default, your extension will run on example.com and have no other permissions. You should want to modify the manifest (see the doc).

More Repositories

1

email-parser

The fastest and lightest mail parsing Rust library.
Rust
174
star
2

admarus

Peer-to-Peer Search Engine for IPFS
Rust
67
star
3

faster-pest

A generator for high-performance Pest parsers, bringing your grammar to the next level
Rust
41
star
4

minecraft-protocol

Highly optimized and lightweight minecraft server written in Rust
Rust
38
star
5

kamilata

Peer-to-Peer Search Engine System
Rust
12
star
6

dkim

Complete Rust DKIM library.
Rust
10
star
7

cli_progress_bar

A Rust crate that allows you to display a progress bar in a terminal.
Rust
8
star
8

dungeon-game

A multiplayer-only game. Native server, wasm client.
Rust
7
star
9

discord-crawler

A lightweight crawler for discord server invite links.
Rust
6
star
10

smtp-server

MDA and MTA supporting TLS.
Rust
5
star
11

webdriver

A lightweight webdriver supporting Firefox and Chrome and running without selenium.
Rust
5
star
12

admarus-blog

3
star
13

tewta

Experimental peer-to-peer social network
Rust
3
star
14

insa-login-rememberer

Rust
3
star
15

wasm-game-lib

A simple and fast game library for Wasm written in Rust.
Rust
3
star
16

gleam-io-automation

A web extension automating gleam.io's giveaways entering (gleam.io bot)
Rust
2
star
17

minecraft-protocol-derive

Procedural macros to make your Rust structs compatible with the Minecraft protocol.
Rust
2
star
18

password-tool

A program between a password manager and a password generator.
Rust
2
star
19

insa-scan

Network scanner for my school's
HTML
2
star
20

mastodon-synchronizer

Rust
2
star
21

calendrier

Rust
2
star
22

gtts

A very small gtts client
Rust
2
star
23

unigui

Rust
1
star
24

sha2-derive

A crate exporting a derivable `Hashable` trait that works with sha2
Rust
1
star
25

gleam_finder_lib

Rust
1
star
26

googleam

Rust
1
star
27

instagram_bot

Rust
1
star
28

tetris_nsi

A school project
Python
1
star
29

minecraft-bot

Rust
1
star
30

webextension-instagram

This is an instagram bot, running in a webextension, running with wasm in Rust!
JavaScript
1
star
31

admarus-census

Rust
1
star