Cargo Features
[dependencies]
wright = { version = "0.9.2", default-features = false, features = ["wright_binary", "wright_library_defaults", "parser", "ast-models", "lexer", "file_memmap", "reporting", "source-tracking", "supports-unicode", "std", "none"] }
FEATURE FLAGS
These are used to determine which parts of the crate are compiled/available.
- default = supports-unicode, wright_binary
-
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. - wright_binary default = wright_library_defaults
-
Features and dependencies required for the wright binary (currently just the library defaults and
clap
).Enables clap
- wright_library_defaults wright_binary = file_memmap, parser
-
Features and dependencies useful when the wright binary is not being built or used.
- parser wright_library_defaults? = ast-models, lexer, reporting
-
Wright's parser depends on the ability to report parsing errors and construct AST models.
Affects
wright::parser
… - ast-models parser? = source-tracking
-
Wright's abstract syntax tree model is built on types from the "source_tracking" module.
Enables num
Affects
wright::ast
… - lexer parser? = source-tracking
-
Wright's lexical analyzer is build using types from the "source_tracking" module.
Enables unicode-ident
Affects
wright::lexer
… - file_memmap wright_library_defaults? = reporting
-
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.Affects
source::FILE_LOCK_WARNING_TIME
… - reporting file_memmap? parser? = source-tracking
-
Reporting errors requires source tracking, codespan-reporting (for rendering diagnostics), and termcolor (for pretty output).
Enables codespan-reporting and termcolor
termcolor:
For creating in memory buffers to test reporting.
Affects
wright::reporting
… - source-tracking ast-models? lexer? reporting? = std
-
Source tracking requires just a few dependencies and standard library.
Enables dashmap, display of derive_more ^1.0.0
Affects
wright::source_tracking
… - supports-unicode default
-
Optional dependency that enables terminal unicode support selection.
There are fallbacks -- this is not required for anything else.Enables supports-unicode
Affects
supports_unicode::FORCE_ASCII
,supports_unicode::set_force_ascii
… - std source-tracking?
-
Feature flag to indicate use of the standard library.
Enables std of optional derive_more ^1.0.0
- none
-
Feature flag indicating no features are enabled.
Features from optional dependencies
In crates that don't use the dep:
syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.
SIMPLE DEPENDENCIES:
- derive_more source-tracking?
-
Enables derive_more ^1.0.0