lucianobestia/cargo-rssc

cargo rssc - Rust scripts for crates building

will copy the template_basic into scripts_rssc folder

cargo-rssc

Try it

Inside your main rust project directory (the one with Cargo.toml) run:

cargo install cargo-rssc
cargo rssc new

Open in new editor the new directory scripts_rssc in your main rust project and view/edit the rust code of the helper rust project.
Then try in the main rust project:

cargo rssc build
cargo rssc release
cargo rssc docs

Motivation

Cargo is a great tool for building rust projects. It has all the basics: cargo build, cargo build --release, cargo fmt, cargo test, cargo doc,...
But sometimes we need to do more things like copying some files, publish to ftp or enter long commands. These are tasks that must be automated.
There are many different build systems and task runners there: make, cmake, shell scripts, cargo-make, cargo-script, cargo-run-script, runner, python scripts, powershell scripts, cmd prompt scripts, ...
Sadly there is no standard in the rust community for now. I wanted something similar to build.rs, so I can write my "scripts" in pure rust. I don't want to learn another meta language with weird syntax and difficult to debug. So I will make something really simple, easy, rusty and extensible.

rssc - Rust scripts for crates building

Rust is a compiled language. It is not really a scripting or interpreted language. But the compilation of small projects is really fast and can be ignored. Subsequent calls will use the already built binary and so the speed will be even faster.

scripts_rssc helper project

In the root of the main rust project it will create a new directory scripts_rssc with a new helper rust project. It should not interfere with the main rust project. This folder will then go into git commits and pushed to remote repositories as part of the main project. It has its own .gitignore to avoid committing its target directory.
The scripts_rssc helper project contains user defined tasks in rust code. This helper project should be opened in a new editor starting from the scripts_rssc folder. It does not share dependencies with the main project. It is completely separate.

cargo rssc subcommand

The binary crate cargo-rssc is added to cargo as a new subcommand cargo rssc.

cargo install cargo-rssc

Examples:

cargo rssc new
cargo rssc build
cargo rssc release
cargo rssc docs

It reads the CLI arguments and runs the scripts_rssc binary with them. If needed it will compile scripts_rssc first.
The code-flow of the source code of cargo-rssc is simple, fully commented and straightforward to audit in this open-source crate.

template_basic

The command

cargo rssc new

will copy the template_basic into scripts_rssc folder.
This has no dependencies and is really simple to understand how it works.
Explore it and add your own tasks or rust code.
Then in the main project run your task like:

cargo rssc build

Your code will be compiled and executed.

template_with_lib

This is a work in progress.
The goal is to create a cargo_rssc_lib with many functions that are commonly used when building rust projects.

cargo crev reviews and advisory

It is recommended to always use cargo-crev
to verify the trustworthiness of each of your dependencies.
Please, spread this info.
On the web use this url to read crate reviews. Example:
https://web.crev.dev/rust-reviews/crate/num-traits/

Information - Updated Mar 25, 2022

Stars: 0
Forks: 0
Issues: 0

Find libs and crates in a Vcpkg installation

Vcpkg installation from cargo build scripts

Find libs and crates in a Vcpkg installation

Run cargo build to install all dependencies

Run cargo run to play the game

Run cargo build to install all dependencies

Simple Blockchain

cargo run para ejecutar la app, cargo build para crear un ejecutable

Simple Blockchain
Cargo

1.6K

Tarpaulin is a code coverage reporting tool for the Cargo build system, named

for a waterproof cloth used to cover cargo on a ship

Tarpaulin is a code coverage reporting tool for the Cargo build system, named

A Rust client for connecting to OmniSciDB via its RPC protocol of Thrift

OmniSciDB via its RPC protocol of Cargo, using cargo build

A Rust client for connecting to OmniSciDB via its RPC protocol of Thrift

rust-embed-resource

Cargo build script library to handle compilation and inclusion of Windows resources

rust-embed-resource

A rendering engine/framework built on SDL2 (window/context generation and input handling), and Modern OpenGL (graphics)

Once installed, while in the project directory, run cargo build --release to build, or use cargo run --release to run directly

A rendering engine/framework built on SDL2 (window/context generation and input handling), and Modern OpenGL (graphics)

$ cargo build --release

Note: If you'd like to hijack the system apps and libraries as well, disable System Integrity Protection (SIP)

$ cargo build --release

! This is just a prototype !

cargo build --target wasm32-unknown-unknown

! This is just a prototype !
Facebook Instagram Twitter GitHub Dribbble
Privacy