Skip to main content

Crate typr_cli

Crate typr_cli 

Source
Expand description

§TypR CLI

Command-line interface, REPL, and LSP server for TypR - a typed superset of R.

This crate provides the CLI layer for TypR, depending on typr-core for the core logic. It includes:

  • Command-line interface with project management commands
  • Interactive REPL with syntax highlighting
  • Language Server Protocol (LSP) server for IDE integration
  • Filesystem-based source and output handlers

§Usage

# Create a new project
typr new myproject

# Check types
typr check

# Build to R
typr build

# Run
typr run

# Start REPL
typr repl

# Start LSP server
typr lsp

Re-exports§

pub use cli::start;
pub use fs_provider::FileSystemOutputHandler;
pub use fs_provider::FileSystemSourceProvider;
pub use fs_provider::NativePackageChecker;
pub use typr_core;

Modules§

cli
Command-line interface for TypR
engine
Build engine utilities for TypR CLI
fs_provider
FileSystem-based implementations of typr-core traits
io
I/O utilities for TypR CLI
lsp
LSP server for TypR.
lsp_parser
Token resolution and Markdown-highlighted type display for LSP hover.
metaprogramming
Metaprogramming utilities for TypR CLI
project
Project management utilities for TypR CLI
repl
Interactive REPL for TypR
standard_library
Standard library utilities for TypR CLI

Structs§

CompileOutput
Full compilation output
Compiler
Main compiler interface for TypR
InMemoryOutputHandler
In-memory output handler for WASM and testing
InMemorySourceProvider
In-memory source provider for WASM and testing
StubPackageChecker
Stub package checker that does nothing (for WASM)
TranspileResult
Result of transpilation

Enums§

CompileError
Compilation errors

Traits§

OutputHandler
Handles output from transpilation.
PackageChecker
Checks and optionally installs R packages.
SourceProvider
Provides source code content for compilation.