Crate willbe

source ·
Expand description

§Module:: willbe

experimental rust-status docs.rs discord

Utility to publish multi-crate and multi-workspace environments and maintain their consistency.

§Purpose

  1. Multi-Workspace Consistency: In a project setup involving multiple workspaces with shared dependencies, willbe maintains consistency. It ensures all workspaces are updated with compatible dependency versions.

  2. Publishing Multi-Crate Projects: If your project structure includes multiple crates that need simultaneous publishing, willbe manages the process seamlessly. It ensures the crates are published in the right order while staying in version sync.

  3. Dependency Analysis: willbe can perform a thorough analysis of your project’s dependencies, providing a detailed highlight of inconsistencies or areas that need attention.

  4. Test Execution With Varied Configurations: willbe can execute tests with varying configurations, such as different combinations of crate features. This assists in ensuring comprehensive coverage of test scenarios.

  5. Generate Health Table: Quickly visualize important project metrics like build status for each crate, creating a single, easy-to-read table.

  6. Automating CI/CD Workflow Generation: Automatically generate a series of CI/CD operations suitable for the task at hand to enhance productivity and improve the development process.

§To install

cargo install willbe
will .

§Try out from the repository

git clone https://github.com/Wandalen/wTools
cd wTools/module/move/willbe
cargo install --path .
will .

Modules§

  • Describes functions that can be called from an interface.
  • Attributes analyzys and manipulation.
  • Attribute’s properties. Reuse them to define how to parse properties of an attribute.
  • Interaction module with the cargo utilities.
  • Rust toolchain channel: stable/nightly.
  • Source code.
  • Function and structures to work with collections.
  • Describes CLI commands.
  • Type-based assigning.
  • Determine kind of a container.
  • Compile-time tools.
  • Dependency of a package.
  • Macro helpers around derive macro and structure syn::DeriveInput.
  • Macro helpers.
  • Compare two crate archives and create a difference report.
  • Vec macros
  • Entities of which spaces consists of.
  • Attributes analyzys and manipulation.
  • Errors handling.
  • Exposed namespace of the module.
  • Operation with features
  • Paths and files.
  • This module provides utilities to handle and manipulate generic arguments using the syn crate. It includes traits and functions for transforming, merging, and managing generic parameters within procedural macros, enabling seamless syntactic analysis and code generation.
  • Functions and structures to handle and manipulate generic parameters using the syn crate. It’s designed to support macro-driven code generation by simplifying, merging, extracting, and decomposing syn::Generics.
  • Git.
  • Tools for working with dependencies graph.
  • Http requests.
  • This module provides various utilities and namespaces for working with syn::Item, specifically focusing on ensuring syntactical correctness and managing different visibility levels within the code. It includes functions to manipulate the structure of items, handle different kinds of fields, and provide a structured approach to organizing the codebase into different access levels.
  • Parse structures, like struct { a : i32 }.
  • Iterating things.
  • Keywords
  • Work with paths.
  • To manipulate manifest data.
  • Tait to getn name of an Item.
  • Rust build optimization: debug/release
  • Orphan namespace of the module.
  • Own namespace of the module.
  • Offers capabilities for package management, facilitating the handling and organization of packages.
  • Md’s extension for workspace.
  • Provides a set of functionalities for handling and manipulating packages.
  • Handles operations related to packed Rust crates
  • Work with paths.
  • Responsible for generating marker PhantomData fields to avoid the rule requiring the usage of all generic parameters in a struct. This is often necessary to ensure that Rust’s type system correctly tracks the ownership and lifetimes of these parameters without needing them to be explicitly used in the struct’s fields.
  • Prelude to use essentials: use my_module::prelude::*.
  • Progress bar staff.
  • Publish.
  • Structures and functions for handling syn::punctuated::Punctuated collections.
  • Quantifiers like Pair and Many.
  • The parse function parses an input string into a HashMap where the keys are String and the values are of type Value.
  • Repository tools.
  • Parse structures, like struct { a : i32 }.
  • Facade for preatytable crate.
  • Traits and structs for templates.
  • Operations with tests
  • Attributes analyzys and manipulation.
  • Genera-purpose tools which might be moved out one day.
  • Tools for printing a tree
  • Advanced syntax elements.
  • Typed parsing.
  • Tools for parsing and extracting information from url.
  • Provides an opportunity to work with versions.
  • It features the ability to interact with workspaces, manage their participants, and other functionalities.
  • Workspace’ graph.
  • Md’s extension for workspace.
  • Packages of workspace.

Macros§

  • A type-macro that expands to the name of the Rust type representation of a given token.
  • Creates a BTreeMap from a list of key-value pairs.
  • Parse a set of curly braces and expose their content to subsequent parsers.
  • Parse a set of square brackets and expose their content to subsequent parsers.
  • Creates a BTreeSet from a list of elements.
  • Macro for diagnostics purpose to diagnose source code behind it and export it into a string.
  • Macro for diagnostics purpose to print both syntax tree and source code behind it without syntax tree.
  • Macro to export source code behind a syntax tree into a string.
  • Define a type that supports parsing and printing a given identifier as if it were a keyword.
  • Define a type that supports parsing and printing a multi-character symbol as if it were a punctuation token.
  • Macro asserts that two expressions are identical to each other. Unlike std::assert_eq it is removed from a release build.
  • Macro asserts that two expressions are identical to each other. Unlike std::assert_eq it is removed from a release build. Alias of debug_assert_id.
  • Macro asserts that two expressions are not identical to each other. Unlike std::assert_eq it is removed from a release build.
  • Macro asserts that two expressions are not identical to each other. Unlike std::assert_eq it is removed from a release build.
  • Creates a VecDeque from a list of elements.
  • Creates a Vec from a list of elements.
  • Macro to generate an error descriptor.
  • Formatting macro for constructing Idents.
  • Creates a HashMap from a list of key-value pairs.
  • Creates a HashSet from a list of elements.
  • Creates a BTreeMap from a list of key-value pairs.
  • Creates a BTreeSet from a list of elements.
  • Creates a Vec from a list of elements.
  • Creates a HashMap from a list of key-value pairs.
  • Creates a HashSet from a list of elements.
  • Creates a LinkedList from a llist of elements.
  • Creates a Vec from a list of elements.
  • Creates a VecDeque from a list of elements.
  • Creates a LinkedList from a llist of elements.
  • Protocol of modularity unifying interface of a module and introducing layers.
  • Parse a set of parentheses and expose their content to subsequent parsers.
  • Parse the input TokenStream of a macro, triggering a compile error if the tokens fail to parse.
  • Quasi-quotation macro that accepts input like the quote! macro but uses type inference to figure out a return type for those tokens.
  • This macro is parse_quote! + quote_spanned!.
  • Quasi-quotation macro that accepts input like the quote! macro but uses type inference to figure out a return type for those tokens.
  • This macro is parse_quote! + quote_spanned!.
  • The whole point.
  • The whole point.
  • Same as quote!, but applies a given span to all tokens originating within the macro invocation.
  • Macro to return an Err( error ) generating error descriptor.
  • Macro to generate syn error either with span of a syntax tree element or with default one proc_macro2::Span::call_site().
  • Macro to generate syn error either with span of a syntax tree element or with default one proc_macro2::Span::call_site().
  • Macro for diagnostics purpose to export both syntax tree and source code behind it into a string.
  • Macro for diagnostics purpose to print both syntax tree and source code behind it with syntax tree.

Structs§

Enums§

  • Dependencies can come in three kinds
  • A type returned by the diff_with function.
  • The enum Either with variants Left and Right is a general purpose sum type with two cases.
  • Value that either holds a single A or B, or both.
  • An enum used for controlling the execution of fold_while.
  • MinMaxResult is an enum returned by minmax.
  • Represents different types of packages in a Cargo workspace.
  • PathError enum represents errors when creating a CrateDir object.
  • The first component of the value yielded by WithPosition. Indicates the position of this element in the iterator results.
  • Represents errors related to workspace operations.

Traits§

  • A trait for converting an object to its code representation.
  • Marker saying how to parse several elements of such type in a row.
  • Provides a generic interface for setting a component of a certain type on an object.
  • The AssignWithType trait provides a mechanism to set a component on an object, utilizing the type information explicitly. This trait extends the functionality of Assign by allowing implementers to specify the component’s type at the method call site, enhancing expressiveness in code that manipulates object states.
  • Trait for components of a structure aggregating attributes that can be constructed from a meta attribute.
  • Trait for properties of an attribute component that can be identified by a keyword.
  • Provides an extension method for hash maps to facilitate the use of the builder pattern.
  • Provides an extension method for binary tree sets to facilitate the use of the builder pattern.
  • Provides an extension method for binary heaps to facilitate the use of the builder pattern.
  • A trait for retrieving an iterator over items of a source file.
  • Represents a collection by defining the types of entries and values it handles.
  • Provides functionality to add individual entries to a collection.
  • Defines the capability to replace all entries in a collection with a new set of entries.
  • Provides a mechanism for transforming a value back into a collection-specific entry format.
  • Maps a type of entity to its corresponding former definition. This trait provides a linkage between the entity and its definition, allowing the formation logic to understand what definition to apply during the formation process.
  • Provides a mapping between a type of entity and its associated formation type definitions.
  • Maps a type of entity to its corresponding former. This trait binds an entity type to a specific former, facilitating the use of custom formers in complex formation scenarios.
  • Maps a type of entity to its storage type. This trait defines what storage structure is used to hold the interim state of an entity during its formation.
  • A trait that defines a method for retrieving an iterator over entries.
  • Facilitates the conversion of collection entries to their corresponding value representations.
  • This trait allows adding extra context or information to an error, creating a tuple of the additional context and the original error. This is particularly useful for error handling when you want to include more details in the error without losing the original error value.
  • Error is a trait representing the basic expectations for error values, i.e., values of type E in Result<T, E>.
  • A trait for initiating a structured subforming process with contextual and intermediary storage linkage.
  • Expands on FormerDefinitionTypes by incorporating an ending mechanism for the formation process. This trait connects the formation types with a specific endpoint, defining how the formation process concludes, including any necessary transformations or validations.
  • Defines the fundamental components involved in the formation of an entity. This trait specifies the types of storage, the formed entity, and the context used during the formation process.
  • Provides a mechanism for mutating the context and storage just before the forming process is completed.
  • Defines a handler for the end of a subforming process, enabling the return of the original context.
  • Provides an extension method for hash maps to facilitate the use of the builder pattern.
  • Provides an extension method for HashSet to facilitate the use of the builder pattern.
  • Convert it into canonical interval.
  • Extension of iterator.
  • Trait that encapsulates a clonable iterator with specific characteristics, tailored for use with the syn crate.
  • Interval adapter. Interface to interval-like structures.
  • An Iterator blanket implementation that provides extra adaptors and methods.
  • Provides an extension method for lists to facilitate the use of the builder pattern.
  • Trait to get name of an syntax element.
  • Interval adapter. Interface to interval-like structures.
  • Extension trait to provide a method for setting a component on an Option<Self> if the Option is currently None. If the Option is Some, the method will delegate to the Assign trait’s assign method.
  • An iterator that allows peeking at an element before deciding to accept it.
  • A trait that defines a method for retrieving an iterator over source files.
  • A trait that can provide the Span of the complete contents of a syntax tree node.
  • Defines the storage interface for entities being constructed using a forming pattern.
  • Provides a mechanism to finalize the forming process by converting storage into its final formed state.
  • A trait to perform a transitive try_from conversion.
  • A trait to perform a transitive try_into conversion.
  • Facilitates the conversion of values back into entries for specific collection types.
  • Provides an extension method for vector deques to facilitate the use of the builder pattern.
  • Provides an extension method for vectors to facilitate the use of the builder pattern.
  • Trait that encapsulates an iterator with specific characteristics and implemetning CloneDyn.

Functions§

  • List packages.
  • Generate workflows for modules in .github/workflows directory.
  • Adds indentation and optional prefix/postfix to each line of the given string.
  • Check is string a keyword.
  • Formats a debugging report for code transformation processes, detailing both the original and generated code for easy comparison and review.
  • Prints a debugging report for a pair of token streams to the standard output.
  • Takes the command line arguments and perform associated function(s). If no arguments are provided, the function identifies this as an ambiguous state and prompts the user with a help message, suggesting possible commands they might want to execute. It then terminates the program with an exit code of 1 to indicate an error due to the lack of input.
  • run tests in specified crate run tests in specified crate
  • List packages.
  • Creates workspace template

Type Aliases§

  • Provides a streamlined builder interface for constructing hash map-like collections.
  • Provides a streamlined builder interface for constructing binary tree set-like collections.
  • Provides a streamlined builder interface for constructing binary heap-like collections.
  • Type alias for boxed _IterTrait trait objects.
  • Provides a streamlined builder interface for constructing hash map-like collections.
  • Provides a concise alias for CollectionFormer configured specifically for HashSet-like collections.
  • Provides a streamlined builder interface for constructing list-like collections.
  • Input to a Syn parser function.
  • A type alias for a Result that contains an error which is a tuple of a report and an original error.
  • Provides a streamlined builder interface for constructing vector deque-like collections.
  • Provides a streamlined builder interface for constructing vector-like collections.

Derive Macros§

  • Derives the Assign trait for struct fields, allowing each field to be set with a value that can be converted into the field’s type.
  • Derive macro for generating a Former struct, applying a Builder Pattern to the annotated struct.