Skip to main content

Crate rolldown_common

Crate rolldown_common 

Source

Re-exports§

pub use bundler_options::*;

Modules§

bundler_options
This module is to help rolldown crate could export types related bundler options easily. rolldown crate could use pub use rolldown_common::bundler_options::*; to export all types, so we don’t need write the same code in rolldown crate again.
dynamic_import_usage
side_effects

Structs§

AddEntryModuleMsg
AddonRenderContext
Asset
Assets is final output of the bundling process. Inputs -> Modules -> Chunks -> Assets
AstScopeIdx
AstScopes
BarrelInfo
BarrelState
State for lazy barrel optimization
Chunk
ChunkIdx
ChunkMeta
ChunkTable
ClientHmrInput
Per-client input for selecting the factories an HMR push ships. The server never sees execution state — the selection reads only shipped[C], the record of the server’s own deliveries (module stable id → rebuild stamp of the copy this client holds).
ClientHmrUpdate
ConstExportMeta
CrossChunkImportItem
DebugStmtInfoForTreeShaking
DeferSyncScanData
DynamicImportExprInfo
Information about a dynamic import expression, used to track the relationship between an import record and its source location in the AST.
EcmaAssetMeta
EcmaModuleAstUsage
EcmaRelated
EcmaView
EcmaViewMeta
EmittedAsset
EmittedChunk
EmittedChunkInfo
EmittedPrebuiltChunk
EntryPoint
ExportSource
ExternalModule
ExternalModuleIdx
ExternalModuleTaskResult
FileEmitter
FlatOptions
A flat options struct to avoid passing &SharedNormalizedBundlerOptions everywhere. which also make accessing frequently used options faster.
HmrBoundary
HmrInfo
HmrLazyChunkOutput
HmrPatch
HmrStampTable
Dev-engine-wide rebuild-stamp table backing the versioned shipped map: the server numbers every rebuild and blind-stamps latest[m] = rebuild_seq for each changed module, so latest[m] > shipped[C][m] reads exactly “this client’s copy of m is stale”.
ImportAttribute
ImportRecordIdx
ImportRecordMeta
ImportRecordStateInit
ImporterRecord
InsChunkIdx
InstantiatedChunk
InstantiatedChunks are derived from Chunks. Different InstantiatedChunks can be derived from the same Chunk by different Generators.
LazyBarrelInfo
LocalExport
This is a representation for statements like
MemberExprProp
A single property access in a member expression chain.
MemberExprRef
For member expression, e.g. foo_ns.bar_ns.c
MemberExprRefResolution
ModuleGroup
ModuleId
ModuleId is the unique string identifier for each module.
ModuleIdx
ModuleInfo
ModuleNamespaceIncludedReason
ModuleRenderOutput
ModuleTable
ModuleTagBitSet
A u64-based bitset for module tags.
ModuleTagRegistry
Registry for tag bit allocation. Built-in tags use fixed consts on ModuleTag. Custom tag support will be added in a future phase.
Modules
NamedImport
This is a representation for statements like
NamespaceAlias
NormalModule
NormalModuleTaskResult
OutputAsset
OutputChunk
OutputsDiagnostics
PackageJson
PluginIdx
PreliminaryFilename
Represents a filename that might contains hash placeholder.
PrependRenderedImport
RenderedConcatenatedModuleParts
RenderedModule
ResolvedExport
ResolvedId
RetainedExportSymbols
The retained export interface: symbols of resolved exports that survived tree-shaking (either genuinely referenced or kept by interface policy — entry exports, CJS bailout, eval).
RollupPreRenderedAsset
RollupPreRenderedChunk
RollupRenderedChunk
RuntimeModuleBrief
RuntimeModuleTaskResult
SourcemapAssetMeta
StableModuleId
StableModuleId is the stabilized version of ModuleId.
StmtEvalFlags
Facts used by tree shaking while evaluating a statement.
StmtInfo
StmtInfoIdx
StmtInfoMeta
StmtInfos
SymbolRef
SymbolRef is used to represent a symbol in a module when there are multiple modules.
SymbolRefDb
SymbolRefDbForModule
SymbolRefFlags
TaggedSymbolRef
A SymbolRef plus a one-bit “link-only” tag, packed into the same 8 bytes as a bare SymbolRef (instead of the 12 bytes a enum { LinkOnly(SymbolRef), Normal(SymbolRef) } would cost, since two payload-carrying variants force a separate, 4-byte-aligned discriminant).
UsedExternalSymbols
Symbols owned by external modules that are used by included code.
UsedSymbolRefs
The sealed record of inclusion-fixpoint liveness: symbols the inclusion machinery decided are needed as bindings — refs referenced by included statements (in both their original and canonical forms) plus interface-policy retentions (entry exports, CJS bailout, eval-kept imports). Constants that get inlined are deliberately absent (never inserted — their use sites are replaced with the value; constants that must stay bindings, e.g. entry exports, are present), and a normal module’s namespace ref is not authoritative here — the generate stage decides namespace retention separately, on LinkingMetadata::namespace_included.
UsedSymbolRefsBuilder
The mutable phase of UsedSymbolRefs, held only by the inclusion machinery (the link-stage fixpoint, the chunk optimizer’s re-run of it, and the generate stage’s unused-runtime-module sweep).

Enums§

BundleMode
ChunkDebugInfo
Debug information attached to chunks when experimental.attachDebugInfo: 'full' is enabled.
ChunkKind
ChunkReasonType
ConcatenateWrappedModuleKind
We only concatenate wrapped modules when WrapKind is Esm
ConstantValue
EntryPointKind
ExportOrigin
Where a named export’s value comes from: the module’s own declaration, or a re-export of an import.
ExportsKind
FacadeChunkEliminationReason
The specific optimization scenario that led to a facade chunk being eliminated.
HmrUpdate
The server never decides a boundary-walk reload: it ships a superset patch and the client’s own graph walk decides per tab whether to hot-apply, skip, or reload itself. FullReload remains for invalidations only the server can see — e.g. a tsconfig change re-transforms every governed module, which no patch can represent.
HybridIndexVec
ImportKind
ImportedExports
What exports are needed from a module
InstantiationKind
Interop
MemberExprObjectReferencedType
Module
ModuleDefFormat
Module Definition Format.
ModuleIdKind
Classification of a ModuleId’s string identity.
ModuleLoaderMsg
ModuleRenderArgs
ModuleTag
Module tag enum. Built-in tags have fixed bit indices for zero-cost matching. Custom(String) is reserved for future user-defined tags.
Output
PostChunkOptimizationOperation
Tracks post-optimization operations applied to chunks during code splitting. A chunk present in the map has been removed and merged into another chunk.
ResolvedExternal
ScanMode
SourceMapGenMsg
SourcemapChainElement
Specifier
StrOrBytes
SymbolOrMemberExprRef
ThisExprReplaceKind
WatcherChangeKind
WrapKind

Constants§

RUNTIME_MODULE_ID
RUNTIME_MODULE_KEY

Traits§

GetLocalDb
GetLocalDbMut
IdxDebugExt
SourceMutation

Functions§

common_debug_symbol_ref
passing a SymbolRef, it will return it’s string repr, the format: ${stable_id} -> ${symbol_name}
generate_replace_this_expr_map
get_leading_comment
Get the leading comment of a node when condition is satisfy
json_value_to_ecma_ast
Converts a serde_json::Value to an EcmaAst.
json_value_to_expression
Converts a serde_json::Value to an oxc Expression.
try_extract_lazy_barrel_info
Try to extract BarrelInfo from EcmaView for lazy barrel optimization

Type Aliases§

DeclaredSymbols
Storage for the symbols a statement declares.
IndexModules
MemberExprRefResolutionMap
ModuleScopeSymbolIdMap
RawImportRecord
ResolvedImportRecord
SharedFileEmitter
SharedModuleInfoDashMap