[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-73339":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":25,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":34,"readmeContent":35,"aiSummary":36,"trendingCount":16,"starSnapshotCount":16,"syncStatus":37,"lastSyncTime":38,"discoverSource":39},73339,"facet","facet-rs\u002Ffacet","facet-rs","Rust reflection, serialization, deserialization, pretty printing, etc. — the last proc macro you should need","https:\u002F\u002Ffacet.rs",null,"Rust",2493,118,4,116,0,3,6,22,9,69.43,"Apache License 2.0",false,"main",true,[27,28,29,30,31,32,33],"debugging","deserialization","introspection","reflection","rust","rust-lang","serialization","2026-06-12 04:01:09","# facet-core\n\n[![Coverage Status](https:\u002F\u002Fcoveralls.io\u002Frepos\u002Fgithub\u002Ffacet-rs\u002Ffacet-core\u002Fbadge.svg?branch=main)](https:\u002F\u002Fcoveralls.io\u002Fgithub\u002Ffacet-rs\u002Ffacet?branch=main)\n[![crates.io](https:\u002F\u002Fimg.shields.io\u002Fcrates\u002Fv\u002Ffacet-core.svg)](https:\u002F\u002Fcrates.io\u002Fcrates\u002Ffacet-core)\n[![documentation](https:\u002F\u002Fdocs.rs\u002Ffacet-core\u002Fbadge.svg)](https:\u002F\u002Fdocs.rs\u002Ffacet-core)\n[![MIT\u002FApache-2.0 licensed](https:\u002F\u002Fimg.shields.io\u002Fcrates\u002Fl\u002Ffacet-core.svg)](.\u002FLICENSE)\n[![Discord](https:\u002F\u002Fimg.shields.io\u002Fdiscord\u002F1379550208551026748?logo=discord&label=discord)](https:\u002F\u002Fdiscord.gg\u002FJhD7CwCJ8F)\n\nfacet provides reflection for Rust: it gives types a [`SHAPE`](Facet::SHAPE) associated\nconst with details on the layout, fields, doc comments, attributes, etc.\n\nIt can be used for many things, from (de)serialization to pretty-printing,\nrich debuggers, CLI parsing, reflection in templating engines, code\ngeneration, etc.\n\nSee \u003Chttps:\u002F\u002Ffacet.rs> for details.\n\n## Workspace contents\n\nThe main `facet` crate re-exports symbols from:\n\n- [facet-core](https:\u002F\u002Fgithub.com\u002Ffacet-rs\u002Ffacet\u002Ftree\u002Fmain\u002Ffacet-core), which defines the main components:\n  - The [`Facet`] trait and implementations for foreign types (mostly `libstd`)\n  - The [`Shape`] struct along with various vtables and the whole [`Def`] tree\n  - Type-erased pointer helpers like [`PtrUninit`], [`PtrConst`], and [`Opaque`]\n  - Autoderef specialization trick needed for `facet-macros`\n- [facet-macros](https:\u002F\u002Fgithub.com\u002Ffacet-rs\u002Ffacet\u002Ftree\u002Fmain\u002Ffacet-macros), which implements the [`Facet`] derive attribute as a fast\u002Flight proc macro powered by [unsynn](https:\u002F\u002Fdocs.rs\u002Funsynn)\n\nFor struct manipulation and reflection, we have:\n\n- [facet-reflect](https:\u002F\u002Fgithub.com\u002Ffacet-rs\u002Ffacet\u002Ftree\u002Fmain\u002Ffacet-reflect),\n  allows building values of arbitrary shapes in safe code, respecting invariants.\n  It also allows peeking at existing values.\n\nInternal crates include:\n\n- [facet-testhelpers](https:\u002F\u002Fgithub.com\u002Ffacet-rs\u002Ffacet\u002Ftree\u002Fmain\u002Ffacet-testhelpers) a simple log logger and color-backtrace configured with the lightweight btparse backend\n\n## Ecosystem\n\nVarious crates live under the \u003Chttps:\u002F\u002Fgithub.com\u002Ffacet-rs> umbrella, and their\nrepositories are kept somewhat-consistent through [facet-dev](https:\u002F\u002Fgithub.com\u002Ffacet-rs\u002Ffacet-dev).\n\nCrates are in various states of progress, buyer beware!\n\nIn terms of data formats, we have:\n\n- [facet-json](https:\u002F\u002Fgithub.com\u002Ffacet-rs\u002Ffacet-format\u002Ftree\u002Fmain\u002Ffacet-json): JSON format support\n- [facet-toml](https:\u002F\u002Fgithub.com\u002Ffacet-rs\u002Ffacet-format\u002Ftree\u002Fmain\u002Ffacet-toml): TOML format support\n- [facet-yaml](https:\u002F\u002Fgithub.com\u002Ffacet-rs\u002Ffacet-format\u002Ftree\u002Fmain\u002Ffacet-yaml): YAML format support\n- [facet-msgpack](https:\u002F\u002Fgithub.com\u002Ffacet-rs\u002Ffacet-format\u002Ftree\u002Fmain\u002Ffacet-msgpack): MessagePack deserialization\n- [facet-asn1](https:\u002F\u002Fgithub.com\u002Ffacet-rs\u002Ffacet-format\u002Ftree\u002Fmain\u002Ffacet-asn1): ASN.1 format support\n- [facet-xdr](https:\u002F\u002Fgithub.com\u002Ffacet-rs\u002Ffacet-format\u002Ftree\u002Fmain\u002Ffacet-xdr): XDR format support\n- [facet-csv](https:\u002F\u002Fgithub.com\u002Ffacet-rs\u002Ffacet-format\u002Ftree\u002Fmain\u002Ffacet-csv): CSV format support\n\nStill adjacent to serialization\u002Fdeserialization, we have:\n\n- [facet-urlencoded](https:\u002F\u002Fgithub.com\u002Ffacet-rs\u002Ffacet\u002Ftree\u002Fmain\u002Ffacet-urlencoded): URL-encoded form data deserialization\n- [figue](https:\u002F\u002Fgithub.com\u002Fbearcove\u002Ffigue): CLI arguments, config files, and environment variables (external crate)\n\nAs far as utilities go:\n\n- [facet-value](https:\u002F\u002Fgithub.com\u002Ffacet-rs\u002Ffacet\u002Ftree\u002Fmain\u002Ffacet-value): Memory-efficient dynamic value type, supporting JSON-like data plus bytes\n- [facet-pretty](https:\u002F\u002Fgithub.com\u002Ffacet-rs\u002Ffacet\u002Ftree\u002Fmain\u002Ffacet-pretty): Pretty-print Facet types\n- [facet-diff](https:\u002F\u002Fgithub.com\u002Ffacet-rs\u002Ffacet\u002Ftree\u002Fmain\u002Ffacet-diff): Diffing capabilities for Facet types\n- [facet-assert](https:\u002F\u002Fgithub.com\u002Ffacet-rs\u002Ffacet\u002Ftree\u002Fmain\u002Ffacet-assert): Pretty assertions for Facet types (no PartialEq required)\n- [facet-serialize](https:\u002F\u002Fgithub.com\u002Ffacet-rs\u002Ffacet-serialize): Generic iterative serialization facilities\n- [facet-deserialize](https:\u002F\u002Fgithub.com\u002Ffacet-rs\u002Ffacet-deserialize): Generic iterative deserialization facilities\n\nAnd the less developed:\n\n- [facet-inspect](https:\u002F\u002Fgithub.com\u002Ffacet-rs\u002Ffacet-inspect): Utilities to inspect the content of a Facet object\n\n## Extracted crates\n\nThese crates were previously part of this monorepo but have been extracted to their own repositories:\n\n- [facet-xml](https:\u002F\u002Fgithub.com\u002Ffacet-rs\u002Ffacet-xml): XML\u002FDOM ecosystem (includes facet-xml, facet-dom, facet-svg, facet-atom, facet-xml-node, facet-xml-diff, facet-singularize)\n- [facet-axum](https:\u002F\u002Fgithub.com\u002Ffacet-rs\u002Ffacet-axum): Axum web framework integration\n\n## Extended cinematic universe\n\nSome crates are developed completely independently from the facet org:\n\n- [facet-v8](https:\u002F\u002Fgithub.com\u002Fsimonask\u002Ffacet-v8) provides an experimental Facet\u002Fv8 integration\n- [facet-openapi](https:\u002F\u002Fgithub.com\u002FThouCheese\u002Ffacet-openapi) (experimental) Generates OpenAPI definitions from types that implement Facet\n- [facet_generate](https:\u002F\u002Fgithub.com\u002Fredbadger\u002Ffacet-generate) reflects Facet types into Java, Swift and TypeScript\n- [multi-array-list](https:\u002F\u002Flib.rs\u002Fcrates\u002Fmulti-array-list) provides an experimental `MultiArrayList` type\n\n## Sponsors\n\nThanks to all individual sponsors:\n\n\u003Cp> \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fsponsors\u002Ffasterthanlime\">\n\u003Cpicture>\n\u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fgithub.com\u002Ffacet-rs\u002Ffacet\u002Fraw\u002Fmain\u002Fstatic\u002Fsponsors-v3\u002Fgithub-dark.svg\">\n\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Ffacet-rs\u002Ffacet\u002Fraw\u002Fmain\u002Fstatic\u002Fsponsors-v3\u002Fgithub-light.svg\" height=\"40\" alt=\"GitHub Sponsors\">\n\u003C\u002Fpicture>\n\u003C\u002Fa> \u003Ca href=\"https:\u002F\u002Fpatreon.com\u002Ffasterthanlime\">\n    \u003Cpicture>\n    \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fgithub.com\u002Ffacet-rs\u002Ffacet\u002Fraw\u002Fmain\u002Fstatic\u002Fsponsors-v3\u002Fpatreon-dark.svg\">\n    \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Ffacet-rs\u002Ffacet\u002Fraw\u002Fmain\u002Fstatic\u002Fsponsors-v3\u002Fpatreon-light.svg\" height=\"40\" alt=\"Patreon\">\n    \u003C\u002Fpicture>\n\u003C\u002Fa> \u003C\u002Fp>\n\n...along with corporate sponsors:\n\n\u003Cp> \u003Ca href=\"https:\u002F\u002Faws.amazon.com\">\n\u003Cpicture>\n\u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fgithub.com\u002Ffacet-rs\u002Ffacet\u002Fraw\u002Fmain\u002Fstatic\u002Fsponsors-v3\u002Faws-dark.svg\">\n\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Ffacet-rs\u002Ffacet\u002Fraw\u002Fmain\u002Fstatic\u002Fsponsors-v3\u002Faws-light.svg\" height=\"40\" alt=\"AWS\">\n\u003C\u002Fpicture>\n\u003C\u002Fa> \u003Ca href=\"https:\u002F\u002Fzed.dev\">\n\u003Cpicture>\n\u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fgithub.com\u002Ffacet-rs\u002Ffacet\u002Fraw\u002Fmain\u002Fstatic\u002Fsponsors-v3\u002Fzed-dark.svg\">\n\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Ffacet-rs\u002Ffacet\u002Fraw\u002Fmain\u002Fstatic\u002Fsponsors-v3\u002Fzed-light.svg\" height=\"40\" alt=\"Zed\">\n\u003C\u002Fpicture>\n\u003C\u002Fa> \u003Ca href=\"https:\u002F\u002Fdepot.dev?utm_source=facet\">\n\u003Cpicture>\n\u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fgithub.com\u002Ffacet-rs\u002Ffacet\u002Fraw\u002Fmain\u002Fstatic\u002Fsponsors-v3\u002Fdepot-dark.svg\">\n\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Ffacet-rs\u002Ffacet\u002Fraw\u002Fmain\u002Fstatic\u002Fsponsors-v3\u002Fdepot-light.svg\" height=\"40\" alt=\"Depot\">\n\u003C\u002Fpicture>\n\u003C\u002Fa> \u003C\u002Fp>\n\n...without whom this work could not exist.\n\n## Special thanks\n\nThe facet logo was drawn by [Misiasart](https:\u002F\u002Fmisiasart.com\u002F).\n\n## License\n\nLicensed under either of:\n\n- Apache License, Version 2.0 ([LICENSE-APACHE](https:\u002F\u002Fgithub.com\u002Ffacet-rs\u002Ffacet\u002Fblob\u002Fmain\u002FLICENSE-APACHE) or \u003Chttp:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-2.0>)\n- MIT license ([LICENSE-MIT](https:\u002F\u002Fgithub.com\u002Ffacet-rs\u002Ffacet\u002Fblob\u002Fmain\u002FLICENSE-MIT) or \u003Chttp:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT>)\n\nat your option.\n","facet 是一个为 Rust 语言提供反射、序列化、反序列化以及美化打印等功能的库。其核心功能是通过为类型定义一个包含布局、字段、文档注释等信息的关联常量 `SHAPE` 来实现强大的内省能力。基于此，facet 支持从数据格式转换到调试工具增强等多种应用场景，并且通过高效轻量的宏来生成相关代码，减少了手动编写和维护的负担。该库特别适用于需要动态类型信息处理或跨多种数据格式进行操作的场景，如开发调试辅助工具、构建灵活的数据交换系统等。",2,"2026-06-11 03:45:04","high_star"]