{"id":24692989,"url":"https://github.com/dusrdev/sharpify","last_synced_at":"2025-04-04T12:08:42.004Z","repository":{"id":153003264,"uuid":"624361608","full_name":"dusrdev/Sharpify","owner":"dusrdev","description":"A collection of high performance language extensions for C#","archived":false,"fork":false,"pushed_at":"2025-01-16T12:29:59.000Z","size":2074,"stargazers_count":95,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"stable","last_synced_at":"2025-03-28T17:49:02.300Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dusrdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-06T09:49:03.000Z","updated_at":"2025-03-25T17:35:25.000Z","dependencies_parsed_at":"2024-04-16T16:59:57.546Z","dependency_job_id":"3a2ec383-1c28-48f3-bc88-a2bae3a264b4","html_url":"https://github.com/dusrdev/Sharpify","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dusrdev%2FSharpify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dusrdev%2FSharpify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dusrdev%2FSharpify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dusrdev%2FSharpify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dusrdev","download_url":"https://codeload.github.com/dusrdev/Sharpify/tar.gz/refs/heads/stable","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247174423,"owners_count":20896078,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-26T20:18:12.481Z","updated_at":"2025-04-04T12:08:41.984Z","avatar_url":"https://github.com/dusrdev.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sharpify\n\nA collection of high performance language extensions for C#, fully compatible with NativeAOT\n\n## ⬇ Installation\n\n[![Nuget](https://img.shields.io/nuget/dt/Sharpify?label=Sharpify%20Nuget%20Downloads)](https://www.nuget.org/packages/Sharpify/)\n\u003e dotnet add package Sharpify\n\n[![Nuget](https://img.shields.io/nuget/dt/Sharpify.Data?label=Sharpify.Data%20Nuget%20Downloads)](https://www.nuget.org/packages/Sharpify.Data/)\n\u003e dotnet add package Sharpify.Data\n\n[![Nuget](https://img.shields.io/nuget/dt/Sharpify.CommandLineInterface?label=Sharpify.CommandLineInterface%20Nuget%20Downloads)](https://www.nuget.org/packages/Sharpify.CommandLineInterface/)\n\u003e dotnet add package Sharpify.CommandLineInterface\n\n## Sharpify - Base package\n\n`Sharpify` is a package mainly intended to extend the core language using high performance implementations. The other 2 packages uses `Sharpify` as a dependency. But its core features can be useful in a variety of applications by themselves.\n\n* ⚡ Fully Native AOT compatible\n* 🤷 `Either\u003cT0, T1\u003e` - Discriminated union object that forces handling of both cases\n* 🦾 Flexible `Result` type that can encapsulate any other type and adds a massage options and a success or failure status. Flexible as it doesn't require any special handling to use (unlike `Either`)\n* 🏄 Wrapper extensions that simplify use of common functions and advanced features from the `CollectionsMarshal` class\n* `Routine` and `AsyncRoutine` bring the user easily usable and configurable interval based background job execution.\n* `PersistentDictionary` and derived types are super lightweight and efficient serializable dictionaries that are thread-safe and work amazingly for things like configuration files.\n* `SortedList\u003cT\u003e` bridges the performance of `List` and order assurance of `SortedSet`\n* `PersistentDictionary` and variants provide all simple database needs, with perfected performance and optimized concurrency.\n* `SerializableObject` and the `Monitored` variant allow persisting an object to the disk, and elegantly synchronizing modifications.\n* 💿 `StringBuffer` enables zero allocation, easy to use appending buffer for creation of strings in hot paths.\n* `RentedBufferWriter{T}` is an allocation friendly alternative to `ArrayBufferWriter{T}` for hot paths.\n* A 🚣🏻 boat load of extension functions for all common types, bridging ease of use and performance.\n* `Utils.DateAndTime`, `Utils.Env`, `Utils.Math`, `Utils.Strings` and `Utils.Unsafe` provide uncanny convenience at maximal performance.\n* 🧵 `ThreadSafe\u003cT\u003e` makes any variable type thread-safe\n* 🔐 `AesProvider` provides access to industry leading AES-128 encryption with virtually no setup\n* 🏋️ High performance optimized alternatives to core language extensions\n* 🎁 More added features that are not present in the core language\n* ❗ Static inner exception throwers guide the JIT to further optimize the code during runtime.\n* 🫴 Focus on giving the user complete control by using flexible and common types, and resulting types that can be further used and just viewed.\n\nFor more information check [inner directory](src/Sharpify/README.md).\n\n## Sharpify.Data\n\n`Sharpify.Data` is an extension package, that should be installed on-top of `Sharpify` and adds a high performance persistent key-value-pair database, utilizing [MemoryPack](https://github.com/Cysharp/MemoryPack). The database support multiple types in the same file, 2 stage AES encryption (for whole file and per-key). Filtering by type, Single or Array value per key, and more...\n\n* `Database` is the base type for the data base, it is key-value-pair based local database - saved on disk.\n* `IDatabaseFilter\u003cT\u003e` is an interface which acts as an alternative to `DbContext` and provides enhanced type safety for contexts.\n* `MemoryPackDatabaseFilter\u003cT\u003e` is an implementation which focuses on types that implement `IMemoryPackable\u003cT\u003e` from `MemoryPack`.\n* `FlexibleDatabaseFilter\u003cT\u003e` is an implementation focusing on types which need custom serialization logic. To use this, you type `T` will need to implement `IFilterable\u003cT\u003e` which has methods for serialization and deserialization of single `T` and `T[]`. If you can choose to implement only one of the two.\n* **Concurrency** - `Database` uses highly performant synchronous concurrency models and is completely thread-safe.\n* **Disk Usage** - `Database` tracks inner changes and skips serialization if no changes occurred, enabling usage of periodic serialization without resource waste.\n* **GC Optimization** - `Database` heavily uses pooling for encryption, decryption, type conversion, serialization and deserialization to minimize GC overhead, very rarely does it allocate single-use memory and only when absolutely necessary.\n* **HotPath APIs** - `Database` is optimized for hot paths, as such it provides a number of APIs that specifically combine features for maximum performance and minimal GC overhead. Like the `TryReadToRentedBuffer\u003cT\u003e` methods which is optimized for adding data to a table.\n* **Runtime Optimization** - Upon initialization, `Database` chooses specific serializers and deserializers tailored for specific configurations, minimizing the amount of runnable code during runtime that would've been wasted on different checks.\n\nFor more information check [inner directory](src/Sharpify.Data/README.md).\n\n## Sharpify.CommandLineInterface\n\n`Sharpify.CommandLineInterface` is another extension package that adds a high performance, reflection free and `AOT-ready` framework for creating command line and embedded interfaces\n\n* Maintenance friendly model that depends on class that implement `Command` or `SynchronousCommand`\n* `Arguments` is an abstraction layer over the inputs that validate during runtime according to user needs via convenient APIs.\n* Configuration using a fluent builder pattern.\n* Configurable output and input pipes, enable usage outside of `Console` apps, enabling the option for embedded use in any application.\n* Automatic and structured general and command-specific help text.\n* Configurable error handling with defaults.\n* Super lightweight\n\nFor more information check [inner directory](src/Sharpify.CommandLineInterface/README.md)\n\n## Methodology\n\n* Backwards compatibility ❌\n* Stability at release ✅\n\nAs the name suggests - `Sharpify` intends to extend the core language features using high performance implementations. `Sharpify` or its extension packages are not guaranteed to be backwards compatible, and each release may contain breaking changes as they try to adapt to the latest language features. `.NET` has a very active community and many features will be added to the core language that will perform at some point better than what `Sharpify` currently offers, at which point these features will be removed from `Sharpify` to encourage users to use the core language features instead.\n\nThe decision to disregard backwards compatibility is based on the idea to only provide feature that **add** or **improve** current language features. This is to ensure that both the package remains relevant, and unbounded by old sub-par implementations, and to encourage users to adapt their code to new language features.\n\nEven thought backwards compatibility is not guaranteed, `Sharpify` has very high coverage of unit tests, and should be completely stable upon release. All issues will be treated as **Urgent**.\n\nIf your packages / libraries use `Sharpify`, and you don't want to modify the code often, I recommend locking the dependency to a specific version which you test.\n\n## Contribution\n\nThis packages was made public so that the entire community could benefit from it. If you experience issues, want to suggest new features or improve existing ones, please use the [issues](https://github.com/dusrdev/Sharpify/issues) section.\n\n## Contact\n\nFor bug reports, feature requests or offers of support/sponsorship contact \u003cdusrdev@gmail.com\u003e\n\n\u003e This project is proudly made in Israel 🇮🇱 for the benefit of mankind.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdusrdev%2Fsharpify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdusrdev%2Fsharpify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdusrdev%2Fsharpify/lists"}