awesome-repositories.com
Blog
MCP
awesome-repositories.com

Descoperă cele mai bune repository-uri open source cu căutare AI.

ExploreazăCăutări recomandateAlternative open-sourceSoftware self-hostedBlogHartă site
ProiectServer MCPDespreCum realizăm clasamentulPresă
LegalConfidențialitateTermeni
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·

20 repository-uri

Awesome GitHub RepositoriesGeneric Traits

Shared behaviors that operate on multiple types via generic parameters.

Distinct from Generic Types: Specifically targets traits that are themselves generic, as opposed to generic types.

Explore 20 awesome GitHub repositories matching programming languages & runtimes · Generic Traits. Refine with filters or upvote what's useful.

Awesome Generic Traits GitHub Repositories

Găsește cele mai bune repo-uri cu AI.Vom căuta cele mai potrivite repository-uri folosind AI.
  • sindresorhus/type-festAvatar sindresorhus

    sindresorhus/type-fest

    17,233Vezi pe GitHub↗

    type-fest is a library of reusable utility types for performing complex transformations and validations on objects, arrays, strings, and numeric ranges in TypeScript. It provides a collection of type definitions designed to handle advanced structural changes and constraints. The project distinguishes itself by offering specialized logic for string literal processing, such as casing transformations and pattern-based modifications, and type-level arithmetic for calculating numeric ranges and absolute values. It also includes utilities for enforcing deep immutability, ensuring union mutual exclu

    Provides a set of types for type-level arithmetic and numeric range validation.

    TypeScriptnpm-packagetypestypescript
    Vezi pe GitHub↗17,233
  • gcanti/fp-tsAvatar gcanti

    gcanti/fp-ts

    11,523Vezi pe GitHub↗

    fp-ts is a TypeScript library that brings pure functional programming patterns to the language through algebraic data types, type class abstractions, and composable combinators. It provides foundational data types like Option for optional values, Either for typed error handling, and Task for lazy asynchronous computations, all designed to make invalid states unrepresentable and side effects explicit. The library is built on category theory concepts, offering type classes such as Functor, Applicative, Monad, Semigroup, and Monoid with lawful instances for common data structures. The library di

    Simulates higher-kinded types in TypeScript to enable generic abstractions over type constructors.

    TypeScriptalgebraic-data-typesfunctional-programmingtypescript
    Vezi pe GitHub↗11,523
  • rust-lang/rust-by-exampleAvatar rust-lang

    rust-lang/rust-by-example

    8,026Vezi pe GitHub↗

    This project is an interactive programming education resource and tutorial designed for learning the Rust programming language and systems programming concepts. It provides a collection of runnable and editable code examples that serve as a practical reference for language syntax and implementation. The resource features an interactive code sandbox that allows users to execute and test code snippets in real time. It emphasizes the verification of technical accuracy by executing embedded code blocks during the build process to ensure all examples remain functional. The content covers a compre

    Explains how to define and implement traits that accept generic type parameters.

    Handlebars
    Vezi pe GitHub↗8,026
  • teivah/100-go-mistakesAvatar teivah

    teivah/100-go-mistakes

    7,915Vezi pe GitHub↗

    100 Go Mistakes is a reference book and code review companion that catalogues frequent Go programming anti-patterns and provides corrected implementations for each one. It covers a wide range of common pitfalls, from range loop variable capture and interface nil handling to error wrapping and map iteration randomization, helping developers recognize and avoid these issues in their own code. The project distinguishes itself by offering a structured, example-driven approach to learning idiomatic Go. It covers core design decisions such as when to use pointer versus value receivers, how to apply

    Shows how to extract common behaviors like sorting into generic functions.

    Gobookchinesedocumentation
    Vezi pe GitHub↗7,915
  • arktypeio/arktypeAvatar arktypeio

    arktypeio/arktype

    7,780Vezi pe GitHub↗

    Arktype is a TypeScript runtime validation library and schema orchestrator. It synchronizes TypeScript types with runtime data validation, allowing users to define type-safe schemas that ensure unknown data adheres to specific structures during application execution. The project distinguishes itself by using set-theory type analysis to determine intersections and subtype compatibility, alongside JIT-compiled validation functions for optimized performance. It supports advanced type modeling through branded type constraints, recursive alias resolution, and the ability to generate runtime valida

    Provides utility types to verify if a value is a number, integer, or specific constant like Infinity or NaN.

    TypeScriptjavascriptparsingruntime-typechecking
    Vezi pe GitHub↗7,780
  • millsp/ts-toolbeltAvatar millsp

    millsp/ts-toolbelt

    7,145Vezi pe GitHub↗

    ts-toolbelt is a collection of specialized utilities for manipulating and validating TypeScript types. It provides a toolkit for performing complex transformations on objects, unions, and functions to enforce strict data consistency at compile time. The library features dedicated transformers for function types, including utilities for currying, composition, and signature extraction. It also includes an object type manipulator for deep merging, patching, and reshaping complex structures. The capability surface extends to literal string processing, type-level arithmetic, and tuple operations.

    Provides helper types for performing mathematical addition and validation on numeric types.

    TypeScriptdynamic-typessafetytype-checking
    Vezi pe GitHub↗7,145
  • louthy/language-extAvatar louthy

    louthy/language-ext

    7,057Vezi pe GitHub↗

    language-ext is a functional programming framework for C# that provides a suite of immutable data structures and monadic types. It enables the implementation of pure functional programming patterns, utilizing containers to manage side effects, optional values, and error handling. The library is distinguished by its advanced concurrency and state management tools, including a software transactional memory system and lock-free atomic references. It also provides specialized utilities for distributed systems, such as vector clocks for causality tracking and deterministic data conflict resolution

    Simulates higher-kinded generics using traits to define common behaviors across different type constructors.

    C#
    Vezi pe GitHub↗7,057
  • rust-lang/rfcsAvatar rust-lang

    rust-lang/rfcs

    6,406Vezi pe GitHub↗

    The Rust RFCs repository is the formal home for the Rust language evolution process, housing the structured design documents and community review mechanisms that govern changes to the Rust programming language, its compiler, and its standard library. It defines the complete lifecycle for proposing, discussing, and implementing substantial changes through RFC documents, from initial submission and community feedback through final comment periods and sub-team sign-offs. The repository codifies the governance and collaboration processes that shape Rust's development, including mechanisms for com

    Defines the core numeric trait hierarchy used for generic programming over primitive types in Rust.

    Markdownrfcrfc-processrust
    Vezi pe GitHub↗6,406
  • image-rs/imageAvatar image-rs

    image-rs/image

    5,802Vezi pe GitHub↗

    Aceasta este o bibliotecă Rust pentru procesarea imaginilor, concepută pentru codificarea și decodificarea diverselor formate de fișiere imagine și manipularea pixelilor. Oferă un set de instrumente pentru manipularea imaginilor digitale și o serie de codecuri pentru citirea datelor din fișiere și scrierea bufferelor de memorie în formate standard. Biblioteca dispune de un pipeline de procesare scris în Rust pur pentru a asigura siguranța memoriei și compatibilitatea cross-platform. Include un sistem de tip „pluggable hook” pentru înregistrarea dinamică a formatelor, permițând crate-urilor externe să înregistreze decodoare și encodoare personalizate la runtime. Suprafața de capabilități acoperă manipularea geometrică pentru redimensionare, decupare și rotire, precum și gestionarea culorilor pentru conversii de spațiu și generarea de gradienți. Include instrumente pentru extragerea și încorporarea metadatelor precum profilurile Exif și ICC, și oferă funcții pentru aplicarea filtrelor vizuale și ajustări de aspect. Asigurarea calității este gestionată prin fuzz testing, utilizând generarea de input-uri aleatorii pentru a identifica vulnerabilități în parsarea fișierelor binare.

    Defines common behaviors for image types and pixel formats using Rust traits to enable generic processing logic.

    Rustdecoding-imagespixelrust
    Vezi pe GitHub↗5,802
  • kaisery/trpl-zh-cnAvatar KaiserY

    KaiserY/trpl-zh-cn

    5,501Vezi pe GitHub↗

    Acest proiect este o resursă educațională localizată pentru învățarea limbajului de programare Rust, oferind un ghid cuprinzător și specificații tehnice traduse în chineză simplificată. Servește ca instrument de instruire pentru studierea idiomurilor limbajului, gestionarea memoriei și sistemele de tipuri. Repository-ul se concentrează pe localizarea documentației software, convertind ghidurile oficiale în chineză simplificată pentru a crește accesibilitatea pentru vorbitorii non-nativi de engleză. Utilizează un sistem bazat pe markdown pentru a organiza conținutul și suportă exportul în formate multiple către HTML static, PDF și EPUB pentru vizualizare web și offline. Conținutul acoperă o gamă largă de domenii tehnice Rust, inclusiv primitive de gestionare a memoriei precum ownership și borrowing, design avansat de limbaj implicând traits și generics, și strategii cuprinzătoare de gestionare a erorilor. De asemenea, detaliază fundamentele programării, modelarea datelor și utilizarea instrumentelor de productivitate pentru dezvoltatori pentru gestionarea build-urilor și a dependențelor.

    Explains how to specify sets of methods that different types must implement to enable generic code restrictions.

    Markdownpdfrust-booktypst
    Vezi pe GitHub↗5,501
  • typelevel/catsAvatar typelevel

    typelevel/cats

    5,447Vezi pe GitHub↗

    Cats este o bibliotecă de programare funcțională și type class pentru Scala, concepută pentru a implementa tipare algebrice și abstracțiuni funcționale. Aceasta oferă un set standardizat de interfețe și un toolkit modular de wrapper-e și containere funcționale pentru a permite polimorfismul ad-hoc și programarea generică între tipuri disparate. Proiectul servește drept standard de abstracție funcțională, oferind o suită de monad transformer pentru a compune contexte imbricate cu efecte și a gestiona multiple efecte secundare computaționale într-un singur pipeline. De asemenea, permite construirea de limbaje specifice domeniului (DSL) încorporate prin reprezentarea logicii programului ca structuri de date care sunt interpretate separat de definițiile lor. Biblioteca acoperă domenii largi de capabilități, inclusiv manipularea algebrică a datelor pentru combinarea și reducerea valorilor, gestionarea stării cu tipizare sigură și gestionarea funcțională a erorilor pentru a formaliza acumularea și recuperarea acestora. Oferă, de asemenea, instrumente pentru gestionarea computațiilor cu efecte și extinderea tipurilor de colecții standard cu capabilități funcționale. Biblioteca include mecanisme pentru validarea legilor algebrice, asigurând că instanțele de type class respectă proprietățile matematice.

    Defines type constructors capable of taking other type constructors as parameters for generic functional containers.

    Scala
    Vezi pe GitHub↗5,447
  • dimforge/nalgebraAvatar dimforge

    dimforge/nalgebra

    4,745Vezi pe GitHub↗

    nalgebra este o bibliotecă de algebră liniară pentru Rust care oferă operații cu matrice și vectori cu suport pentru dimensiuni atât la compilare, cât și la runtime. Funcționează ca o bibliotecă de analiză numerică și o bibliotecă de matrice rare (sparse matrix), oferind un framework matematic capabil să ruleze în medii embedded și WebAssembly fără a necesita biblioteca standard Rust. Proiectul se distinge ca o bibliotecă de transformări geometrice, utilizând coordonate omogene, cuaternioni și izometrii pentru a gestiona rotații 3D, translații și proiecții. Implementează o varietate de descompuneri de matrice — inclusiv LU, QR, Cholesky, SVD și eigendecomposition — pentru a rezolva sisteme liniare și a analiza matrice. Biblioteca acoperă arii largi de capabilități, inclusiv calcul geometric pentru transformări spațiale, utilitare de computer graphics pentru compunerea matricelor de proiecție și exportul datelor pentru shadere, precum și gestionarea specializată a matricelor rare folosind stocarea comprimată pe rânduri și coloane. Oferă, de asemenea, instrumente de gestionare a datelor pentru inițializarea matricelor, redimensionare și parsarea fișierelor Matrix Market.

    Uses generic traits to provide a consistent interface for different matrix decompositions and linear solvers.

    Rustalgebralinear-algebramatrix
    Vezi pe GitHub↗4,745
  • scalaz/scalazAvatar scalaz

    scalaz/scalaz

    4,667Vezi pe GitHub↗

    Scalaz is a functional programming library for Scala that provides a collection of purely functional data structures and type classes. It functions as a framework for organizing functional behaviors into hierarchies to enable generic programming and type-safe transformations. The library includes tools for composing and managing nested functional effects within a single type stack through a monad transformer system. It provides data structures for representing and combining input, output, and optionality effects. The project covers a broad surface of functional abstractions, including the im

    Implements native higher-kinded type definitions to create generic interfaces for containers and effects.

    Scala
    Vezi pe GitHub↗4,667
  • dry-python/returnsAvatar dry-python

    dry-python/returns

    4,310Vezi pe GitHub↗

    Returns is a functional programming library for Python that provides type-safe containers for managing state, error handling, and optionality. It serves as a monadic container library and a type-safe error handling framework, replacing traditional try-catch blocks and null checks with Result and Optional containers to treat exceptions as data. The project is distinguished by its use of a specialized Mypy static analysis plugin to validate functional pipelines and emulate higher kinded types. It provides mechanisms for isolating side effects through IO containers and offers a framework for typ

    Simulates higher-kinded types to allow generic functions to operate across various container types.

    Python
    Vezi pe GitHub↗4,310
  • rust-ndarray/ndarrayAvatar rust-ndarray

    rust-ndarray/ndarray

    4,290Vezi pe GitHub↗

    ndarray is a multidimensional array library for Rust that serves as a linear algebra framework and scientific computing tool. It provides the core infrastructure for creating and manipulating n-dimensional arrays, functioning as both a parallel array processor and a toolkit for numerical data analysis. The library distinguishes itself by providing efficient slicing and memory views, allowing for data sharing without copying. It leverages optimized backend math libraries for high-speed matrix multiplication and distributes heavy mathematical iterations across multiple CPU threads to accelerate

    Uses generics and numeric traits to apply mathematical operations across different numeric types and dimensions.

    Rust
    Vezi pe GitHub↗4,290
  • redis-rs/redis-rsAvatar redis-rs

    redis-rs/redis-rs

    4,225Vezi pe GitHub↗

    redis-rs este o bibliotecă client pentru interacțiunea cu Redis folosind interfețe Rust sincrone și asincrone. Servește ca driver pentru caching de date, gestionarea sesiunilor și stocarea generală a datelor. Biblioteca oferă suport specializat pentru mediile Redis Cluster, inclusiv rutarea nodurilor conștientă de cluster și gestionarea distribuită a datelor. Se distinge prin deserializarea zero-copy pentru a minimiza alocările de memorie și un model de conexiune multiplexat care permite mai multor cereri concurente să partajeze o singură conexiune de rețea. Proiectul acoperă o suprafață largă de capabilități, inclusiv stocarea documentelor JSON, pipelining-ul comenzilor cu gestionarea erorilor parțiale și pooling-ul conexiunilor. Conectivitatea securizată este asigurată prin criptare TLS și autentificare bazată pe token prin Azure Entra ID. Dezvoltarea este susținută de simularea conexiunilor (mocking) pentru testarea unitară și de integrare.

    Uses generic conversion traits to map raw Redis responses into strongly typed Rust values.

    Rust
    Vezi pe GitHub↗4,225
  • petgraph/petgraphAvatar petgraph

    petgraph/petgraph

    3,938Vezi pe GitHub↗

    petgraph este o bibliotecă de structuri de date de tip graf pentru limbajul de programare Rust. Oferă o colecție de instrumente pentru reprezentarea și manipularea grafurilor, funcționând ca un instrument de analiză a rețelelor și o suită cuprinzătoare de algoritmi pentru grafuri. Biblioteca se integrează cu Graphviz DOT pentru importul, exportul și parsarea datelor de graf pentru a facilita vizualizarea. Se distinge prin oferirea de capabilități specializate de analiză a rețelelor, cum ar fi detectarea clicurilor, a muchiilor de tip bridge, a punctelor de articulare și a izomorfismelor de subgrafuri. Suprafața sa computațională acoperă o gamă largă de algoritmi, inclusiv calcule pentru cel mai scurt drum, analiza fluxului în rețea, calculul arborelui de acoperire minim și sortarea topologică a nodurilor. Biblioteca suportă, de asemenea, generarea de grafuri sintetice pentru simulare și testare, precum și filtrarea componentelor grafului pentru a crea vizualizări virtuale ale datelor. Implementarea utilizează referențierea nodurilor bazată pe index și reprezentări de tip listă de adiacență pentru a gestiona conectivitatea grafului și optimizarea memoriei.

    Defines common graph behaviors via generic interfaces to allow different internal storage layouts.

    Rustgraph-algorithmsrust
    Vezi pe GitHub↗3,938
  • nrc/r4cpppAvatar nrc

    nrc/r4cppp

    3,857Vezi pe GitHub↗

    This project is an educational resource and technical reference library designed to assist experienced systems engineers in transitioning from C++ to Rust. It provides a structured curriculum that maps familiar programming patterns, syntax, and memory management techniques to their counterparts in the Rust ecosystem. The platform focuses on bridging the mental model gap between manual memory management and Rust’s ownership and borrowing rules. By aligning complex type systems, trait-based polymorphism, and template metaprogramming, it clarifies how to achieve performance parity through zero-c

    Clarifies how trait-based polymorphism and generic types in Rust serve as equivalents to C++ template metaprogramming.

    Rust
    Vezi pe GitHub↗3,857
  • raml-org/raml-specAvatar raml-org

    raml-org/raml-spec

    3,850Vezi pe GitHub↗

    RAML is a declarative YAML-based specification language used for modeling RESTful interfaces and data structures. It functions as a contract-first API framework and modeling standard, establishing a formal agreement for service communication and a single source of truth before implementation begins. The specification enables the automation of functional mock servers and the generation of language-specific client SDKs directly from the definition files. It supports a modular approach to API design through the use of external libraries, overlays for extending contracts, and reusable traits and

    Applies reusable sets of methods and headers to multiple endpoints to ensure consistency across similar API resources.

    Vezi pe GitHub↗3,850
  • foonathan/type_safeAvatar foonathan

    foonathan/type_safe

    1,641Vezi pe GitHub↗

    This library is a collection of zero-overhead C++ abstractions designed to replace primitive types with strict wrappers. By leveraging template metaprogramming, it enforces compile-time type safety and validates data integrity, ensuring that logic errors are caught during the build process rather than at runtime. The project distinguishes itself by providing a zero-cost abstraction layer that maps high-level type safety wrappers directly to machine instructions. It utilizes static type identity enforcement to treat logically distinct data as incompatible types, even when they share the same u

    Provides strict numeric type enforcement to prevent accidental data loss or invalid arithmetic.

    C++c-plus-plustype-safety
    Vezi pe GitHub↗1,641
  1. Home
  2. Programming Languages & Runtimes
  3. Generic Types
  4. Generic Traits

Explorează sub-etichetele

  • Associated ItemsDefines types, constants, lifetimes, and functions within a trait to group related items into a single package. **Distinct from Generic Traits:** Distinct from Generic Traits: focuses on the definition of associated items (types, constants, lifetimes, functions) within traits, not traits that are themselves generic.
  • Behavior Extractions with GenericsExtracts common behaviors like sorting into generic functions that work across different types sharing the same methods. **Distinct from Generic Traits:** Distinct from Generic Traits: focuses on extracting shared behaviors into generic functions, not defining generic traits themselves.
  • Data Type ConversionsGeneric traits used to map raw data store bytes to high-level language types. **Distinct from Generic Traits:** Specializes generic traits specifically for database-to-language type mapping.
  • Higher-Kinded Type Simulation2 sub-tag-uriTechniques for simulating higher-kinded types in languages that do not natively support them. **Distinct from Generic Traits:** Focuses on the simulation of higher-kinded generics (like Functor/Monad traits) specifically, rather than standard generic traits.
  • Image Processing TraitsRust traits that define shared behaviors for different image types and pixel formats. **Distinct from Generic Traits:** Specializes generic traits for image-specific operations and pixel-level logic.
  • Numeric Type Traits2 sub-tag-uriTraits like Int, UnsignedInt, Signed, Float, and FloatMath for generic programming over primitive numeric types. **Distinct from Generic Traits:** Distinct from Generic Traits: specifically defines traits for numeric types, not generic traits in general.
  • Trait-Based Polymorphism3 sub-tag-uriDefining shared behavior across different types using traits to enable generic constraints. **Distinct from Generic Traits:** Focuses on the general concept of shared behavior rather than traits that are themselves generic