Skip to content

This is a Chrome extension built for the SNEK Community

Notifications You must be signed in to change notification settings

Nighty13/SNEK_HQ

Repository files navigation


SNEK HQ Chrome Extension

This is a Chrome extension built using the Rust programming language and the Leptos framework. The extension is intended to serve the SNEK Web3 Community and act as a Central Place to coordinate raiding , Quick access to all SNEK ecosystem and many fun features ! .


Table of Contents

  1. Features

  2. Prerequisites

  3. Setup

  4. Building the Extension

  5. Loading the Extension in Chrome

  6. Project Structure

  7. License


Features

  • Reactive UI: Built using the Leptos framework for a fast and responsive user interface.

  • Background Worker: Handles periodic tasks (e.g., sending HTTP requests) even when the extension is closed.

  • Custom Icons: Includes custom icons for the extension.

  • WASM Integration: Uses WebAssembly (WASM) for high-performance Rust code in the browser.


Prerequisites

Before you begin, ensure you have the following installed:

  1. Rust: Install Rust from rustup.rs.

  2. wasm-bindgen: Install it using Cargo:

    bash
    Copy
    cargo install wasm-bindgen-cli
  3. Chrome Browser: To load and test the extension.


Setup

  1. Clone this repository:

    bash
    Copy
    git clone https://github.com/your-username/leptos-chrome-extension.git
    cd leptos-chrome-extension
  2. Install dependencies:

    • Ensure all dependencies in Cargo.toml are installed by running:

      bash
      Copy
      cargo build

Building the Extension

To build the extension, run the provided build.bat script. This script performs the following steps:

  1. Cleans the previous build.

  2. Compiles the Rust code to WebAssembly (WASM).

  3. Generates WASM bindings using wasm-bindgen.

  4. Copies necessary files (HTML, JS, CSS, manifest, and icons) to the pkg folder.

Steps to Build

  1. Open a terminal in the project directory.

  2. Run the build.bat script:

    bash
    Copy
    build.bat

    If the build is successful, you should see the following output:

    Copy
    Build complete! Files are in pkg\ directory.

Loading the Extension in Chrome

  1. Open Chrome and navigate to chrome://extensions/.

  2. Enable Developer Mode (toggle in the top-right corner).

  3. Click Load unpacked and select the pkg folder generated by the build script.

  4. The extension will now appear in your extensions list. Click on it to open the popup.


Project Structure

Here’s an overview of the project structure:

Copy
leptos-chrome-extension/
├── src/
│   └── lib.rs            # Main Rust code for the extension
├── pkg/                  # Output folder for the build (generated by build.bat)
├── icons/                # Folder containing extension icons
│   ├── snek_icon_16.png
│   ├── snek_icon_48.png
│   └── snek_icon_128.png
├── index.html            # Popup HTML file
├── popup.js              # JavaScript to initialize the WASM module
├── background.js         # Background worker script
├── styles.css            # Styles for the extension UI
├── manifest.json         # Chrome extension manifest
├── Cargo.toml            # Rust project configuration
├── build.bat             # Build script for Windows
└── README.md             # This file

License

This project is licensed under the MIT License. See the LICENSE file for details.


Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.


Acknowledgments


About

This is a Chrome extension built for the SNEK Community

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published