Giter VIP home page Giter VIP logo

quartzcorer's Introduction

Drew's fast Rust QuartzCore bindings

Provides select Rust bindings for Apple QuartzCore framework, also known as Core Animation. As far as I know, this is the only crate to use this framework from Rust.

Part of the objr expanded universe, distinctive features of this library:

  • Fast. This crate is significantly faster than other crates. If you're struggling to get 60fps or ProMotion/adaptive refresh rate speeds, this is the solution for you.
    • The full set of optimization is far too many to list, but the big idea is to either do what native ObjC/Swift applications do, or do something faster.
    • Compile-time selectors. Most Rust crates do a runtime lookup for ObjC methods, which involves acquiring a lock and other yucky stuff, either on the first call or every call. Instead, we do what real ObjC compilers do, which is way faster. For more details, see objr
    • Smart pointers that provide global ARC inference. Like ARC, you don't need to write manual retain/release calls. Unlike ARC, the compiler usually doesn't need to write them either, meaning lower runtime memory management cost than even native code. For more details, see objr.
    • Runtime autorelease eliding, which keeps your objects out of autoreleasepools. For more details, see objr.
    • Pointer packing for optional types so they fit in a u64. For more details, see objr
  • Safe APIs. Where possible APIs are designed with safe abstractions to provide familiar guarantees to Rust developers
  • Low-level. These bindings assume familiarity with bound APIs and are not documented separately. For details on how they work, see the native documentation.
  • Free for noncommercial or "small commercial" use.

Implementation status

The following APIs are at least partially implemented. These implementations are incomplete but contain common functions or "the ones I use".

The objr macro system makes it very ergonomic to add new bindings for specific missing features or new Metal APIs.

  • CAMetalLayer - many APIs
  • CAMetalDrawable - a few APIs
  • CALayer - type only
  • CALayerDelegate - type only

quartzcorer's People

Contributors

drewcrawford avatar

Watchers

 avatar  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.