Skip to content
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

Add resource path resolver for macOS #93

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

yuhr
Copy link

@yuhr yuhr commented Oct 16, 2020

Don't merge yet! This PR is an early-bird for #12, being not yet publicly usable because servo/core-foundation-rs#416 is not yet officially released. Just tracking purpose for now, although you can try it by adding following dependency to your project's Cargo.toml.

cargo-bundle = { git = "https://github.com/yuhr/cargo-bundle", branch = "cross-platform-resource-loading" }

I've added a companion library which publishes two functions resources_root and resource_path, but the APIs may change due to compatibility with other platform-specific stuff.

Example:

let path = cargo_bundle::resource_path(path_relative_from_project_root);

@yuhr
Copy link
Author

yuhr commented Nov 29, 2020

macOS has an intrinsic system to bundle some independent (I mean, not embedded into executable binary) resources and metadata files, while others do not AFAIK. Current windows support is effectively broken as noted in #77, #78, and #79, so I can't see where bundled resources stored actually but maybe next to the executable would be appropriate...

@yuhr yuhr marked this pull request as draft February 2, 2021 20:12
@fwcd
Copy link

fwcd commented Jul 12, 2023

Any updates on this? If I read this correctly, an updated version of core-foundation-rs should be released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants