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

Bash files in examples to rust-script? #150

Open
Type1J opened this issue Apr 25, 2021 · 5 comments
Open

Bash files in examples to rust-script? #150

Type1J opened this issue Apr 25, 2021 · 5 comments

Comments

@Type1J
Copy link

Type1J commented Apr 25, 2021

I have people with Windows, macOS, and Linux machines. The Windows machines don't have bash, but they all have, or can get (through cargo), rust-script. Can the scripts be changed to use rust-script instead?

@Type1J
Copy link
Author

Type1J commented Apr 25, 2021

...or, even better, could it be worked into build.rs somehow?

@chinedufn
Copy link
Owner

chinedufn commented Apr 30, 2021

Hey there.

The scripts can't be replaced in favor of build scripts because some of the scripts start servers, which you wouldn't want a build script to do.

I'm not too familiar with Windows, but I agree that we want something that works for everyone.

Perhaps we can start by adding scripts called script-name.windows.file-extension that can be run on Windows. Then in the future we could introduce a single approach that worked on any of the major operating systems.

Would that work for you?

@Type1J
Copy link
Author

Type1J commented May 1, 2021

Yes, .cmd files in addition to .sh files that do the same thing would work fine.

I was thinking rust-script because its .crs files are just Rust with a comment at the top to say what cargo deps it needs, and it's directly executable (on Linux or macOS, you can chmod 755 run_something.crs, or register .crs on Windows to be run by rust-script) after a cargo install rust-script on any platform.

@chinedufn
Copy link
Owner

Got it thanks for explaining. Actually, I'd prefer to avoid needing one extra thing for people to install before they can run the examples.

@kotx
Copy link

kotx commented Oct 9, 2021

PowerShell might also be considered an alternative to cmd.

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