Convert Figma logo to code with AI

Blinue logoMagpie

An all-purpose window upscaler for Windows 10/11.

8,945
475
8,945
77

Quick Overview

Magpie is a lightweight and flexible web framework for building modern web applications in Rust. It provides a simple and intuitive API for handling HTTP requests, routing, middleware, and more, making it a great choice for developers looking to build scalable and efficient web applications.

Pros

  • Lightweight and Performant: Magpie is built on top of the Hyper HTTP library, which is known for its high performance and low overhead.
  • Flexible and Extensible: Magpie's modular design allows developers to easily integrate third-party libraries and customize the framework to fit their specific needs.
  • Asynchronous by Default: Magpie leverages Rust's async/await syntax, making it easy to write concurrent and scalable web applications.
  • Comprehensive Documentation: The Magpie project has detailed documentation that covers a wide range of topics, from getting started to advanced usage.

Cons

  • Relatively New: Magpie is a relatively new web framework, and as such, it may not have the same level of community support and third-party libraries as some more established frameworks.
  • Learning Curve: Rust's syntax and concurrency model can be challenging for developers who are new to the language, which may make it harder to get started with Magpie.
  • Limited Ecosystem: While Magpie is a powerful framework, the Rust ecosystem for web development may not be as mature as some other languages, which could limit the availability of third-party libraries and tools.
  • Niche Adoption: Rust is still a relatively niche language, which means that Magpie may not have the same level of adoption and community support as some more popular web frameworks.

Code Examples

Here are a few examples of how to use Magpie:

  1. Basic Server Setup:
use magpie::prelude::*;

#[tokio::main]
async fn main() {
    let app = App::new()
        .route("/", get(|| async { "Hello, Magpie!" }))
        .run("127.0.0.1:3000")
        .await;
}
  1. Handling Route Parameters:
use magpie::prelude::*;

#[tokio::main]
async fn main() {
    let app = App::new()
        .route("/users/:id", get(|req: Request| async move {
            let id = req.param("id").unwrap();
            format!("User ID: {}", id)
        }))
        .run("127.0.0.1:3000")
        .await;
}
  1. Middleware and Logging:
use magpie::prelude::*;

async fn logger(req: Request, next: Next<'_>) -> Response {
    println!("Incoming request: {:?}", req);
    next.run(req).await
}

#[tokio::main]
async fn main() {
    let app = App::new()
        .use_middleware(logger)
        .route("/", get(|| async { "Hello, Magpie!" }))
        .run("127.0.0.1:3000")
        .await;
}

Getting Started

To get started with Magpie, you'll need to have Rust installed on your system. You can then create a new Magpie project using Cargo:

cargo new my-magpie-app
cd my-magpie-app

Next, add the Magpie dependency to your Cargo.toml file:

[dependencies]
magpie = "0.5.0"

You can then write your Magpie application in the src/main.rs file, using the examples provided above as a starting point. Once you're ready to run your application, use the following command:

cargo run

This will start your Magpie server and make it available at http://127.0.0.1:3000.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README


Logo

Magpie

License build All Contributors GitHub all releases

🌍 English | 简体中文

Magpie is a lightweight window scaling tool that comes equipped with various efficient scaling algorithms and filters. Its primary purpose is to enhance game graphics and enable non-fullscreen games to display in fullscreen mode.

We are using Weblate for localization work and would appreciate your help in translating Magpie into more languages.

Translation status

👉 Download

👉 FAQ

👉 Built-in effects

👉 Compilation guide

👉 Contributing

Features

  • Scale any window to fullscreen
  • Numerous built-in algorithms, including Lanczos, Anime4K, FSR, Adaptive Sharpen, various CRT shaders, and more
  • WinUI-based user interface with support for light and dark themes
  • Create configuration profiles for specific windows
  • Multi-monitor support

How to use

  1. Configuring scaling modes

    Magpie provides some simple scaling modes by default, but it is recommended to configure them according to your specific use case. Then, change the global scaling mode on the "Profiles"-"Defaults" page.

  2. Scaling a window

    To scale a window, bring the desired window to the foreground and press the shortcut key (default is Win+Shift+A) to display it in fullscreen mode. Note that the window to be scaled must be in windowed mode, not maximized or fullscreen mode. You can also use the "Scale after xs" button on the "Home" page, and Magpie will automatically scale the foreground window after a few seconds.

  3. Creating profiles for windows

    This allows you to save configurations specific to a particular window. Magpie also supports automatically activate scaling when that window is brought to the foreground.

  4. Customizing effects

    Magpie uses Direct3D compute shader to implement effects, but the syntax has been extended to define resources and organize multiple passes. For more information, please refer to MagpieFX. Those with experience in shader writing can easily create custom effects.

Screenshots

Main window

System requirements

  1. Windows 10 v1903+ or Windows 11
  2. DirectX feature level 11

Hints

  1. If you have set DPI scaling and the window you want to scale does not support high DPI (which is common in older games), it is recommended to first enter the program's compatibility settings and set "High DPI scaling override" to "Application".

  2. Some games support zooming the window, but with extremely naive algorithms. Please set the resolution to the built-in (best) option.

Acknowledgement ✨

Thanks go to these wonderful people:

Xu
Xu

🚧 💻 👀 📖 💬
hooke007
hooke007

📖 💬 📓 💻
Pal Lockheart
Pal Lockheart

📓
Steve Donaghy
Steve Donaghy

💻 🌍
gyro永不抽风
gyro永不抽风

💻
ButtERRbrod
ButtERRbrod

🌍
NightFox
NightFox

🌍
Tzugimaa
Tzugimaa

💻
WHMHammer
WHMHammer

🌍
kato-megumi
kato-megumi

💻
Mike Wang
Mike Wang

📓
Sammy Hori
Sammy Hori

🌍
NeilTohno
NeilTohno

🌍
a0193143
a0193143

🌍
soulset001
soulset001

🌍
WluhWluh
WluhWluh

🎨
Serdar Sağlam
Serdar Sağlam

🌍
Andrus Diaz German
Andrus Diaz German

🌍
Kefir2105
Kefir2105

🌍
animeojisan
animeojisan

🌍
MuscularPuky
MuscularPuky

🌍
Zoommod
Zoommod

🌍
fil08
fil08

🌍
攸羚
攸羚

💻
OHaiiBuzzle
OHaiiBuzzle

🌍
Rastadu23
Rastadu23

🌍
hauuau
hauuau

💻
nellydocs
nellydocs

🌍
cunnyplapper
cunnyplapper

💻
Erich Yu
Erich Yu

💻

This project follows the all-contributors specification. Contributions of any kind are welcome!

NPM DownloadsLast 30 Days