GithubHelp home page GithubHelp logo

addonmanager's Introduction

AddonManager

This is a replacement for the Firefox AddonManager, written in Rust.

Add-ons are components that can be hot-loaded into Firefox, such as:

  • WebExtensions
  • Native Firefox Extensions
  • Themes
  • Services

AddonManager is responsible for:

  • parsing manifests
  • installing add-ons (download, verify, stage, install)

The API is easy to use:

use addonmanager::{Manifest, InstallLocation, Addon, Install}

fn main() {
  // This could come from a remote server or a local file.
  let manifest = Manifest::new(...);

  // The place to install add-ons.
  let install_name = InstallLocationName::Profile;
  let base_directory = String::from("c:\\Extensions");
  let install_location = InstallLocation::new(install_name, base_directory); 

  // Represents the addon itself.
  let addon = Addon::new(manifest, install_location);

  // The state machine that downloads, verifies, installs
  // the Addon to the InstallLocation.
  let mut install = Install::new(addon);
  
  // Start the install process.
  install.download();
}

Running

cargo run

NOTE - if you get an error about the OpenSSL header file being missing on Mac OS X with Homebrew, try:

export OPENSSL_INCLUDE_DIR=$(brew --prefix openssl)/include
export OPENSSL_LIB_DIR=$(brew --prefix openssl)/lib
cargo run

Testing

cargo test

addonmanager's People

Contributors

rhelmer avatar

Stargazers

 avatar

Watchers

 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.