{"id":16851897,"url":"https://github.com/cad97/fmod-rs","last_synced_at":"2025-03-17T05:32:10.696Z","repository":{"id":36982045,"uuid":"469953787","full_name":"CAD97/fmod-rs","owner":"CAD97","description":"Rust bindings to FMOD Core and FMOD Studio","archived":false,"fork":false,"pushed_at":"2024-05-29T02:59:28.000Z","size":822,"stargazers_count":7,"open_issues_count":14,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-29T15:59:56.514Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CAD97.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-15T00:46:29.000Z","updated_at":"2024-06-24T05:29:19.629Z","dependencies_parsed_at":"2024-05-29T04:46:40.440Z","dependency_job_id":"d9ec65d0-a40f-4d2a-a29d-4bc26723d9f0","html_url":"https://github.com/CAD97/fmod-rs","commit_stats":{"total_commits":65,"total_committers":1,"mean_commits":65.0,"dds":0.0,"last_synced_commit":"e922002c4067b7942717e25ea674b3edf135c766"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CAD97%2Ffmod-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CAD97%2Ffmod-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CAD97%2Ffmod-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CAD97%2Ffmod-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CAD97","download_url":"https://codeload.github.com/CAD97/fmod-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243846976,"owners_count":20357294,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T13:34:01.779Z","updated_at":"2025-03-17T05:32:09.637Z","avatar_url":"https://github.com/CAD97.png","language":"Rust","funding_links":["https://github.com/sponsors/CAD97/sponsorships?sponsor=CAD97\u0026tier_id=NNNNNN"],"categories":[],"sub_categories":[],"readme":"# FMOD.rs\n\nBindings to the [FMOD adaptive audio engine](https://fmod.com/).\n[What is Adaptive Audio? (video)](https://youtu.be/p-FLWabby4Y)\n\n## Licensing\n\nThis is up top because it's important: FMOD is _not_ free software! In order to\nuse FMOD, you must [acquire a license](https://www.fmod.com/sales). However, if\nyou make less than $200k revenue/year on a small (\u003c$500k) development budget,\nFMOD provides a [Free Indie License](https://www.fmod.com/sales#indie-note).\n\nThe examples in the [examples](examples) folder are direct ports from the\ndistributed FMOD examples, and are thus under the FMOD license. The media files\nused for the examples are not redistributable, and thus need to be acquired\nby you alongside the binaries to run the FMOD Engine.\n\nThe Rust code in this repository is licensed under MIT OR Apache-2.0, but this\ndoes not remove the requirement to comply with the FMOD license.\n\n\u003c!-- Commented until the sponsor tier goes public with FMOD.rs publish\nUsing these bindings is free under these licenses. However, if you do pay for\nan FMOD license, you are encouraged to [tip the developer][tip]. This helps pay\nfor future support of FMOD.rs, gets you a proper commercial license without\nattribution requirement, and earns you prioritized private support for a year.\n\n[tip]: https://github.com/sponsors/CAD97/sponsorships?sponsor=CAD97\u0026tier_id=NNNNNN\n--\u003e\n\n## Providing the FMOD Engine\n\nIn order to comply with the FMOD license, we do _not_ redistribute the FMOD\nEngine. You must [download](https://www.fmod.com/download#fmodengine) the engine\nyourself.\n\nThe currently vendored headers are for FMOD Engine 2.02.19 (build 137979). To\npin the headers to a specific build, pin `fmod-core-sys` and `fmod-studio-sys`.\nThe sys libraries are versioned based on the FMOD version for convenient version\npins; for example, FMOD version 2.02.19 is served by sys crates version 2.19.X.\n\nBy default, this crate links to `fmodL` for development builds and\n`fmod` for release builds. This can be overridden using the\n[`[target.*.fmod]` and `[target.*.fmodstudio]`][links] `config.toml` keys.\n\n[links]: https://doc.rust-lang.org/cargo/reference/build-scripts.html#overriding-build-scripts\n\nThe `link-search` optional feature will instruct FMOD.rs to add the host's\nconventional install location for the FMOD Studio API to the link search path.\nIf this is not known for the current host, the buildscript will panic,\nrequiring the use of `config.toml` to override the build script link config.\n\n### Windows Note\n\nThe Windows `.lib` files use a `_vc` decoration. The crate expects this to be\nthere and appropriately links to `fmod_vc`/`fmodL_vc` on Windows.\n\n\n## Functionality\n\n### Complete\n\n- Raw bindings to the FMOD C API linking and running on Windows.\n- Some examples ported to the wrapped API.\n- Thread-safe API.\n\n### Planned (Soon™)\n\n- All FMOD Core examples ported using Rust idiomatic APIs.\n- Occasional manual tests that linking/running works on macOS/Linux.\n\n### Stretch Goals\n\n- [bevy](https://bevyengine.org/) plugin.\n- 99% API coverage.\n- Thread-unsafe use[^1].\n- Static linking support.\n- Safety audit against misuse.\n- Support multiple FMOD versions.\n\n-----\n\n[^1]: FMOD is thread safe by default. For specifics on FMOD thread safety, see\n[Threads and Thread Safety]. For our purposes, FMOD _is_ threadsafe, _unless_\n`FMOD_INIT_THREAD_UNSAFE` or `FMOD_STUDIO_INIT_SYNCHRONOUS_UPDATE` are used.\n`FMOD_INIT_THREAD_UNSAFE` can be used safely if and only if: 1) only FMOD Studio\nis used, and the Core API is never used; 2) FMOD Studio is not used, and Core\nAPI calls all happen on a single thread; or 3) FMOD Studio is initialized with\n`FMOD_STUDIO_INIT_SYNCHRONOUS_UPDATE` and all FMOD API calls are done in a\nsingle thread. `FMOD_STUDIO_INIT_SYNCHRONOUS_UPDATE` can be safely if and only\nif all Studio API calls happen on a single thread.\u003cp\u003eThus, there are two ways to\nmake the FMOD.rs wrapper thread-safe: forbid the use of the thread-unsafe flags,\nor encode thread safety into the type system. The former is trivial, but the\nlatter is potentially desirable for users who are using FMOD Studio with their\nown asynchronous command queue. See the [Studio API Threads] for more on FMOD\nStudio threading. Synchronous Update is very much a power-user feature and needs\nto be encapsulated in a thread-safe worker queue to be used properly, though, so\nit is acceptable if the thread-unsafe API notably less ergonomic to use than the\nthread-safe API.\u003cp\u003eYou might be tempted to thus just make `System` construction\n`unsafe` and call that enough; let the user deal with it. However, a) that goes\nagainst the Rust philosophy for typed correctness, as any \"leakage\" of FMOD.rs\ntypes to code not aware of the giant caveat would then be unsound; and b) would\npotentially still be unsound anyway if FMOD.rs API calls are still made from\nsafe code without knowledge that the library has been initialized in the\nthread-unsafe mode.\u003cp\u003eThus, exposing the thread-unsafe usage of FMOD is a\nhigh-effort endeavor with minimal payoff; FMOD _permits_ thread-unsafe usage but\n_recommends_ using the inbuilt thread-safe command batching.\n\n[Studio API Threads]: https://fmod.com/resources/documentation-api?version=2.02\u0026page=white-papers-studio-threads.html\n[Threads and Thread Safety]: https://fmod.com/resources/documentation-api?version=2.02\u0026page=white-papers-threads.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcad97%2Ffmod-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcad97%2Ffmod-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcad97%2Ffmod-rs/lists"}