Skip to content

judemille/fmod.rs

Repository files navigation

fmod-sys docs fmod-studio-sys docs fsbank-sys docs GitHub Workflow Status (with event) Contributor Covenant

fmod-sys: Rust bindings for the FMOD Engine SDK

This crate provides raw, low-level bindings to the FMOD Engine SDK.

License

Licensed under the Mozilla Public License, version 2.0.

What does this mean for me?

I get it, you don't have time to read the license. Here's some bullet points on what this license means for you.

  • You may combine this library with other work that is under a different license, so long as the files of this library remain separate.
    • The code of this library, under the MPL-2.0 license (or compatible), must be made readily available to users.
    • Recipients of the larger work must be made aware of the use of this library, its license, and how to acquire the code of this library.
  • Any modifications of this library's files must be published under the MPL-2.0.
  • You may use this library commercially, so long as it is made clear that it is done on your own behalf, and not on the behalf of the contributors.

There is some more nuance than that, but those bullet points cover the general points.

Contribution

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

All commits must be signed-off (git commit -s). This is a declaration that you have read and agree to the terms in the Developer Certificate of Origin (DCO). This can be compared to a CLA, but is different in that your copyright remains with you. All you are doing is attesting that you can contribute code under the repository's license. A copy of the DCO text is kept in this repository at DCO.txt.

You may sign the DCO with your preferred name, so long as it is relatively consistent, so we can keep track of who's who.

Minimum Supported Rust Version

The MSRV of this crate is always the latest stable compiler version at the time of a given commit. Maybe it'll work on an older version. Maybe it won't. No guarantees.

This will probably change once a stable release goes out.

Unit Testing

The mockall feature of these crates is intended to be enabled when unit testing a crate that uses one of these crates. All functions will be mocked, using mockall. These crates currently expose mockall = "~0.13".

Functions live in the functions module, which, when mocking is enabled, is doubled up as mock_functions. It can be used like this:

#[cfg(not(test))]
use fmod_sys::functions as fmod_sys_fns;
#[cfg(test)]
use fmod_sys::mock_functions as fmod_sys_fns;

use fmod_sys_fns::{...};

You can also use the mockall::double macro if you so desire.