dsdlc Options

Every option dsdlc accepts, as the binary itself prints it. This page is generated from --help at publish time, so it carries what the tool in that build accepts.

dsdlc covers what the options are for.

NAME
  dsdlc - DSDL multi-language code generator

SYNOPSIS
  dsdlc --target-language <lang> [options] [target_files_or_root_namespace ...]
  dsdlc --help
  dsdlc --version

LANGUAGES
  ast | mlir | c | cpp | rust | go | ts | python | obj

TARGET OPTIONS
  target_files_or_root_namespace
      One or more DSDL files or root-namespace folders.
      Folder targets expand recursively to .dsdl files unless --no-target-namespaces.
      Colon syntax is supported: <root>:<relative/path/Type.1.0.dsdl>.
  +<selector>
      Target the embedded uavcan catalogue: a namespace (+uavcan.node), a type
      (+uavcan.node.Heartbeat), or a version (+uavcan.node.Heartbeat.1.0).
      Requires --target-language 'mlir' or a codegen language.
  --lookup-dir, -I <dir>
      Repeatable lookup roots for dependency resolution and target root inference.
  --target-language, -l <lang>
      (required) output mode selector.

COMMON OPTIONS
  --help, -h
      Print this help text.
  --version, -V
      Print tool version and exit.
  --verbose, -v
      Increase verbosity (-v, -vv).
  --dry-run, -d
      Run full planning/validation without filesystem writes.
  --outdir, -O <dir>
      Output directory root for codegen languages (default: dsdl_out).
  --allow-unregulated-fixed-port-id
      Allow fixed port IDs outside regulated ranges.
  --warn-aliasable-candidates
      Report each delimited definition that sealing would make @aliasable, and
      each one that a single narrow or misaligned field still stands in the way
      of. Off by default: it answers a question about a type's future rather
      than about the code being generated.
  --aliasable-only
      Emit each type's field accessors and neither its object type nor its
      serialisation. Every targeted type must be @aliasable, or nested by one
      that is; each that is neither fails the run, named.
  --aliasable-views
      Hold each composite field of an @aliasable type as a view of the buffer
      it was deserialised from, in place of a decoded copy: the field's bytes
      and their count, for the nested type's accessors to read. An array of
      such a type is one view per element, a fixed array's held in place and a
      variable-length one's beside its count. The holder's deserialise skips
      the field and its serialise copies the view. A field of a union, and a
      field whose type is wire-flat without asserting it, are decoded as
      usual.

TYPE VERSIONING
  --versioned-type-names
      Put each type's version in its generated type name, so code that handles
      two versions of one type can keep them apart. Off by default: most code
      speaks one version and reads better without the suffix. Output file names
      carry the version either way, so this changes what you write, not what
      you include.
  --all-type-versions
      Generate every available version of each target type. By default, only
      the newest version of each type is generated.
  --no-deprecation-attributes
      Suppress the language-native deprecation attributes that @deprecated
      definitions carry by default in C, C++, and Rust. Use this when a
      -Werror build must keep using deprecated definitions. The deprecation
      notice and metadata constant are emitted regardless.

BUILD SYSTEM INTEGRATION OPTIONS
  --generate-support {always,never,as-needed,only}
      Change the criteria used to enable or disable support code generation.
      Support code is everything not derived from a definition: runtime
      headers and modules, package manifests, and scaffolding.
        as-needed (default) - generate support if it is needed.
        always              - always generate support code.
        never               - never generate support code.
        only                - only generate support code.
  --omit-dependencies
      Emit only explicit targets; dependencies are still resolved and analysed.
  --naming-manifest <file>
      Write a JSON map from each DSDL name to the identifier it is generated
      as, for every target language this invocation names.
      Not written under --dry-run, --list-inputs or --list-outputs.
  --prune-manifest <file>
      Record this run's outputs in <file> and, on the next run, delete the
      outputs it recorded that are no longer produced. One manifest per dsdlc
      invocation. Removals are confined to --outdir. Ignored under --dry-run 
      and the --list-* modes.
  --no-overwrite
      Fail if an output file already exists.
  --file-mode <mode>
      File mode for generated files using auto-base parsing (default: 0o444).
  --jobs, -j <N>
      Worker parallelism hint (N>=1). -j1 ensures no parallelism, however, the inverse
      does not hold: not all backends utilise parallel processing.
  -MD
      Emit make-style .d dependency files alongside generated outputs.
  --list-inputs
      Emit semicolon-separated input file list (implies --dry-run).
  --list-outputs
      Emit semicolon-separated output file list (implies --dry-run).
      When combined with --list-inputs, emits inputs first then one empty separator value.

EXTENDED OPTIONS
  --no-target-namespaces
      Reject folder positional targets.
  --no-embedded-uavcan
      Disable automatic embedded uavcan dependency catalogue for mlir/codegen targets.
  --optimize-lowered-serdes
      Canonicalise the serialise and deserialise bodies, and their helpers, before
      they are translated.
  --encode-reserved-identifiers
      Accept a DSDL name that lands in a target language's reserved identifier
      namespace, encoding the offending characters instead of rejecting the
      definition. Note, this can get ugly even if it's valid.

PATH ARGUMENTS
  A leading '~' is the invoking user's home directory, and '.' and '..' fold away.
  An absolute path is used as given. A relative path naming a file this run writes
  (--naming-manifest, --prune-manifest) is measured from --outdir; one naming a file
  it reads is measured from the working directory.

ENVIRONMENT
   DSDL_INCLUDE_PATH
       Lookup roots, listed like PATH (':' separated, ';' on Windows). Each entry
       is a root namespace, as if passed to --lookup-dir.
  CYPHAL_PATH
       Root namespace parents, listed like PATH. Every immediate subdirectory of
       each entry becomes a lookup root.

BACKEND OPTIONS
  C++:    --cpp-profile <std|pmr|both|autosar>
  Rust:   --rust-crate-name <name>
          --rust-profile <std|no-std-alloc>
          --rust-runtime-specialization <portable|fast>
          --rust-memory-mode <max-inline|inline-then-pool>
          --rust-inline-threshold-bytes <N>
  Go:     --go-module <name>
  TS:     --ts-module <name>
          --ts-runtime-specialization <portable|fast>
  Python: --py-package <name>
          --py-runtime-specialization <portable|fast>
  Object: --target-triple <triple> (default: the host's own)