Skip to main content

Crate node_shim

Crate node_shim 

Source
Expand description

Node.js CLI Argument Parser - Rust Implementation

This is a Rust implementation that matches the exact behavior of Node.js CLI argument parsing found in src/node_options.cc and related files.

Based on Node.js source code analysis of:

  • src/node_options.cc (option definitions and parsing logic)
  • src/node_options.h (option structures and types)
  • src/node_options-inl.h (template implementation)
  • src/node.cc (main execution flow)

Structs§

DebugOptions
EnvironmentOptions
HostPort
InspectPublishUid
OptionsParser
ParseResult
PerIsolateOptions
PerProcessOptions
TranslateOptions
Options for controlling translation behavior
TranslatedArgs
Result of translating Node.js CLI args to Deno args

Enums§

OptionEnvvarSettings
OptionType

Functions§

is_deno_subcommand
Check if a string is a Deno subcommand
parse_args
Main parsing function
parse_node_options_env_var
Parse NODE_OPTIONS environment variable
translate_to_deno_args
Translate parsed Node.js CLI arguments to Deno CLI arguments.
wrap_eval_code
Wraps eval code for Node.js compatibility. Makes builtin modules available as global variables.