Coder Social home page Coder Social logo

yvt / stella2 Goto Github PK

View Code? Open in Web Editor NEW
47.0 4.0 7.0 3.63 MB

Light-weight desktop client for instant messaging services (abandoned)

License: GNU General Public License v3.0

Rust 97.83% Objective-C 1.74% Shell 0.01% C 0.39% C++ 0.02% Nix 0.01%
rust gui-application

stella2's Issues

Optimize code

  • Re-implement stvg_io::CmdDecoder with a callback-based API and see if it leads to code size reduction.
  • Re-implement iterpool::intrusive_list with minimal generic code sections.
  • Remove O(NM) stylesheet rule lookup

Command-line argument processing

  • Full parsing — Find a lightweight alternative of clap or write one. Maybe clap is small enough if all features are turned off?
  • Minimal CLI for macOS and Windows which are more GUI-centric. Only accept -h/--help or accept nothing at all

Enable the testing backend in CI

From the log output:

running 20 tests
warning: testing backend is disabled, skipping some tests
test bitmap_canvas ... ok
warning: testing backend is disabled, skipping some tests
test bitmap_layer ... ok
warning: testing backend is disabled, skipping some tests
warning: testing backend is disabled, skipping some tests
test bitmap_size ... ok
...

Additional features for platform abstraction layer

  • Color theming — Automatically detect light/dark/high-contrast themes
    • Base API
    • macOS
    • Windows
    • What about Linux?
  • Application-global listener
  • Context menus
  • Notification
  • Clipboard
  • OpenGL/Metal/Vulkan/DXGI surface
  • Accessibility

Testability

  • Add a fake GUI backend
  • Add a test harness that emulates main thread

Improve the composition performance on GTK

  • swrast needs optimization.
  • See if GSK (GTK Scene Graph Kit; added in GTK 4) is up to the task
  • Cairo It doesn't support 9-slice scaling
  • Add a Vulkan compositor if GSK can't cover our use case
    - VK_KHR_incremental_present

Common widgets

  • Label (tcw3::ui::views::label::Label)
    • Already in use
  • Button (tcw3::ui::views::button::Button)
    • Already in use
    • Keyboard input (2d116af)
  • Scrollbar (tcw3::ui::views::scrollbar::Scrollbar)
    • Already in use
  • Single-line text field (tcw3::ui::views::entry::Entry)
  • Multi-line text field
    • To be used in a chat message input
    • Rendering
    • Text input
    • Selection by mouse
    • Selection by keyboard
    • Clipboard operations
    • Scrolling
    • Undo
    • API for accessing contents
  • Checkbox (tcw3::ui::views::checkbox::Checkbox, d2daca7)
    • To be used in a preferences dialog
    • Keyboard input (2d116af)
  • Radio button (tcw3::ui::views::checkbox::RadioButton, c636a51)
    • To be used in a preferences dialog
    • Keyboard input (2d116af)
  • Slider (tcw3::ui::views::slider::Slider, 6cbd6cd)
    • To be used in a preferences dialog
    • Basic functionality
    • Keyboard input (e597d80)
    • Tick marks (bf9a420)
    • Custom labels (cd89ad8)

Enable Control Flow Guard

Control Flow Guard is a forward-edge control-flow integrity mechanism supported by Windows.

https://docs.microsoft.com/en-us/windows/win32/secbp/control-flow-guard:

Control Flow Guard (CFG) is a highly-optimized platform security feature that was created to combat memory corruption vulnerabilities.

https://docs.microsoft.com/en-us/cpp/build/reference/guard-enable-control-flow-guard?view=vs-2019:

A common attack on software takes advantage of bugs in handling extreme or unexpected inputs. Carefully crafted input to the application may overwrite a location that contains a pointer to executable code. This can be used to redirect control flow to code controlled by the attacker. The CFG runtime checks do not fix the data corruption bugs in your executable. They instead make it more difficult for an attacker to use them to execute arbitrary code. CFG is a mitigation tool that prevents calls to locations other than function entry points in your code.

According to [Burow2017], the execution time overhead measured with the SPEC CPU2006 benchmarks ranges between -0.3–10.8% with a geometric mean of 2.3%.

[Burow2017] Burow, Nathan, et al. "Control-flow integrity: Precision, security, and performance." ACM Computing Surveys (CSUR) 50.1 (2017): 1-33.

The compiler implementation of CFGuard is comprised of two parts: The first part is to emit metadata indicating valid entry points, and the second part is to insert runtime checks before indirect call instructions. In LLVM, the first part was there for a quite long time, but the patch adding the second part was merged only in 2019. The support for CFGuard in Rust has been introduced in rust-lang/rust#68180.

The option for enabling CFGuard is currently feature-gated by -Z control_flow_guard, whose tracking issue can be found at rust-lang/rust#68793.

  • Enable in CI builds
  • Wait for the stabilization of -Z control_flow_guard

Minimum platform abstraction layer

  • Basic window management
    • Base API
    • winit removed in #12
    • GTK
    • Cocoa
    • Windows
  • Text layouting and rendering
    • Pango
    • Core Text
    • DirectWrite
  • Compositing
    • Software
    • Core Animation
    • Windows UI Composition
  • 2D drawing
    • Cairo
    • Core Graphics
    • GDI+
  • Mouse input
    • Base API
    • winit removed in #12
    • GTK
    • Cocoa
    • Windows
  • Keyboard input
    • Base API
    • GTK
    • Cocoa
    • Windows
  • Input methods
    • Base API
    • GTK
    • Cocoa
    • Windows

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.