Skip to content

Latest commit

 

History

History
179 lines (153 loc) · 7.74 KB

README.md

File metadata and controls

179 lines (153 loc) · 7.74 KB

Cala

Make portable apps and video games in Rust!

docs.rs crates.io Zulip Chat

About | Source | Changelog | Tutorials | Blog

Are you sad that the standard library's only system interface is the filesystem? This crate is for you! This crate provides a safe abstraction over windowing, audio, accessibility, input, and video. This crate, however, is not intended to support multimedia format parsing - that's developed as a separate crate: Caved.

Cala is intended to be an "oxidized re-implementation" of both Flutter/GTK and SDL/other SDL projects in one library! Flutter is mostly intended for mobile applications, and GTK is just for desktop applications, but what if you want to develop the same app for both? Then you use this crate (a lot of features are still WIP)! Cala additionally targets the web and bare metal systems. Note also that even if you're not trying to make your application / video game extremely portable, you can still use this crate!

You might ask, "Shouldn't apps and video games use separate libararies; Why are they combined?". They usually need do the same thing, and some desktop application depend on SDL, like VLC, and some video games depend on GTK, like Veloren (at least when built on Linux). There's clearly a shared interest; so they should be combined. That said, Cala is extremely modular, and doesn't include any modules at all unless you enable some features. The modules are named exactly the same as the features, so you enable the camera feature to be able to use the camera module.

Naming

The name cala is derived from the fungus known as calafate rust.

Feature Support

Each system interface can be enabled with a feature. Names of features match the module names where the API is located. Just add it to your Cargo.toml:

[dependencies.cala]
version = "0.9"
features = ["log", "speaker"]

Here's a list of all of the targeted platforms and what they support.

  • ✓: supported
  • —: not planned / possible
  • ?: untested
Feature Linux MacOS Windows Web Android
bluetooth
camera
client
database
graphics 9 8
haptic
info
input 7 6
log
microphone 5 4 ?
port
random ?
server
speaker 4 ?
task
timer
usb
when
window 9

Module documentation may include simple tutorials. More in depth tutorials may be found here.

Not Yet Attempted Support, But Planned

  • iOS
  • Fuchsia
  • Redox
  • Nintendo Switch
  • XBox
  • PlayStation
  • BSD variants
  • Others not on this list that you will make a pull request for adding them

License

Licensed under any of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Contributors are always welcome (thank you for being interested!), whether it be a bug report, bug fix, feature request, feature implementation or whatever. Don't be shy about getting involved. I always make time to fix bugs, so usually a patched version of the library will be out a few days after a report. Features requests will not complete as fast. If you have any questions, design critques, or want me to find you something to work on based on your skill level, you can email me at [email protected]. Otherwise, here's a link to the issues on GitHub. Before contributing, check out the contribution guidelines, and, as always, make sure to follow the code of conduct.