{"id":19281860,"url":"https://github.com/elide-dev/uuid","last_synced_at":"2025-04-22T01:31:12.006Z","repository":{"id":158536467,"uuid":"634084263","full_name":"elide-dev/uuid","owner":"elide-dev","description":"Kotlin Multiplatform UUID","archived":false,"fork":false,"pushed_at":"2025-03-28T16:58:35.000Z","size":3282,"stargazers_count":3,"open_issues_count":6,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-01T17:53:42.490Z","etag":null,"topics":["elide","elide-runtime","kotlin","kotlin-multiplatform"],"latest_commit_sha":null,"homepage":"https://elide.dev","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"benasher44/uuid","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elide-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-29T02:14:11.000Z","updated_at":"2025-01-08T05:44:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"d7569ce9-57e9-48fd-906a-7fe54093eff1","html_url":"https://github.com/elide-dev/uuid","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elide-dev%2Fuuid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elide-dev%2Fuuid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elide-dev%2Fuuid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elide-dev%2Fuuid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elide-dev","download_url":"https://codeload.github.com/elide-dev/uuid/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250161987,"owners_count":21385019,"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":["elide","elide-runtime","kotlin","kotlin-multiplatform"],"created_at":"2024-11-09T21:24:28.986Z","updated_at":"2025-04-22T01:31:11.527Z","avatar_url":"https://github.com/elide-dev.png","language":"Kotlin","readme":"# `elide-uuid`\n\n[![Maven Central](https://img.shields.io/maven-central/v/dev.elide/elide-uuid.svg?label=Maven%20Central)](https://search.maven.org/artifact/dev.elide/elide-uuid)\n[![CI](https://github.com/elide-dev/uuid/actions/workflows/push.yml/badge.svg)](https://github.com/elide-dev/uuid/actions/workflows/push.yml)\n[![Kotlin](https://img.shields.io/badge/Kotlin-2.0.0-blue.svg?logo=kotlin)](http://kotlinlang.org)\n[![Kotlin](https://img.shields.io/badge/kotlin-WASM-yellow.svg?logo=kotlin\u0026logoColor=yellow)](http://kotlinlang.org)\n[![Kotlin/JS. IR supported](https://img.shields.io/badge/kotlin-K2-yellow?logo=kotlin\u0026logoColor=yellow)](https://kotl.in/jsirsupported)\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v1.4-ff69b4.svg)](CODE_OF_CONDUCT.md)\n[![Reliability](https://sonarcloud.io/api/project_badges/measure?project=elide-dev_uuid\u0026metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=elide-dev_uuid)\n[![Maintainability](https://sonarcloud.io/api/project_badges/measure?project=elide-dev_uuid\u0026metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=elide-dev_uuid)\n[![Security](https://sonarcloud.io/api/project_badges/measure?project=elide-dev_uuid\u0026metric=security_rating)](https://sonarcloud.io/summary/new_code?id=elide-dev_uuid)\n[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=elide-dev_uuid\u0026metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=elide-dev_uuid)\n[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=elide-dev_uuid\u0026metric=bugs)](https://sonarcloud.io/summary/new_code?id=elide-dev_uuid)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Felide-dev%2Fuuid.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Felide-dev%2Fuuid?ref=badge_shield)\n[![OpenSSF Best Practices](https://bestpractices.coreinfrastructure.org/projects/7689/badge)](https://bestpractices.coreinfrastructure.org/projects/7689)\n\nK/N UUID. This brings a UUID that matches UUIDs on various platforms:\n\n- iOS/Mac: `NSUUID`\n- Java: `java.util.UUID`\n- Native: Source implementation\n\n### Features\n\n- Adheres to RFC4122\n- Support for `uuid3`, `uuid4`, and `uuid5`\n- Frozen and thread-safe (thread-safe randomness in native)\n- Tested on all platforms, and against macOS/iOS UUID to verify correctness\n- Aggressively optimized for performance and safety\n- Updated for new versions of Kotlin\n- Zero dependencies (only `stdlib`)\n- 🆕 All Kotlin targets, including WASM/WASI and Android/Native\n- 🆕 Serializable on JVM\n- 🆕 Serializable with KotlinX\n- 🆕 Zero-overhead model\n\n### Setup\n\n**In your `build.gradle(.kts)`:**\n\n```kotlin\ndependencies {\n  implementation(\"dev.elide:elide-uuid:\u003cversion\u003e\")\n}\n```\n\n**From an Elide application:**\n```kotlin\ndependencies {\n  implementation(elide.uuid)\n}\n```\n\n**To enable KotlinX Serialization support:**\n\n```kotlin\ndependencies {\n  implementation(\"dev.elide:elide-uuid-kotlinx:\u003cversion\u003e\")\n}\n```\n\n### Usage\n\nFrom any Kotlin source set:\n```kotlin\nval uuid = uuid4()\nprintln(uuid.toString())\n// 1b4e28ba-2fa1-11d2-883f-0016d3cca427\n```\n\nWhen KotlinX Serialization support is included:\n```kotlin\n@Serializable data class Sample(\n  @Serializable(with = UUIDSerializer::class) val uuid: Uuid,\n)\n\nval sample = Sample(uuid = uuid4())\nprintln(Json.encodeToString(Sample.serializer(), uuid.toString()))\n// {\"uuid\": \"1b4e28ba-2fa1-11d2-883f-0016d3cca427\"}\n```\n\n#### \"Zero-overhead\" abstraction\n\nThis library is designed to offer a compile-time option for dealing with UUIDs; internally, UUIDs are stored as a simple\n`Pair\u003cLong, Long\u003e` to minimize allocations, and the main `Uuid` class is a `@JvmInline value class`.\n\nThus, your UUIDs are strictly typed and validated but also remain very lightweight.\n\nThe main UUID library uses exactly zero dependencies, and even omits a `stdlib` dependency by default. You must bring\nyour own before shipping a target with this library.\n\n#### Serialization\n\nBoth JVM serialization and KotlinX serialization are supported out of the box.\n\n### Contributing\n\nContributions are welcome! Once you file a PR, a bot will as you to sign the CLA (_Contributor License Agreement_) and to sign off your commits to establish your DCO\n(_Developer Certificate of Origin_).\n\nChecks run automatically on each PR. Review is requested automatically once your PR goes from draft to open.\n\n### Additional checks\n\n[![Quality gate](https://sonarcloud.io/api/project_badges/quality_gate?project=elide-dev_uuid)](https://sonarcloud.io/summary/new_code?id=elide-dev_uuid)\n\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Felide-dev%2Fuuid.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Felide-dev%2Fuuid?ref=badge_large)\n\n#### This is a fork\n\nBen Asher's original library is [here](https://github.com/benasher44/uuid.git).\n\n#### About Elide\n\nThis library is part of a larger polyglot framework and runtime called [Elide](https://github.com/elide-dev). You can learn more about Elide at [`elide.dev`](https://elide.dev).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felide-dev%2Fuuid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felide-dev%2Fuuid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felide-dev%2Fuuid/lists"}