149 Repositories
Rust script-macro Libraries
Blaze is a Rust script that continuously monitors server resource usage and sends real-time summaries and alerts to a Discord channel via Webhook.
Blaze Blaze is a Rust script designed to run 24/7 on a server, providing a summary of resource usage every 30 minutes (configurable) to a Discord chan
Rustato: A powerful, thread-safe global state management library for Rust applications, offering type-safe, reactive state handling with an easy-to-use macro-based API.
Rustato State Manager A generical thread-safe global state manager for Rust Introduction • Features • Installation • Usage • Advanced Usage • Api Refe
This library implements the flip-flop operator from Perl and Ruby as a Rust macro.
flip_flop.rs This library implements the flip-flop operator from Perl and Ruby as a Rust macro. Changelog April 1, 2024: Version 1.0.0. Usage The flip
Style terminal outputs in a minimal, macro-based, and dead simple way.
sty 🌈 $\mathbb{\color{red}{Style \ } \color{lightblue}{terminal}\ \color{black}{outputs \ }\color{gray}{\ in\ a} \color{magenta}{\ minimal}\color{gra
nl-sh: Natural Language Shell
The Natural Language Shell integrates GPT4 or local GGUF-formatted models directly into the terminal experience, allowing operators to describe their tasks in either POSIX commands or fluent human language
A procedural macro that copy-pastes match arms for new type variant enums.
All the same! If you ever had code that looks like this: use std::io; use std::pin::Pin; use std::task::{Context, Poll}; use tokio::io::AsyncWrite; us
Create Streamdeck Macros For Helldivers 2 Strategems!
Helldivers 2 Stratagem Macro Engine For Streamdeck This program contains macros for various stratagems to use. All macros are contained in the macro_e
Just provide a macro for a certain programming language.
Trust me, this is safe! A macro wrap unsafe keyword into safe! macro. Always trust programmers. use std::alloc::{alloc, dealloc, Layout}; use trust_m
wait what? generate your entire infra from rust macros
infra as macro translate rust structs to terraform at compile time // your infra is a macro static DB: Postgres = Postgres16! { host: "env.host",
Rust macro to use a match-like syntax as a elegant alternative to nesting if-else statement
cond Rust macro to use a match-like syntax as an elegant alternative to many if-else statements. I got the idea from empty Go switch statements. I tho
Minimal, blazing fast Node.js script runner
nrr Minimal, blazing fast Node.js script runner. Why? nrr initializes and resolves scripts way faster than package managers. It achieves this by provi
A Rust macro for quickly unwrapping a refutable pattern.
unwrap_let! A Rust macro for quickly unwrapping a refutable pattern. Install Add unwrap_let to your dependency by running cargo add unwrap_let or edit
This library provides a convenient derive macro for the standard library's std::error::Error trait.
derive(Error) This library provides a convenient derive macro for the standard library's std::error::Error trait. [dependencies] therror = "1.0" Compi
A procedural macro to generate a new function implementation for your struct.
Impl New 🦀 A procedural macro to generate a new function implementation for your struct. 🚀 Add to your project Add this to your Cargo.toml: [depende
Harvest Moon: (More) Friends of Mineral Town event script compiler
mary This is a script compiler for Harvest Moon: Friends of Mineral Town and Harvest Moon: More Friends of Mineral Town for the GBA. The end goal is f
todo2(a.k.a. todo or die) - A better todo! macro inspired from searls/todo_or_die
todo2 todo2(a.k.a. todo or die) - A better todo! macro inspired from searls/todo_or_die This crate provides a better todo! macro, which allows you to
A tool that allows you to modify, edit, and recompile the AST script of Artemis engine.
Artemis AST Script Processor This utility offers a set of Rust functions to parse and manipulate Artemis AST-based scripts. Features Tokenization: Con
Enhance Rust errors with file and line details using the `#[wherr]` macro for clearer debugging.
wherr Crate Discuss wherr on Hacker News Enhance Rust's ? operator by appending file and line number details to errors, simplifying the debugging proc
Opinionated set of extensions for use with rust-script
rust-script-ext Opinionated set of extensions for use with rust-script. Using rust-script to run Rust like a shell script is great! This crate provide
Macro to print variable(s) with values nicely (stripped from release builds)
log_macro Macro to print variable(s) with values nicely (stripped from release builds) Install cargo add log_macro Use Add this to top of file: #[mac
proc-macro to help with using surrealdb's custom functions
SurrealDB Functions This is a proc-macro crate that given a path to a .surql file or a folder of .surql files, will parse DEFINE FUNCTION fn::s inside
Attribute macro for implementing methods on both Foo and ArchivedFoo.
rkyv_impl Implement methods for Foo and ArchivedFoo in a single impl block. use rkyv::Archive; use rkyv_impl::*; use std::iter::Sum; #[derive(Archive
A HTML to node macro powered by rstml.
html-node A HTML to node macro powered by rstml. Features Text escaping Pretty-printing NEW: type-safe elements and attributes! (example) Example let
bevy_scriptum is a a plugin for Bevy that allows you to write some of your game logic in a scripting language
bevy_scriptum is a a plugin for Bevy that allows you to write some of your game logic in a scripting language. Currently, only Rhai is supported, but more languages may be added in the future.
A macro to generate constructor to instanicate structs from JsValue using duck-typing.
ducktor ducktor is a Rust crate that allows you to create types from wasm_bindgen::JsValue using duck typing. With ducktor, you can define a struct th
derive(Code) simplifies error handling by providing an easy-to-use enumeration of error codes
enum-code Introduction enum-code is a derive macro for enum types. This library generates code that associates error codes with error types. It can be
Effortlessly beautify your Spotify playlists with just a single, enchanting script 💫 🎵
harmonia harmonia, effortlessly beautify your Spotify playlists with just a single, enchanting script. 💫 🎵 HANDLE WITH LOVE: Since harmonia is bloss
Write simple proc-macros inline with other source code.
script-macro An experimental way to write simple proc-macros inline with other source code. Did you ever end up getting frustrated at the boilerplate
Animated app icons in your Dock that can run an arbitrary shell script when clicked.
Live App Icon for Mac Animated app icons in your Dock that can run an arbitrary shell script when clicked. Requirements macOS 13 (Ventura) or higher X
Rust Macros to automate the addition of Paths/Schemas to Utoipa crate, simulating Reflection during the compilation phase
utoipa_auto_discovery Rust Macros to automate the addition of Paths/Schemas to Utoipa crate, simulating Reflection during the compilation phase Crate
Compile-time lifetimes for comments.
todo_by Compile-time lifetimes for comments. To use this macro, add it to your dependencies via Cargo: cargo add todo_by Then, import and invoke the m
Ideas = Creations, a multi-language CMS(Content Management System) based on Rust Web stacks, with long-term upgrade and maintenance.
Ideas = Creations 中文 RustHub: Rust ideas yesterday, shining creations today! This repository holds source code used to run https://rusthub.org, it's
A small script in rust to get the cpu usage in %'s with a gradient color for the text
cpu_usage-polybar A small script in rust to get the cpu usage in %'s with a gradient color for the text To get it to work on your PC you will have to
Ask ChatGPT for a shell script, code, or anything, directly from your terminal 🤖🧠👨💻
ShellGPT Ask ChatGPT for a shell script, code, or anything, directly from your terminal 🤖 🧠 👨💻 Demo Install The binary is named gpt when installe
Fast KubeJS script manager. Includes version control and compatibility with KJSPKG packages.
CarbonJS A KubeJS script manager Features 🔥 Super fast ⚙️ Version control 📁 Constantly new scripts being added ✅ Easy to use 🧱 Compatibility with K
Simple node and rust script to achieve an easy to use bridge between rust and node.js
Node-Rust Bridge Simple rust and node.js script to achieve a bridge between them. Only 1 bridge can be initialized per rust program. But node.js can h
ChatGPT powered Rust proc macro that generates code at compile-time.
gpt-macro ChatGPT powered Rust proc macro that generates code at compile-time. Implemented Macros auto_impl!{} #[auto_test(...)] Usage Get ChatGPT API
Flexible deriving macro.
This library is a slightly more convenient version of derive for newtype pattern. = See also Deriving via Basic Usage #[derive(DerivingVia)] and then
A simple command-line calculator program writen with Rust.
Calculator.rs An simple command-line calculator program writen with Rust. Features Math functions support sin(1) = 0.84147098 Variable support a
A formatter for the leptos view! macro
leptosfmt A formatter for the leptos view! macro All notable changes are documented in: CHANGELOG.md Install cargo install leptosfmt or for trying out
Proc. macro to generate C-like `enum` tags.
Continuous Integration Documentation Crates.io #[derive(EnumTag)] This crate provides a proc. macro to derive the EnumTag trait for the given Rust enu
p5.js diagram within rustdoc
p5doc p5.js diagram within rustdoc Example This crate introduces a proc-macro #[p5doc::p5doc], which converts p5doc inline code in Markdown into a HTM
Simple rust asset handling derive macro for enums, and a proc-macro learning resource!
asset-derive Summary • Todos • Docs Summary Simple Rust asset loading derive macro for Enums, and a resource for learning proc-macros! Please feel fre
Execute KDL files!
kdl-script A Compiler for KDLScript, the KDL-based programming language! KDLScript is a "fake" scripting language that actually just exists to declare
Handy macro to generate C-FFI bindings to Rust for Haskell
hs-bindgen Handy macro to generate C-FFI bindings to Rust for Haskell. This library intended to work best in a project configured by cargo-cabal. N.B.
A standalone Luau script runner 🌙
Lune 🌙 A standalone Luau script runner 🚀 Use the ergonomics and readability of Luau for your shell scripts 🚀 ⚙️ Installation The preferred way of i
A convenient macro for building PathBufs in Rust.
pathbuf pathbuf is a simple crate which provides the pathbuf macro to conveniently construct the Rust PathBuf type. Example use pathbuf::pathbuf; use
Simple Rust derive-macro that simplifies integral enum creation
Integral enum A simple way to define integer-like enums. This macro implements bunch of traits that are usually implemented via looooong derive(..) at
A micro crate that simplifies a bit the use of the std macro thread_local!.
with-thread-local A micro crate that simplifies a bit the use of the std macro thread_local!. extern crate regex; use with_thread_local::with_thread_
Fix the simple rust script as shown in README.md
Rust Fix Me Steps Create a Github account. (If you already have one no issues) Star this repository. Fork this repository to your Github account. Clon
Library and proc macro to analyze memory usage of data structures in rust.
Allocative: memory profiler for Rust This crate implements a lightweight memory profiler which allows object traversal and memory size introspection.
Procedural macro to derive Serde serializer-deserializer for Prost
prost-serde-derive prost-serde-derive is a procedural macro to generate Serde serializers and deserializers for Prost-generated structs. Rationale Cur
Macro to customize the behavior of `?`
::custom-try Macro to customize the behavior of ? Examples use ::custom_try::custom_try; #[repr(transparent)] pub struct FfiResult { pub status_c
A bit like tee, a bit like script, but all with a fake tty. Lets you remote control and watch a process
teetty teetty is a wrapper binary to execute a command in a pty while providing remote control facilities. This allows logging the stdout of a process
An attribute macro to simplify writing simple command line applications.
fncli An attribute macro to simplify writing simple command line applications. Example #[fncli::cli] fn main(a: i32, b: i32) { println!("{}", a +
A command-line tool for patching shell scripts inspired by resholve
patsh A command-line tool for patching shell scripts inspired by resholve nix run github:nix-community/patsh -- -f script.sh Usage Usage: patsh [OPTIO
Fortipwn - Forti CVE-2022-40684 enumeration script built in Rust
fortipwn Forti CVE-2022-40684 enumeration script built in Rust. Uploads an SSH public key into authorized_keys, allowing an attacker to SSH into a ser
A domain-specific language for writing AIR constraints for Miden VM
AirScript A domain-specific language for expressing AIR constraints for STARKs, especially for STARK-based virtual machines like Miden VM. An in-depth
A proc macro for creating compile-time checked CSS class sets, in the style of classNames
semester Semester is a declarative CSS conditional class name joiner, in the style of React's classnames. It's intended for use in web frameworks (lik
A domain-specific language for writing AIR constraints for Miden VM
AirScript A domain specific language to write AIR constraints for the Miden VM. NOTE: This project is in the initial stages of development. Overview A
hashmap macro for creating hashmap from provided key/value pairs
HashMap Macro Creates a HashMap from provided key/value pairs. Usage use std::collections::HashMap; use hashmap_macro::hashmap; let m: HashMap&str,
A rust proc-macro which allows for reading and writing to remote objects through a generated enum
Remote-Obj A rust proc-macro which allows for reading and writing fields/variants of (possibly nested) remote objects by generating a single enum whic
Custom formatting for Rust.
custom-format This crate extends the standard formatting syntax with custom format specifiers, by providing custom formatting macros. It uses : (a spa
A little command-line script written in Rust to interface with Discord webhooks.
Rust Discord Webhook Agent This is a little "script" I wrote for practice with Rust and asynchronous operations within Rust. Getting started Clone thi
Macro for fast implementing serialize methods in serde::Serializer trait
impl_serialize! This library provides a simple procedural macro for fast implementing serialize methods in serde::Serializer trait. [dependencies] imp
⚡️ NFT Snapshot script written in Rust for blazingly fast speeds ⚡️
⚡️ NFT SNAPSHOT ⚡️ This project uses rust's blazingly fast performance along with the ethers-rs library to read blockchain state. Setup You will have
Proc macro implementation of #[naked]
#[naked] Documentation This crate provide a proc macro version of the #[naked] attribute which can be used on stable Rust. Example // The SYSV64 calli
An html macro for dioxus applications.
dioxus html macro This crate offers an html! like macro for dioxus applications. It expands to the equivalent rsx! macro call you would have made othe
A Rust crate to expressively declare bitfield-like structs
proc-bitfield A Rust crate to expressively declare bitfield-like structs, automatically ensuring their correctness at compile time and declaring acces
A Rust attribute macro that adds memoization to a function (rhymes with Mickey)
michie (sounds like Mickey) — an attribute macro that adds memoization to a function. Table of contents Features Non-features key_expr key_type store_
A small script to facilitate the making of .src.spm.tar.gz packges
SPM-Helper Rust version: Installation PYTHON: install python and git Clone the repo with this command: git clone -b Python https://github.com/Soviet-L
Macros to make writing proc-macro crates easy
proc-easy Macros to make writing proc-macro crates easy. This crate provides mainly macros and supporting types and traits to reduce amount of boilerp
A convenient on-screen message print macro for bevy.
Bevy Debug Text Overlay A proof of concept for adding a very convenient text overlay macro to the bevy game engine. This is derived from the code I us
Plugin for macro-, mini-quad (quads) to save data in simple local storage using Web Storage API in WASM and local file on a native platforms.
quad-storage This is the crate to save data in persistent local storage in miniquad/macroquad environment. In WASM the data persists even if tab or br
Make data-driven table rendering easy with Dioxus
Dioxus Table Make data-driven table rendering easy with Dioxus Installation Until the next release of Dioxus this requires Dioxus nightly from git. Th
Derive macro implementing 'From' for structs
derive-from-ext A derive macro that auto implements 'std::convert::From' for structs. The default behaviour is to create an instance of the structure
A Rust-based shell script to create a folder structure to use for a single class every semester. Mostly an excuse to use Rust.
A Rust Course Folder Shell Script PROJECT IN PROGRESS (Spring 2022) When completed, script will create a folder structure of the following schema: [ro
This library implements a type macro for a zero-sized type that is Serde deserializable only from one specific value.
Monostate This library implements a type macro for a zero-sized type that is Serde deserializable only from one specific value. [dependencies] monosta
Semantic find-and-replace using tree-sitter-based macro expansion
Semantic find-and-replace using tree-sitter-based macro expansion
Rust library to scan files and expand multi-file crates source code as a single tree
syn-file-expand This library allows you to load full source code of multi-file crates into a single syn::File. Features: Based on syn crate. Handling
Derive macro for encoding/decoding instructions and operands as bytecode
bytecoding Derive macro for encoding and decoding instructions and operands as bytecode. Documentation License Licensed under either of Apache License
Isn't it time to be a bit nicer to rustc?
politeness-macro Aren't we all too rude to computers? Isn't it time to bring a bit more politeness into our programming? Shouldn't we be a bit nicer t
A handy way to handle sh/bash cli parameters
Argc A handy way to handle sh/bash cli parameters. How Argc works To write a command line program with Argc, we only need to do two things: Describe t
No-nonsense input!(...) macro for Rust
No-nonsense input!(...) macro for Rust
Compile-time checked Builder pattern derive macro with zero-memory overhead
Compile-time checked Builder pattern derive macro with zero-memory overhead This is very much a work-in-progress. PRs welcome to bring this to product
A cross platform reloading image viewer combined with a command executor
Watchout A cross platform reloading image viewer combined with a command executor. Watchout will do any of the following: Run a command when any file
lispr is a Rust macro that tries to implement a small subset of LISPs syntax in Rust
lispr lispr is a Rust macro that tries to implement a small subset of LISPs syntax in Rust. It is neither especially beautiful or efficient since it i
Write a simple CLI script, that when given a 64-byte encoded string
Write a simple CLI script, that when given a 64-byte encoded string, it finds a suitable 4-byte prefix so that, a SHA256 hash of the prefix combined with the original string of bytes, has two last bytes as 0xca, 0xfe. Script should expect the original content of the string to be passed in hexadecimal format and should return two lines, first being the SHA256 string found and second 4-byte prefix used (in hexadecimal format).
Example of using nom parsers from a proc macro
Example of using nom parsers from a proc macro This project is organised as 3 crates: nom_macro is the main project, exposing the proc macro and the g
Submit sbatch jobs without the need to create a script
ssubmit Submit sbatch jobs without having to create a submission script Motivation Install Usage Motivation This project is motivated by the fact that
A procedural macro for defining nom combinators in simple DSL
A procedural macro for defining nom combinators in simple DSL
A procedural macro for configuring constant values across crates
toml-cfg Rough ideas: Crates can declare variables that can be overridden Anything const, e.g. usize, strings, etc. (Only) The "root crate" can overri
A simple script (in Rust lang) to create HTML from SVD
A simple script to create HTML from an SVD file This is a simple script written in Rust language to create a single HTML file from an SVD file. It's r
The [cain!] macro is a macro that rewrites sequential Rust branch statements into nested branches
Note! This crate is experimental and under development. It may include bugs that alter the behavior of your code in unexpected ways. You should review
Quick templates script for codeforces contests.
Codeforces Template Tool I created this tool to help me quickly set up codeforces contests/singular problems with templates. Tested for windows, shoul
Macro assembler for Rust
Macro Assembler This crate implement JSC/SpiderMonkey like macro assembler. Macro assembler purpose is to generate machine code for different platform
A Rust proc-macro crate which derives functions to compile and parse back enums and structs to and from a bytecode representation
Bytecode A simple way to derive bytecode for you Enums and Structs. What is this This is a crate that provides a proc macro which will derive bytecode
Attribute for defining `macro_rules!` macros with proper visibility and scoping
macro-vis This crate provides an attribute for defining macro_rules! macros that have proper visibility and scoping. The default scoping and publicity
Learn to write Rust procedural macros [Rust Latam conference, Montevideo Uruguay, March 2019]
Rust Latam: procedural macros workshop This repo contains a selection of projects designed to learn to write Rust procedural macros — Rust code that g
Nvm - Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions
Node Version Manager Table of Contents Intro About Installing and Updating Install & Update Script Additional Notes Troubleshooting on Linux Troublesh