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 3ba5faebe6 🔄 synced local 'docs/compiler/' with remote 'docs/compiler/'
3ba5faebe6 is described below
commit 3ba5faebe6f9c6d1e51b85b14883a86f54f34009
Author: chaokunyang <[email protected]>
AuthorDate: Thu Jan 29 13:42:28 2026 +0000
🔄 synced local 'docs/compiler/' with remote 'docs/compiler/'
---
docs/compiler/compiler-guide.md | 54 ++++++++++++++++++++--------------------
docs/compiler/flatbuffers-idl.md | 4 +--
docs/compiler/index.md | 4 +--
3 files changed, 31 insertions(+), 31 deletions(-)
diff --git a/docs/compiler/compiler-guide.md b/docs/compiler/compiler-guide.md
index 983ccc2e48..8bba859bb2 100644
--- a/docs/compiler/compiler-guide.md
+++ b/docs/compiler/compiler-guide.md
@@ -33,7 +33,7 @@ pip install -e .
### Verify Installation
```bash
-fory compile --help
+foryc --help
```
## Command Line Interface
@@ -41,11 +41,11 @@ fory compile --help
### Basic Usage
```bash
-fory compile [OPTIONS] FILES...
+foryc [OPTIONS] FILES...
```
```bash
-fory scan-generated [OPTIONS]
+foryc --scan-generated [OPTIONS]
```
### Options
@@ -65,25 +65,25 @@ fory scan-generated [OPTIONS]
### Scan Generated Files
-Use `scan-generated` to find files produced by the Fory compiler. The scanner
walks
+Use `--scan-generated` to find files produced by the Fory compiler. The
scanner walks
the tree recursively, skips `build/`, `target/`, and hidden directories, and
prints
each generated file as it is found.
```bash
# Scan current directory
-fory scan-generated
+foryc --scan-generated
# Scan a specific root
-fory scan-generated --root ./src
+foryc --scan-generated --root ./src
# Print paths relative to the scan root
-fory scan-generated --root ./src --relative
+foryc --scan-generated --root ./src --relative
# Delete scanned generated files
-fory scan-generated --root ./src --delete
+foryc --scan-generated --root ./src --delete
# Dry-run (scan and print only)
-fory scan-generated --root ./src --dry-run
+foryc --scan-generated --root ./src --dry-run
```
### Examples
@@ -91,63 +91,63 @@ fory scan-generated --root ./src --dry-run
**Compile for all languages:**
```bash
-fory compile schema.fdl
+foryc schema.fdl
```
**Compile for specific languages:**
```bash
-fory compile schema.fdl --lang java,python
+foryc schema.fdl --lang java,python
```
**Specify output directory:**
```bash
-fory compile schema.fdl --output ./src/generated
+foryc schema.fdl --output ./src/generated
```
**Override package name:**
```bash
-fory compile schema.fdl --package com.myapp.models
+foryc schema.fdl --package com.myapp.models
```
**Compile multiple files:**
```bash
-fory compile user.fdl order.fdl product.fdl --output ./generated
+foryc user.fdl order.fdl product.fdl --output ./generated
```
**Use import search paths:**
```bash
# Add a single import path
-fory compile src/main.fdl -I libs/common
+foryc src/main.fdl -I libs/common
# Add multiple import paths (repeated option)
-fory compile src/main.fdl -I libs/common -I libs/types
+foryc src/main.fdl -I libs/common -I libs/types
# Add multiple import paths (comma-separated)
-fory compile src/main.fdl -I libs/common,libs/types,third_party/
+foryc src/main.fdl -I libs/common,libs/types,third_party/
# Using --proto_path (protoc-compatible alias)
-fory compile src/main.fdl --proto_path=libs/common
+foryc src/main.fdl --proto_path=libs/common
# Mix all styles
-fory compile src/main.fdl -I libs/common,libs/types --proto_path third_party/
+foryc src/main.fdl -I libs/common,libs/types --proto_path third_party/
```
**Language-specific output directories (protoc-style):**
```bash
# Generate only Java code to a specific directory
-fory compile schema.fdl --java_out=./src/main/java
+foryc schema.fdl --java_out=./src/main/java
# Generate multiple languages to different directories
-fory compile schema.fdl --java_out=./java/gen --python_out=./python/src
--go_out=./go/gen
+foryc schema.fdl --java_out=./java/gen --python_out=./python/src
--go_out=./go/gen
# Combine with import paths
-fory compile schema.fdl --java_out=./gen/java -I proto/ -I common/
+foryc schema.fdl --java_out=./gen/java -I proto/ -I common/
```
When using `--{lang}_out` options:
@@ -172,7 +172,7 @@ import "common.fdl"; // Found if common.fdl is in the same
directory
```bash
# No -I needed for same-directory imports
-fory compile main.fdl
+foryc main.fdl
```
**Example project structure:**
@@ -188,7 +188,7 @@ project/
**Without `-I` (fails):**
```bash
-$ fory compile src/main.fdl
+$ foryc src/main.fdl
Import error: Import not found: common.fdl
Searched in: /project/src
```
@@ -196,7 +196,7 @@ Import error: Import not found: common.fdl
**With `-I` (succeeds):**
```bash
-$ fory compile src/main.fdl -I libs/
+$ foryc src/main.fdl -I libs/
Compiling src/main.fdl...
Resolved 1 import(s)
```
@@ -397,7 +397,7 @@ setup(
Add to your Go file:
```go
-//go:generate fory compile ../schema.fdl --lang go --output .
+//go:generate foryc ../schema.fdl --lang go --output .
package models
```
@@ -553,7 +553,7 @@ steps:
run: pip install ./compiler
- name: Generate Types
- run: fory compile fdl/*.fdl --output src/generated
+ run: foryc fdl/*.fdl --output src/generated
- name: Build
run: ./gradlew build
diff --git a/docs/compiler/flatbuffers-idl.md b/docs/compiler/flatbuffers-idl.md
index 638a4da49a..471b97a1d3 100644
--- a/docs/compiler/flatbuffers-idl.md
+++ b/docs/compiler/flatbuffers-idl.md
@@ -118,13 +118,13 @@ convention).
Compile a FlatBuffers schema directly:
```bash
-fory compile schema.fbs --lang java,python --output ./generated
+foryc schema.fbs --lang java,python --output ./generated
```
To inspect the translated FDL for debugging:
```bash
-fory compile schema.fbs --emit-fdl --emit-fdl-path ./translated
+foryc schema.fbs --emit-fdl --emit-fdl-path ./translated
```
## Generated Code Differences
diff --git a/docs/compiler/index.md b/docs/compiler/index.md
index 76c64c9d18..694419cc0d 100644
--- a/docs/compiler/index.md
+++ b/docs/compiler/index.md
@@ -106,10 +106,10 @@ message Person [id=100] {
```bash
# Generate for all languages
-fory compile example.fdl --output ./generated
+foryc example.fdl --output ./generated
# Generate for specific languages
-fory compile example.fdl --lang java,python --output ./generated
+foryc example.fdl --lang java,python --output ./generated
```
### 4. Use Generated Code
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]