wright 0.10.1

The wright programming language compiler and tooling.
Documentation
# PACKAGE METADATA
[package]
name = "wright"
description = "The wright programming language compiler and tooling."
license = "MIT"
version = "0.10.1"
authors = ["Venus Xeon-Blonde <venusflameblonde@gmail.com>"]
repository = "https://github.com/vcfxb/wright-lang"
documentation = "https://docs.rs/wright"
readme = "../README.md"
keywords = ["wright", "language", "bytecode", "compiler", "interpreter"]
edition.workspace = true
rust-version.workspace = true

# DOC.RS SPECIFIC METADATA
[package.metadata.docs.rs]
features = ["wright_library_defaults"]

# CRATES.IO BADGES
[badges]
maintenance = {status = "actively-developed"}

# LIBRARY METADATA
[lib]
name = "wright"
test = true
doctest = true
doc = true

# BINARIES
[[bin]]
name = "wright"
test = false
doc = false
doctest = false
required-features = []

# BENCHMARKS
[[bench]]
name = "lexer"
harness = false

[[bench]]
name = "parser"
harness = false

# FEATURE FLAGS
# These are used to determine which parts of the crate are compiled/available.
[features]

# By default include everything required for building the wright binary, which includes everything used for building 
# wright as a library.  
# Also include support for detecting unicode capabilities on the host terminal.
default = [
    "wright_binary",
    "supports-unicode"
]

# Features and dependencies required for the wright binary (currently just the library defaults and `clap`).
wright_binary = [
    "wright_library_defaults", 
    "dep:clap"
]

# Features and dependencies useful when the wright binary is not being built or used. 
wright_library_defaults = [
    "file_memmap", 
    "parser"
]

# Wright's parser depends on the ability to report parsing errors and construct AST models.
parser = [
    "reporting",
    "ast-models",
    "lexer"
]

# Wright's abstract syntax tree model is built on types from the "source_tracking" module.
ast-models = [
    "source-tracking",
    "dep:num"
]

# Wright's lexical analyzer is build using types from the "source_tracking" module.
lexer = [
    "source-tracking",
    "dep:unicode-ident"
]

# Loading memory mapped files from the disk requires memmap2, fs4, and the reporting feature to correctly and efficiently 
# read from disk. We also use `anyhow` to make error handling easier.
file_memmap = [
    "reporting",
    "dep:memmap2",
    "dep:fs4"
]

# Reporting errors requires source tracking, codespan-reporting (for rendering diagnostics), and 
# termcolor (for pretty output).
reporting = [
    "source-tracking", 
    "dep:termcolor",
    "dep:codespan-reporting"
]

# Source tracking requires just a few dependencies and standard library. 
source-tracking = [
    "std",
    "dep:dashmap",
    "derive_more/display",
]

# Optional dependency that enables terminal unicode support selection.
# There are fallbacks -- this is not required for anything else.
supports-unicode = [
    "dep:supports-unicode"
]

# Feature flag to indicate use of the standard library.
std = [
    "derive_more?/std"
]

# Feature flag indicating no features are enabled. 
none = []

# SIMPLE DEPENDENCIES: 
[dependencies]

# DEPENDENCIES:

# Use supports-unicode to determine how we display tokens to the user in debug commands.
# Optional -- can be used in debugging token outputs.
[dependencies.supports-unicode]
version = "3.0.0"
optional = true

# Num gives us integer types of unbound size/domain.
# Used in AST node representations for integer literals.
[dependencies.num]
version = "0.4"
optional = true

# Unicode identifier functions.
# Used by:
# - "parser"
[dependencies.unicode-ident]
version = "1.0"
optional = true

# derive_more is used for allowing us to derive additional traits like From and Display.
# Currently used by features: 
# - "source-tracking"
[dependencies.derive_more]
version = "2"
default-features = false
optional = true

# dashmap is used as a fast, concurrent hash map implementation 
# Optional since it's used for source tracking, which can be turned off. 
[dependencies.dashmap]
version = "6.0.1"
features = ["rayon"]
optional = true

# codespan-reporting is the internal engine used to render diagnostics.
# Optional since it's only used when error reporting is required. 
[dependencies.codespan-reporting]
version = "0.11.1"
optional = true

# Terminal output colors
# Optional: Required for reporting.
[dependencies.termcolor]
version = "1.4.1"
optional = true

# Memory mapped files. 
# Optional: Required for memmory mapped file access. 
[dependencies.memmap2]
version = "0.9.3"
optional = true

# Portable (windows, mac, linux) file locking
# Optional: Required for memmory mapped file access. 
[dependencies.fs4] 
version = "0.12.0"
features = ["sync"]
optional = true

# Comand-line interface generator
# Optional: Used only by the wright binary. 
[dependencies.clap]
version = "4"
features = ["derive"]
optional = true

# TODO: LLVM has been removed until I'm actually using it and have a better build system to go against it.
# (currently the state of it breaking docs.rs builds and complicating everything else makes me kinda sad).
# # Unsafe bindings to LLVM 
# # See https://llvm.org/.
# # Optional: Currently not required by anything yet.
# [dependencies.llvm-sys]
# version = "181"
# features = ["force-static"]
# optional = true

# TEST DEPENDENCIES
[dev-dependencies]

# Criterion is used for benchmarking. 
criterion = "0.5.1"

# Rayon is used to do various brute-force tests in parallel
rayon = "1.8.0"

# indoc is used for indentation in tests
indoc = "2.0.5"

# For creating in memory buffers to test reporting. 
termcolor = "1.4.1"

# BUILD DEPENDENCIES
[build-dependencies]

# Used for showing feature/cfg info on rustdoc/docs.rs. 
rustc_version = "0.4.0"

# Used for capturing build time and platform information and making it available at runtime. 
built = "0.7"