File tree Expand file tree Collapse file tree 9 files changed +34
-16
lines changed
cairo-lang-language-server
cairo-lang-sierra-to-casm
cairo-lang-syntax-codegen Expand file tree Collapse file tree 9 files changed +34
-16
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,10 @@ thiserror.workspace = true
2929[dev-dependencies ]
3030test-log.workspace = true
3131
32+ [features ]
33+ env_logger = [" cairo-lang-utils/env_logger" ]
34+
3235[[bin ]]
3336name = " cairo-compile"
3437path = " src/cli.rs"
38+ required-features = [" env_logger" ]
Original file line number Diff line number Diff line change @@ -6,10 +6,6 @@ repository.workspace = true
66license-file.workspace = true
77description = " Cairo formatter."
88
9- [[bin ]]
10- name = " cairo-format"
11- path = " src/bin/cli.rs"
12-
139[dependencies ]
1410anyhow.workspace = true
1511cairo-lang-diagnostics = { path = " ../cairo-lang-diagnostics" , version = " 1.1.0" }
@@ -27,7 +23,14 @@ salsa.workspace = true
2723smol_str.workspace = true
2824
2925[dev-dependencies ]
30- cairo-lang-utils = { path = " ../cairo-lang-utils" , version = " 1.1.0" }
3126pretty_assertions.workspace = true
3227test-case.workspace = true
3328test-log.workspace = true
29+
30+ [features ]
31+ env_logger = [" cairo-lang-utils/env_logger" ]
32+
33+ [[bin ]]
34+ name = " cairo-format"
35+ path = " src/bin/cli.rs"
36+ required-features = [" env_logger" ]
Original file line number Diff line number Diff line change @@ -6,10 +6,6 @@ repository.workspace = true
66license-file.workspace = true
77description = " Cairo language server."
88
9- [[bin ]]
10- name = " cairo-language-server"
11- path = " src/bin/language_server.rs"
12-
139[dependencies ]
1410anyhow.workspace = true
1511cairo-lang-compiler = { path = " ../cairo-lang-compiler" , version = " 1.1.0" }
@@ -39,3 +35,11 @@ tower-lsp.workspace = true
3935
4036[dev-dependencies ]
4137test-log.workspace = true
38+
39+ [features ]
40+ env_logger = [" cairo-lang-utils/env_logger" ]
41+
42+ [[bin ]]
43+ name = " cairo-language-server"
44+ path = " src/bin/language_server.rs"
45+ required-features = [" env_logger" ]
Original file line number Diff line number Diff line change 11use cairo_lang_language_server:: serve_language_service;
2+ use cairo_lang_utils:: logging:: init_logging;
23
34#[ tokio:: main]
45async fn main ( ) {
6+ init_logging ( log:: LevelFilter :: Warn ) ;
57 serve_language_service ( ) . await ;
68}
Original file line number Diff line number Diff line change @@ -42,7 +42,6 @@ use cairo_lang_syntax::node::kind::SyntaxKind;
4242use cairo_lang_syntax:: node:: stable_ptr:: SyntaxStablePtr ;
4343use cairo_lang_syntax:: node:: utils:: is_grandparent_of_kind;
4444use cairo_lang_syntax:: node:: { ast, SyntaxNode , TypedSyntaxNode } ;
45- use cairo_lang_utils:: logging:: init_logging;
4645use cairo_lang_utils:: ordered_hash_set:: OrderedHashSet ;
4746use cairo_lang_utils:: { try_extract_matches, OptionHelper , Upcast } ;
4847use log:: warn;
@@ -69,8 +68,6 @@ pub mod vfs;
6968const MAX_CRATE_DETECTION_DEPTH : usize = 20 ;
7069
7170pub async fn serve_language_service ( ) {
72- init_logging ( log:: LevelFilter :: Warn ) ;
73-
7471 #[ cfg( feature = "runtime-agnostic" ) ]
7572 use tokio_util:: compat:: { TokioAsyncReadCompatExt , TokioAsyncWriteCompatExt } ;
7673
Original file line number Diff line number Diff line change @@ -6,9 +6,6 @@ repository.workspace = true
66license-file.workspace = true
77description = " Emitting of CASM instructions from Sierra code."
88
9- [features ]
10- testing = []
11-
129[dependencies ]
1310anyhow.workspace = true
1411assert_matches.workspace = true
@@ -33,6 +30,11 @@ pretty_assertions.workspace = true
3330test-case.workspace = true
3431test-log.workspace = true
3532
33+ [features ]
34+ testing = []
35+ env_logger = [" cairo-lang-utils/env_logger" ]
36+
3637[[bin ]]
3738name = " sierra-compile"
3839path = " src/cli.rs"
40+ required-features = [" env_logger" ]
Original file line number Diff line number Diff line change @@ -19,6 +19,10 @@ xshell.workspace = true
1919env_logger.workspace = true
2020test-log.workspace = true
2121
22+ [features ]
23+ env_logger = [" cairo-lang-utils/env_logger" ]
24+
2225[[bin ]]
2326name = " generate-syntax"
2427path = " src/generate_syntax.rs"
28+ required-features = [" env_logger" ]
Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ description = "General utilities for the Cairo compiler project."
1010testing = []
1111
1212[dependencies ]
13- env_logger.workspace = true
1413indexmap.workspace = true
1514itertools.workspace = true
1615log.workspace = true
@@ -19,8 +18,10 @@ num-integer.workspace = true
1918num-traits.workspace = true
2019serde.workspace = true
2120time.workspace = true
21+ env_logger = { workspace = true , optional = true }
2222
2323[dev-dependencies ]
2424serde_json.workspace = true
2525test-case.workspace = true
2626test-log.workspace = true
27+ env_logger.workspace = true
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ pub mod collection_arithmetics;
77pub mod extract_matches;
88pub mod graph_algos;
99pub mod iterators;
10+ #[ cfg( feature = "env_logger" ) ]
1011pub mod logging;
1112pub mod ordered_hash_map;
1213pub mod ordered_hash_set;
You can’t perform that action at this time.
0 commit comments