{"id":18897770,"url":"https://github.com/zurutech/dicey","last_synced_at":"2025-09-11T18:34:01.680Z","repository":{"id":244200701,"uuid":"811872952","full_name":"zurutech/dicey","owner":"zurutech","description":"Dicey IPC library (beta)","archived":false,"fork":false,"pushed_at":"2025-03-26T11:47:44.000Z","size":1242,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-15T02:12:16.570Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zurutech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-06-07T13:30:08.000Z","updated_at":"2025-03-26T11:47:47.000Z","dependencies_parsed_at":"2024-06-13T11:48:56.099Z","dependency_job_id":"c3478769-df9b-4b51-a8db-dddd01ad58c7","html_url":"https://github.com/zurutech/dicey","commit_stats":null,"previous_names":["zurutech/dicey"],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zurutech%2Fdicey","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zurutech%2Fdicey/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zurutech%2Fdicey/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zurutech%2Fdicey/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zurutech","download_url":"https://codeload.github.com/zurutech/dicey/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248991558,"owners_count":21194894,"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":"2024-11-08T08:39:30.525Z","updated_at":"2025-04-15T02:12:24.868Z","avatar_url":"https://github.com/zurutech.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dicey\n\nDicey is a WIP library that strives to provide an easy yet extensible way to implement 1:N IPC between a central\napplication and multiple observer processes.\n\nDicey allows applications to expose a fast, asynchronous entry point to a set of well-defined objects, over either UDS or\nnamed pipes (Windows).\n\n## Supported platforms\n\nDicey is written in strict C11 with little to no extensions, and has been tested on the following configurations:\n\n- GNU/Linux x86_64\n- GNU/Linux AArch64\n- macOS AArch64\n- FreeBSD x86_64\n- Windows x86_64\n\n## Building\n\nIn order to build Dicey, you need:\n\n- a recent C11-compliant compiler. The code has been thourougly tested with GCC 12+, Clang 15+ and CL 19.38+ (MSVC 2022)\n- a recent version of CMake  - at least 3.26\n- (optional) [Ninja](https://ninja-build.org/), for presets.\n\nIf you have `ninja` installed, you can use one of the many pre-defined presets to build Dicey:\n\n```\n$ cmake --list-presets\nAvailable configure presets:\n\n  \"debug\"                                - Debug (shared)\n  \"debug-vendored\"                       - Debug (shared, with vendored libraries)\n  \"debug-static\"                         - Debug (static)\n  \"debug-static-vendored\"                - Debug (static, with vendored libraries)\n  \"debug-min\"                            - Debug (shared, no samples)\n  \"debug-min-vendored\"                   - Debug (shared, no samples, with vendored libraries)\n  \"debug-min-static\"                     - Debug (static, no samples)\n  \"debug-min-static-vendored\"            - Debug (static, no samples, with vendored libraries)\n  \"debug-gcc\"                            - Debug (shared, with GCC)\n  \"debug-gcc-analyzer\"                   - Debug (shared, with GCC, with GCC Static analyzer)\n  \"debug-llvm-unix\"                      - Debug (shared, with LLVM)\n  \"debug-llvm-fuzzer\"                    - Debug (shared, with LLVM, with libFuzzer sample)\n  \"debug-llvm-asan\"                      - Debug (shared, with LLVM, with AddressSanitizer)\n  \"debug-llvm-msan\"                      - Debug (shared, with LLVM, with MemorySanitizer)\n  \"debug-llvm-tsan\"                      - Debug (shared, with LLVM, with ThreadSanitizer)\n  \"debug-llvm-ubsan\"                     - Debug (shared, with LLVM, with UndefinedBehaviorSanitizer)\n  \"release\"                              - Release (shared)\n  \"release-vendored\"                     - Release (shared, with vendored libraries)\n  \"release-with-samples\"                 - Release (shared, with samples)\n  \"release-with-samples-vendored\"        - Release (shared, with samples, with vendored libraries)\n  \"release-static\"                       - Release (static)\n  \"release-static-vendored\"              - Release (static, with vendored libraries)\n  \"release-static-with-samples\"          - Release (static, with samples)\n  \"release-static-with-samples-vendored\" - Release (static, with samples, with vendored libraries)\n  \"release-gcc\"                          - Release (shared, with GCC)\n  \"release-llvm-unix\"                    - Release (shared, with LLVM)\n```\n\nIf you just want to test the library, build a debug static version:\n\n```\n$ cmake --preset debug-static\n$ cmake --build --preset debug-static\n```\n\nThis will build all libraries as static libraries and all samples.\n\nMore info about how to build different builds, including for release, will come in due time.\n\n## Using the `samples`\n\n`samples` contains several useful tools that can be used to test Dicey.\nIn particular, after building with BUILD_SAMPLES=ON (i.e., a debug config or a `with-samples` release preset) you should\nfind the following sample executables under `\u003cbuildir\u003e/samples`:\n\n- **load**: loads a Dicey packet from either a binary representation or an XML representation, following the schema defined\n  at `schemas/packet.xsd`. Prints a full textual representation of the packet on stdout.\n  You can use load to compile XML files to binary using the `-o` parameter:\n\n  ```\n  $ build/samples/load -o packet.bin schemas/packet.xml\n  $ build/samples/load packet.bin\n  #0 = message {\n    kind = SET\n    path = \"/foo/bar\"\n    selector = (a.street.trait.named.Bob:Bobbable)\n    value = tuple(\n        [0] = array[bool]{\n            [0] = bool:true\n            [1] = bool:false\n        }\n        [1] = bool:true\n        [2] = array[float]{\n            [0] = float:3.140000\n            [1] = float:2.718000\n        }\n        [3] = error:(code = 10)\n        [4] = error:(code = 20, message = \"Oh no!\")\n        [5] = byte:88\n        [6] = unit:()\n        [7] = pair{\n            first = str:\"key\"\n            second = array[tuple]{\n                [0] = tuple(\n                    [0] = i32:1\n                    [1] = i32:-2\n                )\n                [1] = tuple(\n                    [0] = str:\"foo\"\n                    [1] = str:\"bar\"\n                    [2] = bytes:[ 62 61 73 65 36 34 ] (6 bytes)\n                )\n            }\n        }\n    )\n  }\n  ```\n\n- **server**: a simple server for Dicey. Run it as `server` with no arguments. It will listen on a pre-defined socket or\n  named pipe, whose name will be printed on stdout:\n\n  ```\n  $  build/samples/server\n    starting Dicey sample server on @/tmp/.uvsock...\n  ```\n\n  You can stop the server with `Ctrl-C`, or by performing `EXEC /dicey/sample_server#dicey.sample.Server:Halt` with\n  signature `(u) -\u003e u`.\n\n  The server will print all incoming messages on stdout, and errors on stderr.\n\n- **sval**: a simple client for the `sval.Sval` service exposed by `server`.\n  Run it as\n\n  ```\n  $ sval SOCKETPATH\n  /sval#sval.Sval:Value = \"hello\"\n  ```\n\n  to perform a simple `GET` operation on the `/sval#sval.Sval:Value` string property, or\n\n  ```\n  $ sval SOCKETPATH \"world\"\n  ```\n\n  to perform a `SET` instead, with the given string.\n\n  `SOCKETPATH` is the name of either an UDS or a Windows named pipe. On Linux, you can specify an abstract socket using\n  the `@` notation, like `@/tmp/.uvsock`.\n\nAlongside these samples, you will find the following internal tools which may looks somewhat cryptic, but are good references\nfor how to perform more complex tasks with `libdicey`:\n\n- *client*: a simple client for Dicey which sends an arbitrarily complex payload.\n  Run it as `client SOCKETPATH PAYLOAD`, where `SOCKETPATH` is the name of either an UDS or a Windows named pipe.\n  `PAYLOAD` can can be either a binary payload or an XML file.\n\n- *dump*: generates a sample (builtin for now) payload to a file, or prints it on stdout as hex.\n\n- *base64*: a clone of the classic UNIX `base64` utility. It can encode and decode base64 payloads.\n\n- *inspect*: uses Dicey introspection to inspect objects on a server. Run it as `inspect SOCKET PATH`.\n\n## Licence\n\nDicey is licenced under the terms of the Apache License 2.0. See `LICENSE` for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzurutech%2Fdicey","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzurutech%2Fdicey","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzurutech%2Fdicey/lists"}