• Phoenix मौजूदा Xorg को fork किए बिना Zig भाषा में शुरू से लिखा गया नया X server है, जिसका लक्ष्य एक आधुनिक विकल्प बनना है
  • फिलहाल यह GLX, EGL, Vulkan graphics इस्तेमाल करने वाले सरल applications को मौजूदा X server के भीतर nested mode में चला सकता है, लेकिन standalone execution अभी supported नहीं है
  • सरलता के लिए यह पिछले 20 सालों में लिखे गए applications और पिछले 15 सालों के hardware को ही support करता है, और server driver interface के बिना काम करता है
  • security बढ़ाने के लिए protocol messages को अपने-आप parse करता है, और applications के बीच access को permission request-आधारित isolation structure से सीमित करता है
  • HDR, VRR, multi-monitor, built-in compositor जैसी आधुनिक technologies को support करता है, और Wayland compatibility तथा X11 protocol extension की भी योजना है

Phoenix का परिचय

  • Phoenix Xorg server को replace करने के लिए बनाया गया एक आधुनिक X server है, जो Zig भाषा में पूरी तरह से शुरू से लिखा गया implementation है
    • यह Xorg का fork नहीं है, और ज़्यादा सरल व सुरक्षित architecture को लक्ष्य बनाता है
  • फिलहाल यह पूरी तरह production-ready चरण में नहीं है, और मौजूदा X server के अंदर nested execution (nested mode) ही support करता है
    • यह GLX, EGL, Vulkan आधारित hardware-accelerated rendering कर सकता है

लक्ष्य

सरलता

  • Xorg से अधिक सरल server, जो X11 protocol का केवल कुछ हिस्सा support करता है
    • इसमें सिर्फ वही features शामिल हैं जो पिछले 20 सालों में लिखे गए applications को चाहिए
  • यह Linux DRM और Mesa GBM support करने वाले पिछले 15 सालों के hardware को target करता है
  • Xorg की तरह अलग server driver interface का इस्तेमाल नहीं करता
    • इसकी संरचना Wayland compositor जैसी है

सुरक्षा

  • protocol messages का automatic parsing करके safety सुनिश्चित की जाती है
    • Zig के ReleaseSafe build option के जरिए array index overflow जैसी अवैध गतिविधियों का अपने-आप पता लगाया जाता है
  • default रूप से applications एक-दूसरे से isolate होकर चलती हैं
    • दूसरे apps के साथ interaction केवल GUI permission request या पहले से दी गई permission के जरिए ही संभव है
    • उदाहरण: screen recording app केवल चुनी गई window को ही record कर सकती है
  • access restriction होने पर client को error की जगह dummy data मिलता है
  • global shortcuts तभी काम करते हैं जब उनमें modifier keys (ctrl, shift आदि) शामिल हों
    • modifier key के बिना global shortcut इस्तेमाल करने पर explicit permission चाहिए
  • option के जरिए इसे Xorg जैसा ही behavior देने के लिए बदला जा सकता है

आधुनिक तकनीक support

  • multi-monitor, अलग-अलग refresh rates, VRR, HDR जैसी आधुनिक display technologies का support
  • एक single framebuffer की जगह हर display को अलग से handle किया जाता है

graphics processing में सुधार

  • default रूप से tearing-free rendering और built-in compositor उपलब्ध
    • external compositor (जैसे picom) चलने पर यह अपने-आप disable हो जाता है
    • अगर fullscreen app vsync बंद कर दे, तो उसी app के हिसाब से behavior adjust किया जाता है
  • vsync और compositor latency कम करना लक्ष्य है

नए standards

  • प्रति-monitor DPI property (randr property) को define और document करने की योजना
    • applications monitor-specific DPI के अनुसार content scaling कर सकती हैं

X11 protocol extension

  • HDR जैसी नई features की जरूरत होने पर X11 protocol extension जोड़े जाएंगे

Wayland compatibility

  • यह मानकर चला गया है कि कुछ apps केवल Wayland के लिए हो सकती हैं
    • Phoenix Wayland को सीधे support कर सकता है, या Wayland–X11 bridge (जैसे 12to11) के जरिए चल सकता है

nested display server

  • X11 या Wayland के अंदर hardware-accelerated nested execution संभव
    • Phoenix की debugging और window manager/compositor testing के लिए उपयोगी
    • Wayland environment में Xwayland alternative server के रूप में इस्तेमाल किया जा सकता है

non-goals

  • Xorg server को पूरी तरह replace करना इसका लक्ष्य नहीं है
    • Xorg अधिक X11 features और पुराने hardware support को बनाए रखेगा
  • कई X11 screens support नहीं किए जाते हैं (सिर्फ multi-monitor support है)
  • GrabServer call का कोई असर नहीं होगा
  • endian-swap client/server को जरूरत पड़ने पर फिर से देखा जाएगा
  • indirect GLX (remote rendering) support नहीं है
    • इसकी complexity ज्यादा है, और remote streaming अधिक efficient है
    • जरूरत होने पर GLX proxy के जरिए remote rendering संभव है

X11 protocol से अंतर

  • font-related features सहित X11 core protocol के कुछ हिस्से अभी implement नहीं किए गए हैं
  • string encoding default रूप से UTF-8 इस्तेमाल करती है
    • लेकिन protocol में जहां ISO Latin-1 स्पष्ट रूप से निर्दिष्ट है, वहां अपवाद रहेगा

installation और build

  • install command:
    zig build -Doptimize=ReleaseSafe
    sudo zig build install -p /usr/local -Doptimize=ReleaseSafe
    
  • uninstall के लिए /usr/local/bin/phoenix को manually delete करना होगा
  • development build:
    zig build
    
    • output binary: ./zig-out/bin/phoenix
    • run और build एक साथ किया जा सकता है: zig build run

X11 protocol documentation generation

  • command: zig build -Dgenerate-docs=true
    • output: ./zig-out/protocol/ में .txt files बनती हैं
    • यह official documentation style में auto-generated docs हैं, और यह feature अभी प्रगति में है

dependencies

  • Zig 0.14.1
  • x11 (xcb) — X11 nested mode के लिए (-Dbackends=x11)
  • wayland (wayland-client, wayland-egl) — Wayland nested mode के लिए (-Dbackends=wayland, फिलहाल unsupported)
  • drm (libdrm, gbm) — standalone execution के लिए (-Dbackends=drm, फिलहाल unsupported)
  • OpenGL (libglvnd)gl और egl प्रदान करता है

अभी कोई टिप्पणी नहीं है.

अभी कोई टिप्पणी नहीं है.