New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose remaining environment API #16
Comments
Should we bother implementing the experimental commands? Since they could change or be removed at any time, any safe Rust interface we implement would be unstable and could become unsafe. |
I'd be okay with putting these behind a feature flag, with the advisory that these are unstable and subject to change. Those that are willing to take the plunge do so at their own risk, and we would officially not consider it public API from a semver perspective. Perhaps |
Makes sense. I'll implement those last, then. |
I've thought about this more, and the idea that this crate could be used to create potentially invalid cores I think means we should hold off implementing environment calls until they are stabilized. The |
After thinking about it some more, I don't think the experimental options are actually changed in practice. From looking at the environment commands in libretro.h, what seems to happen instead is that the constant for the command is removed, the frontends stop supporting it (i.e. they return false) and a new version is introduced. For instance, RETRO_ENVIRONMENT_GET_VARIABLE and SET_VARIABLES used to be keys 4 and 5, but those two keys have since been removed and updated versions were assigned to 15 and 16. I think by "change" they really mean "replace". A properly written core ought to check whether the frontend supports any environment command (stable or otherwise) so there shouldn't be any trouble when an experimental command is deprecated/replaced. I think we could support them with a feature flag to opt into it like you originally suggested. |
Many of the calls for
get_raw
,set_raw
, andcmd_raw
aren't modeled properly. Effort should be focused on getting them exposed in an idiomatic way so that more of theunsafe
API surface is reduced. This doesn't need to be as restrictive as #2 for the moment, but laying the groundwork for it would be nice.The text was updated successfully, but these errors were encountered: