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

Missing linux/unix/osx support #1

Closed
Byron opened this issue May 30, 2015 · 4 comments
Closed

Missing linux/unix/osx support #1

Byron opened this issue May 30, 2015 · 4 comments

Comments

@Byron
Copy link

Byron commented May 30, 2015

This issue is just meant to be a place to track progress on implementing the platform specific requirements to make cargo-script work on non-windows platforms.

Even though I have no intention on implementing it myself, I would like to try cargo-script when it runs on OSX as well.

@DanielKeep
Copy link
Owner

Currently, the other thing that really needs modification is platform::inner::get_cache_dir_for. I haven't checked to see exactly where Cargo puts things, but presumably it's something like $HOME/.cargo.

The major reason I haven't is that I can't be bothered to set up a linux VM for testing right now.

There is one thing that does need some work: how to invoke cargo script from a hashbang. My vague recollection is that #!/usr/bin/env cargo script will be invoked as /usr/bin/env "cargo script" "$0", so that won't work. Annoyingly, cargo passes the complete command-line to sub-commands, so what cargo-script gets for cargo script X is cargo-script script X, which means the hashbang would have to add a script argument and blech.

So a *nix version will probably want some kind of wrapper around cargo script, too.

@withoutboats
Copy link

cargo does put things in ~/.cargo

DanielKeep added a commit that referenced this issue May 31, 2015
After running a script, it will now go through the cache and kill
everything at least 1 week old.

--clear-cache, if given, will cause it to go through and kill *everything*
before attempting to load the input.

This also expands the surface area of platform-specific code.
See issue #1.
@Byron
Copy link
Author

Byron commented Jun 2, 2015

Awesome, thanks !

@DanielKeep
Copy link
Owner

@Byron: Thanks should be directed to @Ryman who implemented it. :)

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

No branches or pull requests

3 participants