This is an automated email from the ASF dual-hosted git repository.
chaokunyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fory-site.git
The following commit(s) were added to refs/heads/main by this push:
new 58a22cd5c 🔄 synced local 'docs/guide/' with remote 'docs/guide/'
58a22cd5c is described below
commit 58a22cd5c1e9a22e4c8510496ca1c198d8310c79
Author: chaokunyang <[email protected]>
AuthorDate: Wed Jan 14 11:04:38 2026 +0000
🔄 synced local 'docs/guide/' with remote 'docs/guide/'
---
docs/guide/cpp/field-configuration.md | 8 +++-----
docs/guide/go/struct-tags.md | 13 ++++++++++---
docs/guide/rust/field-configuration.md | 8 +++-----
3 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/docs/guide/cpp/field-configuration.md
b/docs/guide/cpp/field-configuration.md
index 2daf62499..991ed5b22 100644
--- a/docs/guide/cpp/field-configuration.md
+++ b/docs/guide/cpp/field-configuration.md
@@ -527,12 +527,10 @@ FORY_FIELD_CONFIG(DataV2,
| **Cross-lang compat** | Limited | Limited | Full
|
| **Recommended for** | Simple structs | Third-party types |
Complex/xlang structs |
-## Xlang Mode Defaults
+## Default Values
-C++ only supports xlang (cross-language) mode. The defaults are strict due to
type system differences between languages:
-
-- **Nullable**: Fields are non-nullable by default
-- **Ref tracking**: Disabled by default (except `std::shared_ptr` which tracks
refs by default)
+- **Nullable**: Only `std::optional<T>` is nullable by default; all other
types (including `std::shared_ptr`) are non-nullable
+- **Ref tracking**: Disabled by default for all types (including
`std::shared_ptr`)
You **need to configure fields** when:
diff --git a/docs/guide/go/struct-tags.md b/docs/guide/go/struct-tags.md
index 25d09b42c..742aa9df1 100644
--- a/docs/guide/go/struct-tags.md
+++ b/docs/guide/go/struct-tags.md
@@ -282,11 +282,18 @@ err := f.RegisterStruct(BadStruct{}, 1)
// Error: ErrKindInvalidTag
```
-## Xlang Mode Defaults
+## Native Mode vs Xlang Mode
-Go only supports xlang (cross-language) mode. The defaults are strict due to
type system differences between languages:
+Field configuration behaves differently depending on the serialization mode:
-- **Nullable**: Fields are non-nullable by default
+**Native Mode**:
+
+- **Nullable**: Pointer, slice, map, and interface types are nullable by
default
+- **Ref tracking**: Disabled by default (`ref` tag not set)
+
+**Xlang Mode**:
+
+- **Nullable**: Only pointer types are nullable by default (slices and maps
are NOT nullable)
- **Ref tracking**: Disabled by default (`ref` tag not set)
You **need to configure fields** when:
diff --git a/docs/guide/rust/field-configuration.md
b/docs/guide/rust/field-configuration.md
index 235986579..a42e4ab42 100644
--- a/docs/guide/rust/field-configuration.md
+++ b/docs/guide/rust/field-configuration.md
@@ -397,12 +397,10 @@ struct Data {
}
```
-## Xlang Mode Defaults
+## Default Values
-Rust only supports xlang (cross-language) mode. The defaults are strict due to
type system differences between languages:
-
-- **Nullable**: Fields are non-nullable by default (except `Option<T>`)
-- **Ref tracking**: Disabled by default (except `Rc<T>`, `Arc<T>`, weak types)
+- **Nullable**: `Option<T>`, `RcWeak<T>`, and `ArcWeak<T>` are nullable by
default; all other types are non-nullable
+- **Ref tracking**: `Rc<T>`, `Arc<T>`, `RcWeak<T>`, and `ArcWeak<T>` enable
ref tracking by default; all other types are disabled
You **need to configure fields** when:
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]