Cargo Features
[dependencies]
syntect-no-panic = { version = "4.6.1", default-features = false, features = ["dump-load-rs", "dump-load", "dump-create", "dump-create-rs", "regex-fancy", "regex-onig", "parsing", "metadata", "assets", "html", "plist-load", "yaml-load", "default-onig", "default-fancy"] }
- dump-load-rs = bincode
-
If you enable two dump loading features or two creation features the build will fail, choose one of each. If you are using both creation and loading, your binary will be smaller if you choose the same one for each.
Pure Rust dump loading, slower than regular
dump-load
Enables rust_backend of flate2
Affects
dumps::from_reader
,dumps::from_binary
,dumps::from_dump_file
,syntect-no-panic::dumps
… - dump-load default-fancy? default-onig = bincode
-
Dump loading using flate2, which depends on the miniz C library.
Enables flate2
Affects
dumps::from_reader
,dumps::from_binary
,dumps::from_dump_file
,syntect-no-panic::dumps
… - dump-create default-fancy? default-onig = bincode
-
Dump creation using flate2, which depends on the miniz C library.
Enables flate2
Affects
dumps::dump_to_writer
,dumps::dump_binary
,dumps::dump_to_file
,syntect-no-panic::dumps
… - dump-create-rs = bincode
-
Pure Rust dump creation, worse compressor so produces larger dumps than dump-create
Enables rust_backend of flate2
Affects
dumps::dump_to_writer
,dumps::dump_binary
,dumps::dump_to_file
,syntect-no-panic::dumps
… - regex-fancy default-fancy? = fancy-regex
- regex-onig default-onig = onig
- parsing default-fancy? default-onig html? metadata? yaml-load? = fnv, regex-syntax
-
Affects
syntect-no-panic::easy
,parsing::syntax_definition
,util::debug_print_ops
… - metadata = parsing, plist-load
-
Support for .tmPreferenes metadata files (indentation, comment syntax, etc)
Affects
parsing::metadata
… - assets default-fancy? default-onig
-
The
assets
feature enables inclusion of the default theme and syntax packages. Forassets
to do anything, it requires one ofdump-load-rs
ordump-load
to be set. - html default-fancy? default-onig = parsing
-
Affects
syntect-no-panic::html
… - plist-load default-fancy? default-onig metadata? = plist
-
Support for parsing .tmTheme files and .tmPreferences files
- yaml-load default-fancy? default-onig = parsing, yaml-rust
-
Support for parsing .sublime-syntax files
- default-onig default = assets, dump-create, dump-load, html, parsing, plist-load, regex-onig, yaml-load
- default-fancy = assets, dump-create, dump-load, html, parsing, plist-load, regex-fancy, yaml-load
-
In order to switch to the fancy-regex engine, disable default features then add the default-fancy feature
- default = default-onig
-
The
default-onig
feature is set by default wheneversyntect-no-panic
is added without
somewhere in the dependency tree.default-features = false
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.