Skip to content

Commit f1129be

Browse files
committed
docs(dart): clarify web serializer registration
1 parent a30ca48 commit f1129be

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

docs/guide/dart/web-platform-support.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,12 @@ The Dart runtime supports:
3131
- Dart applications compiled to JavaScript for browsers.
3232
- Flutter web applications.
3333
- Generated `@ForyStruct` serializers and manually registered serializers.
34-
- Cross-language (`xlang`) payloads produced by other Fory runtimes.
35-
36-
The Dart runtime does not support Fory native-mode payloads. If a peer runtime
37-
is Java, Go, C++, Rust, Python, C#, JavaScript, or another Fory implementation,
38-
configure that peer to write xlang-compatible payloads before sending data to
39-
Dart.
4034

4135
## Code Generation Is Required
4236

43-
Web and Flutter builds cannot rely on `dart:mirrors`. Register generated
44-
serializers explicitly:
37+
Fory Dart uses explicit registration instead of runtime reflection. For
38+
annotated structs, run code generation and register the generated serializer
39+
before serializing or deserializing values:
4540

4641
```dart
4742
import 'package:fory/fory.dart';
@@ -78,8 +73,9 @@ cd dart/packages/fory
7873
dart run build_runner build --delete-conflicting-outputs
7974
```
8075

81-
The registration call is the same on VM and web. Do not call private generated
82-
helpers directly.
76+
The registration call is the same on VM and web. Manual serializers use
77+
`registerSerializer(...)`; generated structs use the generated `register`
78+
wrapper.
8379

8480
## 64-Bit Integer Rules
8581

0 commit comments

Comments
 (0)