runtime

package
v0.3.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyRuntimeFiles

func CopyRuntimeFiles(lang string, outputDir string, silent bool) error

CopyRuntimeFiles copies all runtime files for the specified language to the output directory The files are copied to outputDir/{runtimePackageName}/ where runtimePackageName is typically "pulserpc" for most languages, "PulseRPC" for C#, "com/bitmechanic/pulserpc" for Java If silent is true, no file paths are printed

func CopyRuntimeFilesToPackage

func CopyRuntimeFilesToPackage(lang string, outputDir string, packageName string, silent bool) error

CopyRuntimeFilesToPackage copies all runtime files for the specified language to the output directory using the specified package name (relative to outputDir). If packageName is empty, files are copied directly into outputDir. If silent is true, no file paths are printed

func GetRuntimeFiles

func GetRuntimeFiles(lang string) (map[string][]byte, error)

GetRuntimeFiles returns a map of filename -> file contents for the specified language runtime. It is equivalent to GetRuntimeFilesForStyle(lang, "") and is kept for backwards compatibility with callers that don't care about TypeScript module style.

func GetRuntimeFilesForStyle added in v0.3.5

func GetRuntimeFilesForStyle(lang, style string) (map[string][]byte, error)

GetRuntimeFilesForStyle returns runtime files for a given language and module style. For non-TypeScript languages, style must be empty.

For lang == "ts", style selects between the runtime trees:

  • "" (default), "esm-node", "node", "esm" → ts-node (Node ESM) tree
  • "esm-bundler", "bundler" → ts-node tree; caller must apply the bundler post-process transform to strip the ".js" import suffix
  • "cjs", "commonjs" → ts-cjs (CommonJS) tree

Unknown styles produce an error.

func IsPythonTestFile added in v0.3.1

func IsPythonTestFile(filename string) bool

IsPythonTestFile returns true if the filename is a Python test file

func ListRuntimes

func ListRuntimes() []string

ListRuntimes returns a list of all available embedded runtime languages. Deprecated aliases (e.g. "ts" in addition to "ts-node") are excluded from the list so callers see only canonical names.

Types

This section is empty.

Directories

Path Synopsis
runtimes

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL