Skip to content

Commit ca6266d

Browse files
author
Joanna May
committed
docs: update readme
1 parent 887185f commit ca6266d

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

README.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,28 @@ Find the latest version of the [Introspection] and [Introspection Generator] pac
2121

2222
## 📙 Background
2323

24-
This package powers several other Chickensoft tools and directly supersedes [SuperNodes]. It is designed to be leveraged by simple metaprogramming tools like [PowerUps], as well as provide the foundation for other systems, such as [Serialization].
24+
This is a metaprogramming tool that powers some of the other Chickensoft tools. Introspection exists to enable C# developers to get information about a type at runtime without needing reflection that wouldn't work or be guaranteed to work in all scenarios when compiling for ahead-of-time targets like iOS.
2525

2626
The introspection package provides the following features:
2727

28-
- Create a registry of all types visible from the global scope.
29-
- Generate metadata about visible types.
30-
- Track types by id and version.
31-
- Allow types to implement and look up mixins.
32-
- Compute and cache type hierarchies, attributes, and properties.
33-
- Track generic types of properties in a way that enables convenient serialization in AOT environments.
28+
- ✅ Create a registry of all types visible from the global scope.
29+
- ✅ Generate metadata about visible types.
30+
- ✅ Track types by id and version.
31+
- ✅ Allow types to implement and look up mixins.
32+
- ✅ Compute and cache type hierarchies, attributes, and properties.
33+
- ✅ Track generic types of properties in a way that enables convenient serialization in AOT environments.
34+
35+
You don't need to fully understand this package to make the most of it. In fact, you may never need to use it directly since you are more likely to encounter it as a dependency of one of the other Chickensoft tools:
36+
37+
- 💾 [Serialization] uses this tool to gather information about types at build-time to perform serialization and deserialization at runtime without having to resort to unsupported reflection techniques in AOT environments.
38+
- 💉 [AutoInject] uses this tool to allow you to add mixins to classes at build-time and invoke their methods at runtime without reflection. It also leverages this to read attributes on types without having to use reflection.
39+
- 💡 [LogicBlocks] uses this tool to look up possible states for a state machine so it can pre-allocate them at runtime without needing reflection.
3440

3541
The introspection generator is designed to be performant as a project grows. The generator only uses syntax information to generate metadata, rather than relying on the C# analyzer's symbol data, which can be very slow.
3642

43+
> [!NOTE]
44+
> This tool exists because many reflection-based API's don't work (or aren't guaranteed to work reliably in all scenarios) when compiling for AOT targets (like iOS). Chickensoft is striving to create packages that work in AOT environments like iOS, as mobile games and apps are extremely widespread. For more information, read our [philosophy].
45+
3746
## 📄 Usage
3847

3948
### 🧘‍♀️ Introspective Types
@@ -245,6 +254,7 @@ public partial class MyModel {
245254

246255
[chickensoft-badge]: https://raw.githubusercontent.com/chickensoft-games/chickensoft_site/main/static/img/badges/chickensoft_badge.svg
247256
[chickensoft-website]: https://chickensoft.games
257+
[philosophy]: https://chickensoft.games/philosophy
248258
[discord-badge]: https://raw.githubusercontent.com/chickensoft-games/chickensoft_site/main/static/img/badges/discord_badge.svg
249259
[discord]: https://discord.gg/gSjaPgMmYW
250260
[read-the-docs-badge]: https://raw.githubusercontent.com/chickensoft-games/chickensoft_site/main/static/img/badges/read_the_docs_badge.svg
@@ -254,9 +264,9 @@ public partial class MyModel {
254264

255265
[Introspection]: https://www.nuget.org/packages/Chickensoft.Introspection
256266
[Introspection Generator]: https://www.nuget.org/packages/Chickensoft.Introspection.Generator
257-
[SuperNodes]: https://github.com/chickensoft-games/SuperNodes
258-
[PowerUps]: https://github.com/chickensoft-games/PowerUps
259267
[Serialization]: https://github.com/chickensoft-games/Serialization
268+
[AutoInject]: https://github.com/chickensoft-games/AutoInject
269+
[LogicBlocks]: https://github.com/chickensoft-games/LogicBlocks
260270
[type registry]: Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/TypeRegistry.g.cs
261271
[type graph]: Chickensoft.Introspection/src/TypeGraph.cs
262272
[module initializer]: https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-9.0/module-initializers

0 commit comments

Comments
 (0)