chinedufn / percy

Build frontend browser apps with Rust + WebAssembly. Supports server side rendering.
https://chinedufn.github.io/percy/
Apache License 2.0
2.26k stars 84 forks source link

Bash files in examples to rust-script? #150

Open Type1J opened 3 years ago

Type1J commented 3 years ago

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 commented 3 years ago

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

chinedufn commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 2 years ago

PowerShell might also be considered an alternative to cmd.