Coder Social home page Coder Social logo

needle's Introduction

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.

Demo image

Generate a crate

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

cargo install cargo-generate
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 crate

You should use wasm-pack to build the crate.
Be aware of the target=no-modules parameter as it wouldn't work without.

cargo install wasm-pack
wasm-pack build --target=no-modules

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. The generated 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).

needle's People

Contributors

jimberlage avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.