cala 0.8.0

Make portable apps and video games in Rust!
Documentation

Cala

Make portable apps and video games in Rust!

docs.rs build status crates.io Zulip Chat

About | Source | Changelog | Tutorials | Blog

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 audio feature to be able to use the audio module.

Naming

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

Support

Here's a list of all of the targeted platforms and what they support. "X" means it's supported, "-" means it's not planned. "?" means it might work, but hasn't been tested yet. Some planned features have associated issues linked with the number.

Feature Linux MacOS Windows Web Android
accel
bluetooth
camera
draw X 9 8
exec X X
file X X X
gpio - - -
input X 7 6 ?
journal X X X X
microphone X 5 4 X ?
net X X X ?
pixels X 9
speaker X 4 X ?
time X X X X
user X X X X

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

Getting Started

Each hardware interface can be enabled with a feature. For example, If you want to depend on the audio feature and the clock feature, you might put this in your Cargo.toml:

[dependencies.cala]
version = "0.8"
features = ["audio", "clock"]

There is a module for each feature (feature and module names match). Module documentation may include simple tutorials. More in depth tutorials may be found here.

Features

Here's a list of the features, with links to documentation.

  • user - Getting user information
  • audio - Playing / recording audio
  • clock - Date, Time of day, Timer
  • gamepad - Game Controller - JoyStick
  • files - Containerized filesystem loading / saving ZIP files
  • draw - Render and User Interface
  • Camera - Webcam WIP
  • Network - Bluetooth & Wifi Direct WIP
  • Hardware acceleration - SIMD, GPU WIP

Contributing

Contributors are always welcome! Whether it is 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 soon after a report. Features take me longer, though. I'll also always listen to any design critiques you have. If you have any questions you can email me at jeronlau@plopgrizzly.com. Otherwise, here's a link to the issues on GitHub.

And, as always, make sure to always follow the code of conduct. Happy coding!

License

This repository is licensed under either of the following:

at your option.

Contribution Licensing

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