Implementation:Alibaba MNN FlatBuffers IDL Gen Lobster
Appearance
| Knowledge Sources | |
|---|---|
| Domains | Serialization, Code_Generation |
| Last Updated | 2026-02-10 12:00 GMT |
Overview
Lobster code generator backend that produces FlatBuffers accessor functions for the Lobster programming language.
Description
idl_gen_lobster.cpp implements the Lobster code generation backend for flatc. Lobster is a statically-typed game programming language, and this generator emits Lobster functions and classes that provide zero-copy read access to FlatBuffer data. The generated code integrates with Lobster's built-in FlatBuffers runtime support.
Usage
Vendored dependency used internally by MNN for model serialization. Not directly imported by end users.
Code Reference
Source Location
- Repository: Alibaba_MNN
- File:
3rd_party/flatbuffers/src/idl_gen_lobster.cpp - Lines: 1-373
Signature
namespace flatbuffers {
bool GenerateLobster(const Parser &parser,
const std::string &path,
const std::string &file_name);
}
Import
#include "flatbuffers/idl.h"
// Generator invoked internally by flatc
I/O Contract
| Input | Output |
|---|---|
| Parsed Parser object with schema definitions | *_generated.lobster Lobster source file
|
Usage Examples
// Invoked by flatc:
// flatc --lobster schema.fbs
// Internally:
flatbuffers::Parser parser;
parser.Parse(schema);
flatbuffers::GenerateLobster(parser, output_path, file_name);
Related Pages
Page Connections
Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment