| <!doctype html><html lang=en-US dir=ltr class="docs-wrapper plugin-docs plugin-id-default docs-version-1.3.0 docs-doc-page docs-doc-id-compiler/flatbuffers_idl" data-has-hydrated=false><head><meta charset=UTF-8><meta name=generator content="Docusaurus v3.10.1"><title data-rh=true>FlatBuffers IDL Support | Apache Fory™</title><meta data-rh=true name=viewport content="width=device-width, initial-scale=1.0"/><meta data-rh=true property=og:url content=https://fory.apache.org/docs/compiler/flatbuffers_idl /><meta data-rh=true property=og:locale content=en_US /><meta data-rh=true property=og:locale:alternate content=zh_CN /><meta data-rh=true name=docusaurus_locale content=en-US /><meta data-rh=true name=docsearch:language content=en-US /><meta data-rh=true http-equiv=Content-Security-Policy content="frame-src 'self' https://ghbtns.com/;"/><meta data-rh=true property=og:image content=https://fory.apache.org/img/logo.png /><meta data-rh=true property=og:image:width content=1500 /><meta data-rh=true property=og:image:height content=1500 /><meta data-rh=true name=twitter:card content=summary_large_image /><meta data-rh=true name=twitter:image content=https://fory.apache.org/img/logo.png /><meta data-rh=true name=docusaurus_version content=1.3.0 /><meta data-rh=true name=docusaurus_tag content=docs-default-1.3.0 /><meta data-rh=true name=docsearch:version content=1.3.0 /><meta data-rh=true name=docsearch:docusaurus_tag content=docs-default-1.3.0 /><meta data-rh=true property=og:title content="FlatBuffers IDL Support | Apache Fory™"/><meta data-rh=true name=description content="This page explains how Apache Fory consumes FlatBuffers schemas (.fbs) and"/><meta data-rh=true property=og:description content="This page explains how Apache Fory consumes FlatBuffers schemas (.fbs) and"/><link data-rh=true rel=icon href=/img/favicon.ico /><link data-rh=true rel=canonical href=https://fory.apache.org/docs/compiler/flatbuffers_idl /><link data-rh=true rel=alternate href=https://fory.apache.org/docs/compiler/flatbuffers_idl hreflang=en-US /><link data-rh=true rel=alternate href=https://fory.apache.org/zh-CN/docs/compiler/flatbuffers_idl hreflang=zh-CN /><link data-rh=true rel=alternate href=https://fory.apache.org/docs/compiler/flatbuffers_idl hreflang=x-default /><script data-rh=true type=application/ld+json>{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","item":"https://fory.apache.org/docs/compiler/flatbuffers_idl","name":"FlatBuffers IDL Support","position":1}]}</script><link rel=alternate type=application/rss+xml href=/blog/rss.xml title="Apache Fory™ RSS Feed"><link rel=alternate type=application/atom+xml href=/blog/atom.xml title="Apache Fory™ Atom Feed"><script type=text/javascript>"fury.apache.org"===window.location.host&&(window.location.href="https://fory.apache.org"),function(){for(var o=window.location.pathname,a=["guide","introduction","start"],n=0;n<a.length;n++){var t=a[n],i=RegExp("^((?:/[a-z]{2}-[A-Z]{2})?/docs(?:/(?:next|[0-9]+.[0-9]+))?)/docs/"+t+"(/.*)?$"),c=o.match(i);if(c){var r=c[1]+"/"+t+(c[2]||"");window.location.replace(r+window.location.search+window.location.hash);return}}}()</script><link rel=stylesheet href=/assets/css/styles.3a1edaa1.css /><script src=/assets/js/runtime~main.605b11b1.js defer></script><script src=/assets/js/main.283fea4b.js defer></script></head><body><svg style="display: none;"><defs> |
| <symbol id=theme-svg-external-link viewBox="0 0 24 24"><path fill=currentColor d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"/></symbol> |
| </defs></svg> |
| <script>!function(){var t=function(){try{return new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}}()||function(){try{return window.localStorage.getItem("theme")}catch(t){}}();document.documentElement.setAttribute("data-theme",t||"light"),document.documentElement.setAttribute("data-theme-choice",t||"light")}(),function(){try{for(var[t,e]of new URLSearchParams(window.location.search).entries())if(t.startsWith("docusaurus-data-")){var a=t.replace("docusaurus-data-","data-");document.documentElement.setAttribute(a,e)}}catch(t){}}()</script><div id=__docusaurus><div role=region aria-label="Skip to main content"><a class=skipToContent_fXgn href=#__docusaurus_skipToContent_fallback>Skip to main content</a></div><nav aria-label=Main class="theme-layout-navbar navbar navbar--fixed-top"><div class=navbar__inner><div class="theme-layout-navbar-left navbar__items"><button aria-label="Toggle navigation bar" aria-expanded=false class="navbar__toggle clean-btn" type=button><svg width=30 height=30 viewBox="0 0 30 30" aria-hidden=true><path stroke=currentColor stroke-linecap=round stroke-miterlimit=10 stroke-width=2 d="M4 7h22M4 15h22M4 23h22"/></svg></button><a class=navbar__brand href=/><div class=navbar__logo><img src=/img/fory-logo-light.png alt="Apache Fory™ Logo" class="themedComponent_mlkZ themedComponent--light_NVdE"/><img src=/img/fory-logo-dark.png alt="Apache Fory™ Logo" class="themedComponent_mlkZ themedComponent--dark_xIcU"/></div><b class="navbar__title text--truncate"></b></a><a aria-current=page class="navbar__item navbar__link navbar__link--active" href=/docs/introduction/overview>Docs</a><a class="navbar__item navbar__link" href=/docs/specification/xlang_serialization_spec>Specification</a><a class="navbar__item navbar__link" href=/docs/community/>Community</a><a class="navbar__item navbar__link" href=/user>Users</a><a class="navbar__item navbar__link" href=/download>Download</a><a class="navbar__item navbar__link" href=/blog>Blog</a></div><div class="theme-layout-navbar-right navbar__items navbar__items--right"><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href=# aria-haspopup=true aria-expanded=false role=button class=navbar__link>ASF</a><ul class=dropdown__menu><li><a href=https://www.apache.org/ target=_blank rel="noopener noreferrer" class=dropdown__link>Foundation</a><li><a href=https://www.apache.org/licenses/ target=_blank rel="noopener noreferrer" class=dropdown__link>License</a><li><a href=https://www.apache.org/events/current-event.html target=_blank rel="noopener noreferrer" class=dropdown__link>Events</a><li><a href=https://privacy.apache.org/policies/privacy-policy-public.html target=_blank rel="noopener noreferrer" class=dropdown__link>Privacy</a><li><a href=https://www.apache.org/security/ target=_blank rel="noopener noreferrer" class=dropdown__link>Security</a><li><a href=https://www.apache.org/foundation/sponsorship.html target=_blank rel="noopener noreferrer" class=dropdown__link>Sponsorship</a><li><a href=https://www.apache.org/foundation/thanks.html target=_blank rel="noopener noreferrer" class=dropdown__link>Thanks</a><li><a href=https://www.apache.org/foundation/policies/conduct.html target=_blank rel="noopener noreferrer" class=dropdown__link>Code of Conduct</a></ul></div><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a class=navbar__link aria-haspopup=true aria-expanded=false role=button href=/docs/compiler/flatbuffers_idl>1.3.0</a><ul class=dropdown__menu><li><a class=dropdown__link href=/docs/next/compiler/flatbuffers_idl>dev</a><li><a aria-current=page class="dropdown__link dropdown__link--active" href=/docs/compiler/flatbuffers_idl>1.3.0</a><li><a class=dropdown__link href=/docs/1.2.0/compiler/flatbuffers_idl>1.2.0</a><li><a class=dropdown__link href=/docs/1.1.0/compiler/flatbuffers_idl>1.1.0</a><li><a class=dropdown__link href=/docs/1.0.0/compiler/flatbuffers_idl>1.0.0</a><li><a class=dropdown__link href=/docs/0.17/compiler/flatbuffers_idl>0.17</a><li><a class=dropdown__link href=/docs/0.16/compiler/flatbuffers_idl>0.16</a><li><a class=dropdown__link href=/docs/0.15/compiler/flatbuffers_idl>0.15</a><li><a class=dropdown__link href=/docs/0.14/introduction/overview>0.14</a><li><a class=dropdown__link href=/docs/0.13/introduction/overview>0.13</a><li><a class=dropdown__link href=/docs/0.12/introduction/overview>0.12</a><li><a class=dropdown__link href=/docs/0.11/introduction/overview>0.11</a><li><a class=dropdown__link href=/docs/0.10/introduction/overview>0.10</a></ul></div><a href=https://github.com/apache/fory target=_blank rel="noopener noreferrer" class="navbar__item navbar__link header-github-link" aria-label="GitHub repository"></a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href=# aria-haspopup=true aria-expanded=false role=button class=navbar__link><svg viewBox="0 0 24 24" width=20 height=20 aria-hidden=true class=iconLanguage_nlXk><path fill=currentColor d="M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"/></svg>English</a><ul class=dropdown__menu><li><a href=/docs/compiler/flatbuffers_idl target=_self rel="noopener noreferrer" class="dropdown__link dropdown__link--active" lang=en-US>English</a><li><a href=/zh-CN/docs/compiler/flatbuffers_idl target=_self rel="noopener noreferrer" class=dropdown__link lang=zh-CN>简体中文</a></ul></div><div class="toggle_vylO colorModeToggle_DEke"><button class="clean-btn toggleButton_gllP toggleButtonDisabled_aARS" type=button disabled title="system mode" aria-label="Switch between dark and light mode (currently system mode)"><svg viewBox="0 0 24 24" width=24 height=24 aria-hidden=true class="toggleIcon_g3eP lightToggleIcon_pyhR"><path fill=currentColor d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"/></svg><svg viewBox="0 0 24 24" width=24 height=24 aria-hidden=true class="toggleIcon_g3eP darkToggleIcon_wfgR"><path fill=currentColor d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"/></svg><svg viewBox="0 0 24 24" width=24 height=24 aria-hidden=true class="toggleIcon_g3eP systemToggleIcon_QzmC"><path fill=currentColor d="m12 21c4.971 0 9-4.029 9-9s-4.029-9-9-9-9 4.029-9 9 4.029 9 9 9zm4.95-13.95c1.313 1.313 2.05 3.093 2.05 4.95s-0.738 3.637-2.05 4.95c-1.313 1.313-3.093 2.05-4.95 2.05v-14c1.857 0 3.637 0.737 4.95 2.05z"/></svg></button></div><div class=navbarSearchContainer_Bca1><div class=navbar__search><span aria-label="expand searchbar" role=button class=search-icon tabindex=0></span><input id=search_input_react type=search placeholder=Loading... aria-label=Search class="navbar__search-input search-bar" disabled/></div></div></div></div><div role=presentation class=navbar-sidebar__backdrop></div></nav><div id=__docusaurus_skipToContent_fallback class="theme-layout-main main-wrapper mainWrapper_z2l0"><div class=docsWrapper_hBAB><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_sjWU" type=button></button><div class=docRoot_UBD9><aside class="theme-doc-sidebar-container docSidebarContainer_YfHR"><div class=sidebarViewport_aRkj><div class=sidebar_njMd><nav aria-label="Docs sidebar" class="menu thin-scrollbar menu_SIkG"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class=menu__list-item-collapsible><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret" role=button aria-expanded=true href=/docs/introduction/overview><span title=Introduction class=categoryLinkLabel_W154>Introduction</span></a></div><ul class=menu__list><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class=menu__link tabindex=0 href=/docs/introduction/overview><span title=Overview class=linkLabel_WmDU>Overview</span></a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class=menu__link tabindex=0 href=/docs/introduction/features><span title=Features class=linkLabel_WmDU>Features</span></a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class=menu__link tabindex=0 href=/docs/introduction/benchmark><span title=Benchmark class=linkLabel_WmDU>Benchmark</span></a></ul><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class=menu__list-item-collapsible><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret" role=button aria-expanded=true href=/docs/start/install><span title=Start class=categoryLinkLabel_W154>Start</span></a></div><ul class=menu__list><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class=menu__link tabindex=0 href=/docs/start/install><span title=Install class=linkLabel_WmDU>Install</span></a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class=menu__link tabindex=0 href=/docs/start/usage><span title=Usage class=linkLabel_WmDU>Usage</span></a></ul><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class=menu__list-item-collapsible><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret menu__link--active" role=button aria-expanded=true href=/docs/compiler/><span title="Schema IDL & Compiler" class=categoryLinkLabel_W154>Schema IDL & Compiler</span></a></div><ul class=menu__list><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class=menu__link tabindex=0 href=/docs/compiler/><span title=Overview class=linkLabel_WmDU>Overview</span></a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class=menu__link tabindex=0 href=/docs/compiler/syntax><span title="Schema IDL" class=linkLabel_WmDU>Schema IDL</span></a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class=menu__link tabindex=0 href=/docs/compiler/compiler_guide><span title="Compiler Guide" class=linkLabel_WmDU>Compiler Guide</span></a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class=menu__link tabindex=0 href=/docs/compiler/generated_code><span title="Generated Code" class=linkLabel_WmDU>Generated Code</span></a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current=page tabindex=0 href=/docs/compiler/flatbuffers_idl><span title="FlatBuffers IDL Support" class=linkLabel_WmDU>FlatBuffers IDL Support</span></a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class=menu__link tabindex=0 href=/docs/compiler/protobuf_idl_support><span title="Protobuf IDL Support" class=linkLabel_WmDU>Protobuf IDL Support</span></a></ul><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class=menu__list-item-collapsible><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret" role=button aria-expanded=true href=/docs/guide/java/><span title=Guide class=categoryLinkLabel_W154>Guide</span></a></div><ul class=menu__list><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class=menu__list-item-collapsible><a class="categoryLink_byQd menu__link menu__link--sublist" tabindex=0 href=/docs/guide/java/><span title=Java class=categoryLinkLabel_W154>Java</span></a><button aria-label="Expand sidebar category 'Java'" aria-expanded=false type=button class="clean-btn menu__caret"></button></div><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class=menu__list-item-collapsible><a class="categoryLink_byQd menu__link menu__link--sublist" tabindex=0 href=/docs/guide/python/><span title=Python class=categoryLinkLabel_W154>Python</span></a><button aria-label="Expand sidebar category 'Python'" aria-expanded=false type=button class="clean-btn menu__caret"></button></div><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class=menu__list-item-collapsible><a class="categoryLink_byQd menu__link menu__link--sublist" tabindex=0 href=/docs/guide/rust/><span title=Rust class=categoryLinkLabel_W154>Rust</span></a><button aria-label="Expand sidebar category 'Rust'" aria-expanded=false type=button class="clean-btn menu__caret"></button></div><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class=menu__list-item-collapsible><a class="categoryLink_byQd menu__link menu__link--sublist" tabindex=0 href=/docs/guide/cpp/><span title=C++ class=categoryLinkLabel_W154>C++</span></a><button aria-label="Expand sidebar category 'C++'" aria-expanded=false type=button class="clean-btn menu__caret"></button></div><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class=menu__list-item-collapsible><a class="categoryLink_byQd menu__link menu__link--sublist" tabindex=0 href=/docs/guide/go/><span title=Go class=categoryLinkLabel_W154>Go</span></a><button aria-label="Expand sidebar category 'Go'" aria-expanded=false type=button class="clean-btn menu__caret"></button></div><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class=menu__list-item-collapsible><a class="categoryLink_byQd menu__link menu__link--sublist" tabindex=0 href=/docs/guide/javascript/><span title=JavaScript class=categoryLinkLabel_W154>JavaScript</span></a><button aria-label="Expand sidebar category 'JavaScript'" aria-expanded=false type=button class="clean-btn menu__caret"></button></div><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class=menu__list-item-collapsible><a class="categoryLink_byQd menu__link menu__link--sublist" tabindex=0 href=/docs/guide/csharp/><span title=C# class=categoryLinkLabel_W154>C#</span></a><button aria-label="Expand sidebar category 'C#'" aria-expanded=false type=button class="clean-btn menu__caret"></button></div><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class=menu__list-item-collapsible><a class="categoryLink_byQd menu__link menu__link--sublist" tabindex=0 href=/docs/guide/swift/><span title=Swift class=categoryLinkLabel_W154>Swift</span></a><button aria-label="Expand sidebar category 'Swift'" aria-expanded=false type=button class="clean-btn menu__caret"></button></div><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class=menu__list-item-collapsible><a class="categoryLink_byQd menu__link menu__link--sublist" tabindex=0 href=/docs/guide/dart/><span title=Dart class=categoryLinkLabel_W154>Dart</span></a><button aria-label="Expand sidebar category 'Dart'" aria-expanded=false type=button class="clean-btn menu__caret"></button></div><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class=menu__list-item-collapsible><a class="categoryLink_byQd menu__link menu__link--sublist" tabindex=0 href=/docs/guide/scala/><span title=Scala class=categoryLinkLabel_W154>Scala</span></a><button aria-label="Expand sidebar category 'Scala'" aria-expanded=false type=button class="clean-btn menu__caret"></button></div><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class=menu__list-item-collapsible><a class="categoryLink_byQd menu__link menu__link--sublist" tabindex=0 href=/docs/guide/kotlin/><span title=Kotlin class=categoryLinkLabel_W154>Kotlin</span></a><button aria-label="Expand sidebar category 'Kotlin'" aria-expanded=false type=button class="clean-btn menu__caret"></button></div><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class=menu__list-item-collapsible><a class="categoryLink_byQd menu__link menu__link--sublist" tabindex=0 href=/docs/guide/xlang/><span title="Cross Language" class=categoryLinkLabel_W154>Cross Language</span></a><button aria-label="Expand sidebar category 'Cross Language'" aria-expanded=false type=button class="clean-btn menu__caret"></button></div></ul></ul></nav></div></div></aside><main class=docMainContainer_TBSr><div class="container padding-top--md padding-bottom--lg"><div class=row><div class="col docItemCol_VOVn"><div class=docItemContainer_Djhp><article><nav class="theme-doc-breadcrumbs breadcrumbsContainer_Z_bl" aria-label=Breadcrumbs><ul class=breadcrumbs><li class=breadcrumbs__item><a aria-label="Home page" class=breadcrumbs__link href=/><svg viewBox="0 0 24 24" class=breadcrumbHomeIcon_YNFT><path d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z" fill=currentColor /></svg></a><li class=breadcrumbs__item><span class=breadcrumbs__link>Schema IDL & Compiler</span><li class="breadcrumbs__item breadcrumbs__item--active"><span class=breadcrumbs__link>FlatBuffers IDL Support</span></ul></nav><span class="theme-doc-version-badge badge badge--secondary">Version: 1.3.0</span><div class="tocCollapsible_ETCw theme-doc-toc-mobile tocMobile_ITEo"><button type=button class="clean-btn tocCollapsibleButton_TO0P">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>FlatBuffers IDL Support</h1></header><p>This page explains how Apache Fory consumes FlatBuffers schemas (<code>.fbs</code>) and |
| translates them into Fory IR for code generation.</p> |
| <h2 class="anchor anchorTargetStickyNavbar_Vzrq" id=what-this-page-covers>What This Page Covers<a href=#what-this-page-covers class=hash-link aria-label="Direct link to What This Page Covers" title="Direct link to What This Page Covers" translate=no></a></h2> |
| <ul> |
| <li class="">When to use FlatBuffers input with Fory</li> |
| <li class="">Exact FlatBuffers to Fory mapping behavior</li> |
| <li class="">Supported Fory-specific attributes in <code>.fbs</code></li> |
| <li class="">Adoption notes and generated-code differences</li> |
| </ul> |
| <h2 class="anchor anchorTargetStickyNavbar_Vzrq" id=why-use-apache-fory>Why Use Apache Fory<a href=#why-use-apache-fory class=hash-link aria-label="Direct link to Why Use Apache Fory" title="Direct link to Why Use Apache Fory" translate=no></a></h2> |
| <ul> |
| <li class="">Idiomatic generated code: Fory generates language-idiomatic classes/structs |
| that can be used directly as domain objects.</li> |
| <li class="">Java performance: In Java object-serialization workloads, Fory is faster than |
| FlatBuffers in Fory benchmarks.</li> |
| <li class="">Other languages: serialization performance is generally in a similar range.</li> |
| <li class="">Deserialization in practice: FlatBuffers can be faster when callers read |
| directly from its buffer, but applications that need native objects still |
| require conversion, and that conversion step can dominate read cost. In those |
| cases, Fory deserialization is often faster end-to-end.</li> |
| <li class="">Easier APIs: Fory uses direct native objects, so you do not need to |
| reverse-build tables or manually manage offsets.</li> |
| <li class="">Better graph modeling: Shared and circular references are first-class features |
| in Fory.</li> |
| </ul> |
| <h2 class="anchor anchorTargetStickyNavbar_Vzrq" id=quick-decision-guide>Quick Decision Guide<a href=#quick-decision-guide class=hash-link aria-label="Direct link to Quick Decision Guide" title="Direct link to Quick Decision Guide" translate=no></a></h2> |
| <table><thead><tr><th>Situation<th>Recommended Path<tbody><tr><td>You already have <code>.fbs</code> schemas and want Fory APIs/codegen<td>Use FlatBuffers input<tr><td>You are starting new schema work and want full Fory syntax control<td>Use native Fory IDL<tr><td>You need FlatBuffers wire compatibility<td>Keep FlatBuffers stack<tr><td>You need Fory object-graph semantics (<code>ref</code>, weak refs, etc.)<td>Use Fory</table> |
| <h2 class="anchor anchorTargetStickyNavbar_Vzrq" id=flatbuffers-to-fory-mapping>FlatBuffers to Fory Mapping<a href=#flatbuffers-to-fory-mapping class=hash-link aria-label="Direct link to FlatBuffers to Fory Mapping" title="Direct link to FlatBuffers to Fory Mapping" translate=no></a></h2> |
| <h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=schema-level-rules>Schema-Level Rules<a href=#schema-level-rules class=hash-link aria-label="Direct link to Schema-Level Rules" title="Direct link to Schema-Level Rules" translate=no></a></h3> |
| <ul> |
| <li class=""><code>namespace</code> maps to Fory package namespace.</li> |
| <li class=""><code>include</code> entries map to Fory imports.</li> |
| <li class=""><code>table</code> is translated as <code>evolving=true</code>.</li> |
| <li class=""><code>struct</code> is translated as <code>evolving=false</code>.</li> |
| <li class=""><code>root_type</code> is parsed but ignored by Fory codegen.</li> |
| <li class=""><code>file_identifier</code> and <code>file_extension</code> are parsed but not used by Fory codegen.</li> |
| </ul> |
| <h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=field-numbering>Field Numbering<a href=#field-numbering class=hash-link aria-label="Direct link to Field Numbering" title="Direct link to Field Numbering" translate=no></a></h3> |
| <p>FlatBuffers fields do not have explicit field IDs. Fory assigns field numbers by |
| source declaration order, starting at <code>1</code>.</p> |
| <h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=scalar-type-mapping>Scalar Type Mapping<a href=#scalar-type-mapping class=hash-link aria-label="Direct link to Scalar Type Mapping" title="Direct link to Scalar Type Mapping" translate=no></a></h3> |
| <table><thead><tr><th>FlatBuffers<th>Fory Type<tbody><tr><td><code>byte</code><td><code>int8</code><tr><td><code>ubyte</code><td><code>uint8</code><tr><td><code>short</code><td><code>int16</code><tr><td><code>ushort</code><td><code>uint16</code><tr><td><code>int</code><td><code>int32</code><tr><td><code>uint</code><td><code>uint32</code><tr><td><code>long</code><td><code>int64</code><tr><td><code>ulong</code><td><code>uint64</code><tr><td><code>float</code><td><code>float32</code><tr><td><code>double</code><td><code>float64</code><tr><td><code>bool</code><td><code>bool</code><tr><td><code>string</code><td><code>string</code></table> |
| <p>Vectors (<code>[T]</code>) map to Fory lists.</p> |
| <h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=unions>Unions<a href=#unions class=hash-link aria-label="Direct link to Unions" title="Direct link to Unions" translate=no></a></h3> |
| <p>FlatBuffers unions map to Fory unions.</p> |
| <ul> |
| <li class="">Case IDs are assigned by declaration order, starting at <code>1</code>.</li> |
| <li class="">Case names are derived from type names using snake_case field naming.</li> |
| </ul> |
| <p><strong>FlatBuffers</strong></p> |
| <div class="language-fbs codeBlockContainer_Ckt0 theme-code-block" style=--prism-color:#393A34;--prism-background-color:#f6f8fa><div class=codeBlockContent_QJqH><pre tabindex=0 class="prism-code language-fbs codeBlock_bY9V thin-scrollbar" style=color:#393A34;background-color:#f6f8fa><code class=codeBlockLines_e6Vv><div class=token-line style=color:#393A34><span class="token plain">union Payload {</span><br/></div><div class=token-line style=color:#393A34><span class="token plain"> Note,</span><br/></div><div class=token-line style=color:#393A34><span class="token plain"> Metric</span><br/></div><div class=token-line style=color:#393A34><span class="token plain">}</span><br/></div><div class=token-line style=color:#393A34><span class="token plain" style=display:inline-block></span><br/></div><div class=token-line style=color:#393A34><span class="token plain">table Container {</span><br/></div><div class=token-line style=color:#393A34><span class="token plain"> payload: Payload;</span><br/></div><div class=token-line style=color:#393A34><span class="token plain">}</span><br/></div></code></pre></div></div> |
| <p><strong>Fory shape after translation</strong></p> |
| <div class="language-protobuf codeBlockContainer_Ckt0 theme-code-block" style=--prism-color:#393A34;--prism-background-color:#f6f8fa><div class=codeBlockContent_QJqH><pre tabindex=0 class="prism-code language-protobuf codeBlock_bY9V thin-scrollbar" style=color:#393A34;background-color:#f6f8fa><code class=codeBlockLines_e6Vv><div class=token-line style=color:#393A34><span class="token plain">union Payload </span><span class="token punctuation" style=color:#393A34>{</span><span class="token plain"></span><br/></div><div class=token-line style=color:#393A34><span class="token plain"> </span><span class="token positional-class-name class-name">Note</span><span class="token plain"> note </span><span class="token operator" style=color:#393A34>=</span><span class="token plain"> </span><span class="token number" style=color:#36acaa>1</span><span class="token punctuation" style=color:#393A34>;</span><span class="token plain"></span><br/></div><div class=token-line style=color:#393A34><span class="token plain"> </span><span class="token positional-class-name class-name">Metric</span><span class="token plain"> metric </span><span class="token operator" style=color:#393A34>=</span><span class="token plain"> </span><span class="token number" style=color:#36acaa>2</span><span class="token punctuation" style=color:#393A34>;</span><span class="token plain"></span><br/></div><div class=token-line style=color:#393A34><span class="token plain"></span><span class="token punctuation" style=color:#393A34>}</span><span class="token plain"></span><br/></div><div class=token-line style=color:#393A34><span class="token plain" style=display:inline-block></span><br/></div><div class=token-line style=color:#393A34><span class="token plain"></span><span class="token keyword" style=color:#00009f>message</span><span class="token plain"> </span><span class="token class-name">Container</span><span class="token plain"> </span><span class="token punctuation" style=color:#393A34>{</span><span class="token plain"></span><br/></div><div class=token-line style=color:#393A34><span class="token plain"> </span><span class="token positional-class-name class-name">Payload</span><span class="token plain"> payload </span><span class="token operator" style=color:#393A34>=</span><span class="token plain"> </span><span class="token number" style=color:#36acaa>1</span><span class="token punctuation" style=color:#393A34>;</span><span class="token plain"></span><br/></div><div class=token-line style=color:#393A34><span class="token plain"></span><span class="token punctuation" style=color:#393A34>}</span><br/></div></code></pre></div></div> |
| <h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=services>Services<a href=#services class=hash-link aria-label="Direct link to Services" title="Direct link to Services" translate=no></a></h3> |
| <p>FlatBuffers <code>rpc_service</code> definitions are translated to Fory services. With |
| <code>--grpc</code>, the compiler emits gRPC service companions for supported outputs such |
| as Java, Python, Go, Rust, C#, Dart, Scala, Kotlin, and JavaScript. JavaScript |
| browser clients are generated with <code>--grpc-web</code>. These companions use Fory |
| serialization for request and response payloads.</p> |
| <div class="language-fbs codeBlockContainer_Ckt0 theme-code-block" style=--prism-color:#393A34;--prism-background-color:#f6f8fa><div class=codeBlockContent_QJqH><pre tabindex=0 class="prism-code language-fbs codeBlock_bY9V thin-scrollbar" style=color:#393A34;background-color:#f6f8fa><code class=codeBlockLines_e6Vv><div class=token-line style=color:#393A34><span class="token plain">rpc_service SearchService {</span><br/></div><div class=token-line style=color:#393A34><span class="token plain"> Lookup(SearchRequest):SearchResponse;</span><br/></div><div class=token-line style=color:#393A34><span class="token plain"> StreamLookup(SearchRequest):SearchResponse (streaming: "server");</span><br/></div><div class=token-line style=color:#393A34><span class="token plain">}</span><br/></div></code></pre></div></div> |
| <div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style=--prism-color:#393A34;--prism-background-color:#f6f8fa><div class=codeBlockContent_QJqH><pre tabindex=0 class="prism-code language-bash codeBlock_bY9V thin-scrollbar" style=color:#393A34;background-color:#f6f8fa><code class=codeBlockLines_e6Vv><div class=token-line style=color:#393A34><span class="token plain">foryc api.fbs </span><span class="token parameter variable" style=color:#36acaa>--java_out</span><span class="token operator" style=color:#393A34>=</span><span class="token plain">./generated/java </span><span class="token parameter variable" style=color:#36acaa>--python_out</span><span class="token operator" style=color:#393A34>=</span><span class="token plain">./generated/python </span><span class="token parameter variable" style=color:#36acaa>--go_out</span><span class="token operator" style=color:#393A34>=</span><span class="token plain">./generated/go </span><span class="token parameter variable" style=color:#36acaa>--rust_out</span><span class="token operator" style=color:#393A34>=</span><span class="token plain">./generated/rust </span><span class="token parameter variable" style=color:#36acaa>--csharp_out</span><span class="token operator" style=color:#393A34>=</span><span class="token plain">./generated/csharp </span><span class="token parameter variable" style=color:#36acaa>--dart_out</span><span class="token operator" style=color:#393A34>=</span><span class="token plain">./generated/dart </span><span class="token parameter variable" style=color:#36acaa>--scala_out</span><span class="token operator" style=color:#393A34>=</span><span class="token plain">./generated/scala </span><span class="token parameter variable" style=color:#36acaa>--kotlin_out</span><span class="token operator" style=color:#393A34>=</span><span class="token plain">./generated/kotlin </span><span class="token parameter variable" style=color:#36acaa>--javascript_out</span><span class="token operator" style=color:#393A34>=</span><span class="token plain">./generated/javascript </span><span class="token parameter variable" style=color:#36acaa>--grpc</span><br/></div></code></pre></div></div> |
| <p>Generated service code imports grpc APIs, so applications must provide grpc-java, |
| grpc-kotlin, Scala grpc-java APIs, <code>grpcio</code>, grpc-go, Rust <code>tonic</code> and <code>bytes</code>, |
| <code>@grpc/grpc-js</code>, C# <code>Grpc.Core.Api</code> plus server/client dependencies, or Dart |
| <code>package:grpc</code> when they compile or run those files. Python companions use |
| <code>grpc.aio</code> by default and can be generated in sync mode with |
| <code>--grpc-python-mode=sync</code>. Fory packages do not add gRPC as a hard dependency. |
| Use <code>--grpc-web</code> with JavaScript output to generate browser clients that import |
| <code>grpc-web</code>.</p> |
| <h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=defaults-and-metadata>Defaults and Metadata<a href=#defaults-and-metadata class=hash-link aria-label="Direct link to Defaults and Metadata" title="Direct link to Defaults and Metadata" translate=no></a></h3> |
| <ul> |
| <li class="">FlatBuffers default values are parsed but not applied as Fory defaults.</li> |
| <li class="">Non-Fory metadata attributes are preserved as generic options in IR and may be |
| consumed by downstream tooling.</li> |
| </ul> |
| <h2 class="anchor anchorTargetStickyNavbar_Vzrq" id=fory-specific-attributes-in-flatbuffers>Fory-Specific Attributes in FlatBuffers<a href=#fory-specific-attributes-in-flatbuffers class=hash-link aria-label="Direct link to Fory-Specific Attributes in FlatBuffers" title="Direct link to Fory-Specific Attributes in FlatBuffers" translate=no></a></h2> |
| <p>FlatBuffers metadata attributes use <code>key:value</code>. For Fory-specific options, use |
| <code>fory_</code> (or <code>fory.</code>) prefix in <code>.fbs</code>; the prefix is removed during parsing.</p> |
| <h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=supported-field-attributes>Supported Field Attributes<a href=#supported-field-attributes class=hash-link aria-label="Direct link to Supported Field Attributes" title="Direct link to Supported Field Attributes" translate=no></a></h3> |
| <table><thead><tr><th>FlatBuffers Attribute<th>Effect in Fory<tbody><tr><td><code>fory_ref:true</code><td>Enable reference tracking for the field<tr><td><code>fory_nullable:true</code><td>Mark field optional/nullable<tr><td><code>fory_weak_ref:true</code><td>Enable weak reference semantics and implies <code>ref</code><tr><td><code>fory_thread_safe_pointer:false</code><td>For ref fields, select Rust <code>Rc</code>/<code>RcWeak</code> instead of the default <code>Arc</code>/<code>ArcWeak</code></table> |
| <p>Semantics:</p> |
| <ul> |
| <li class=""><code>fory_weak_ref:true</code> implies <code>ref</code>.</li> |
| <li class=""><code>fory_thread_safe_pointer</code> defaults to <code>true</code>, only takes effect when the field |
| is ref-tracked, and does not change the wire format.</li> |
| <li class="">In Rust codegen, <code>fory_weak_ref:true</code> uses <code>ArcWeak</code> by default and switches to |
| <code>RcWeak</code> only when <code>fory_thread_safe_pointer:false</code> is set.</li> |
| <li class="">For list fields, <code>fory_ref:true</code> applies to list elements.</li> |
| </ul> |
| <p>Example:</p> |
| <div class="language-fbs codeBlockContainer_Ckt0 theme-code-block" style=--prism-color:#393A34;--prism-background-color:#f6f8fa><div class=codeBlockContent_QJqH><pre tabindex=0 class="prism-code language-fbs codeBlock_bY9V thin-scrollbar" style=color:#393A34;background-color:#f6f8fa><code class=codeBlockLines_e6Vv><div class=token-line style=color:#393A34><span class="token plain">table Node {</span><br/></div><div class=token-line style=color:#393A34><span class="token plain"> parent: Node (fory_weak_ref: true);</span><br/></div><div class=token-line style=color:#393A34><span class="token plain"> children: [Node] (fory_ref: true);</span><br/></div><div class=token-line style=color:#393A34><span class="token plain"> local: Node (fory_ref: true, fory_thread_safe_pointer: false);</span><br/></div><div class=token-line style=color:#393A34><span class="token plain">}</span><br/></div></code></pre></div></div> |
| <h2 class="anchor anchorTargetStickyNavbar_Vzrq" id=generated-code-differences>Generated Code Differences<a href=#generated-code-differences class=hash-link aria-label="Direct link to Generated Code Differences" title="Direct link to Generated Code Differences" translate=no></a></h2> |
| <p>Using <code>.fbs</code> as input to Fory still produces normal Fory-generated code, not |
| FlatBuffers <code>ByteBuffer</code>-style APIs.</p> |
| <ul> |
| <li class="">Java, Scala, and Kotlin: JVM model types with Fory metadata and registration helpers</li> |
| <li class="">Python: dataclasses plus registration helpers</li> |
| <li class="">C++, Go, and Rust: native structs and Fory metadata</li> |
| <li class="">JavaScript/TypeScript: TypeScript interfaces and schema helpers</li> |
| <li class="">C#, Swift, and Dart: annotated or macro-based model types with registration helpers</li> |
| </ul> |
| <p>The serialization format is Fory binary protocol, not FlatBuffers wire format.</p> |
| <h2 class="anchor anchorTargetStickyNavbar_Vzrq" id=usage>Usage<a href=#usage class=hash-link aria-label="Direct link to Usage" title="Direct link to Usage" translate=no></a></h2> |
| <p>Compile a FlatBuffers schema directly:</p> |
| <div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style=--prism-color:#393A34;--prism-background-color:#f6f8fa><div class=codeBlockContent_QJqH><pre tabindex=0 class="prism-code language-bash codeBlock_bY9V thin-scrollbar" style=color:#393A34;background-color:#f6f8fa><code class=codeBlockLines_e6Vv><div class=token-line style=color:#393A34><span class="token plain">foryc schema.fbs </span><span class="token parameter variable" style=color:#36acaa>--lang</span><span class="token plain"> java,python </span><span class="token parameter variable" style=color:#36acaa>--output</span><span class="token plain"> ./generated</span><br/></div></code></pre></div></div> |
| <p>Inspect translated schema syntax for debugging:</p> |
| <div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style=--prism-color:#393A34;--prism-background-color:#f6f8fa><div class=codeBlockContent_QJqH><pre tabindex=0 class="prism-code language-bash codeBlock_bY9V thin-scrollbar" style=color:#393A34;background-color:#f6f8fa><code class=codeBlockLines_e6Vv><div class=token-line style=color:#393A34><span class="token plain">foryc schema.fbs --emit-fdl --emit-fdl-path ./translated</span><br/></div></code></pre></div></div> |
| <h2 class="anchor anchorTargetStickyNavbar_Vzrq" id=adoption-notes>Adoption Notes<a href=#adoption-notes class=hash-link aria-label="Direct link to Adoption Notes" title="Direct link to Adoption Notes" translate=no></a></h2> |
| <ol> |
| <li class="">Keep existing <code>namespace</code> values stable to keep type registration stable.</li> |
| <li class="">Review fields that relied on FlatBuffers default literals and set explicit |
| defaults in application code if needed.</li> |
| <li class="">Add <code>fory_ref</code>/<code>fory_weak_ref</code> where object-graph semantics are required.</li> |
| <li class="">Validate generated model behavior with roundtrip tests before replacing |
| existing serialization paths.</li> |
| </ol> |
| <h2 class="anchor anchorTargetStickyNavbar_Vzrq" id=summary>Summary<a href=#summary class=hash-link aria-label="Direct link to Summary" title="Direct link to Summary" translate=no></a></h2> |
| <p>FlatBuffers input lets you reuse existing <code>.fbs</code> schemas while moving to Fory's |
| serialization and code generation model. This is useful for incremental adoption |
| while preserving schema investment and using Fory-native object APIs.</div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="row margin-top--sm theme-doc-footer-edit-meta-row"><div class="col noPrint_WFHX"><a href=https://github.com/apache/fory-site/tree/main/docs/compiler/flatbuffers-idl.md target=_blank rel="noopener noreferrer" class=theme-edit-this-page><svg fill=currentColor height=20 width=20 viewBox="0 0 40 40" class=iconEdit_Z9Sw aria-hidden=true><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"/></g></svg>Edit this page</a></div><div class="col lastUpdated_JAkA"></div></div></footer></article><nav class="docusaurus-mt-lg pagination-nav" aria-label="Docs pages"><a class="pagination-nav__link pagination-nav__link--prev" href=/docs/compiler/generated_code><div class=pagination-nav__sublabel>Previous</div><div class=pagination-nav__label>Generated Code</div></a><a class="pagination-nav__link pagination-nav__link--next" href=/docs/compiler/protobuf_idl_support><div class=pagination-nav__sublabel>Next</div><div class=pagination-nav__label>Protobuf IDL Support</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href=#what-this-page-covers class="table-of-contents__link toc-highlight">What This Page Covers</a><li><a href=#why-use-apache-fory class="table-of-contents__link toc-highlight">Why Use Apache Fory</a><li><a href=#quick-decision-guide class="table-of-contents__link toc-highlight">Quick Decision Guide</a><li><a href=#flatbuffers-to-fory-mapping class="table-of-contents__link toc-highlight">FlatBuffers to Fory Mapping</a><ul><li><a href=#schema-level-rules class="table-of-contents__link toc-highlight">Schema-Level Rules</a><li><a href=#field-numbering class="table-of-contents__link toc-highlight">Field Numbering</a><li><a href=#scalar-type-mapping class="table-of-contents__link toc-highlight">Scalar Type Mapping</a><li><a href=#unions class="table-of-contents__link toc-highlight">Unions</a><li><a href=#services class="table-of-contents__link toc-highlight">Services</a><li><a href=#defaults-and-metadata class="table-of-contents__link toc-highlight">Defaults and Metadata</a></ul><li><a href=#fory-specific-attributes-in-flatbuffers class="table-of-contents__link toc-highlight">Fory-Specific Attributes in FlatBuffers</a><ul><li><a href=#supported-field-attributes class="table-of-contents__link toc-highlight">Supported Field Attributes</a></ul><li><a href=#generated-code-differences class="table-of-contents__link toc-highlight">Generated Code Differences</a><li><a href=#usage class="table-of-contents__link toc-highlight">Usage</a><li><a href=#adoption-notes class="table-of-contents__link toc-highlight">Adoption Notes</a><li><a href=#summary class="table-of-contents__link toc-highlight">Summary</a></ul></div></div></div></div></main></div></div></div><footer class="theme-layout-footer footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="theme-layout-footer-column col footer__col"><div class=footer__title>Community</div><ul class="footer__items clean-list"><li class=footer__item><a href=https://lists.apache.org/list.html?dev@fory.apache.org target=_blank rel="noopener noreferrer" class=footer__link-item>Mailing list<svg width=13.5 height=13.5 aria-label="(opens in new tab)" class=iconExternalLink_nPIU><use href=#theme-svg-external-link /></svg></a><li class=footer__item><a href=https://join.slack.com/t/fory-project/shared_invite/zt-1u8soj4qc-ieYEu7ciHOqA2mo47llS8A target=_blank rel="noopener noreferrer" class=footer__link-item>Slack<svg width=13.5 height=13.5 aria-label="(opens in new tab)" class=iconExternalLink_nPIU><use href=#theme-svg-external-link /></svg></a><li class=footer__item><a href=https://twitter.com/ApacheFory target=_blank rel="noopener noreferrer" class=footer__link-item>Twitter<svg width=13.5 height=13.5 aria-label="(opens in new tab)" class=iconExternalLink_nPIU><use href=#theme-svg-external-link /></svg></a></ul></div><div class="theme-layout-footer-column col footer__col"><div class=footer__title>Docs</div><ul class="footer__items clean-list"><li class=footer__item><a class=footer__link-item href=/docs/start/install>Install</a><li class=footer__item><a class=footer__link-item href=/docs/start/usage>Usage</a><li class=footer__item><a class=footer__link-item href=/docs/introduction/benchmark>Benchmark</a></ul></div><div class="theme-layout-footer-column col footer__col"><div class=footer__title>Repositories</div><ul class="footer__items clean-list"><li class=footer__item><a href=https://github.com/apache/fory target=_blank rel="noopener noreferrer" class=footer__link-item>Apache Fory™<svg width=13.5 height=13.5 aria-label="(opens in new tab)" class=iconExternalLink_nPIU><use href=#theme-svg-external-link /></svg></a><li class=footer__item><a href=https://github.com/apache/fory-site target=_blank rel="noopener noreferrer" class=footer__link-item>Website<svg width=13.5 height=13.5 aria-label="(opens in new tab)" class=iconExternalLink_nPIU><use href=#theme-svg-external-link /></svg></a></ul></div></div><div class="footer__bottom text--center"><div class=margin-bottom--sm><a href=https://apache.org/ rel="noopener noreferrer" class=footerLogoLink_BH7S><img src=/img/asf_logo.svg alt="ASF Logo" class="footer__logo themedComponent_mlkZ themedComponent--light_NVdE" width=200 /><img src=/img/asf_logo.svg alt="ASF Logo" class="footer__logo themedComponent_mlkZ themedComponent--dark_xIcU" width=200 /></a></div><div class=footer__copyright><div> |
| <p> |
| Copyright © 2026 The Apache Software Foundation, Licensed under the Apache License, Version 2.0. <br/> |
| Apache Fory, Fory, Apache, the Apache Logo and the Apache Fory logo are either registered trademarks or trademarks of the Apache Software Foundation in the United States and/or other countries. |
| </p> |
| </div></div></div></div></footer></div></body> |