Crates.io | cala |
lib.rs | cala |
version | 0.9.0 |
source | src |
created_at | 2018-06-22 05:13:50.880844 |
updated_at | 2021-01-05 08:21:43.350218 |
description | Make portable apps and video games in Rust! |
homepage | https://libcala.github.io/cala |
repository | https://github.com/libcala/cala |
max_upload_size | |
id | 71213 |
size | 123,664 |
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.
The name cala is derived from the fungus known as calafate rust.
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.
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.
Licensed under any of
at your option.
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 jeronlau@plopgrizzly.com. 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.