@@ -30,7 +30,9 @@ pub use rerun::{
30
30
coordinates:: { Axis3 , Handedness , Sign , SignedAxis3 } ,
31
31
} ;
32
32
33
+ #[ cfg( feature = "web_viewer" ) ]
33
34
use re_web_viewer_server:: WebViewerServerPort ;
35
+ #[ cfg( feature = "web_viewer" ) ]
34
36
use re_ws_comms:: RerunServerPort ;
35
37
36
38
use crate :: { arrow:: get_registered_component_names, python_session:: PythonSession } ;
@@ -305,6 +307,7 @@ fn connect(addr: Option<String>) -> PyResult<()> {
305
307
}
306
308
307
309
#[ must_use = "the tokio_runtime guard must be kept alive while using tokio" ]
310
+ #[ cfg( feature = "web_viewer" ) ]
308
311
fn enter_tokio_runtime ( ) -> tokio:: runtime:: EnterGuard < ' static > {
309
312
use once_cell:: sync:: Lazy ;
310
313
static TOKIO_RUNTIME : Lazy < tokio:: runtime:: Runtime > =
@@ -341,6 +344,8 @@ fn serve(open_browser: bool, web_port: Option<u16>, ws_port: Option<u16>) -> PyR
341
344
342
345
#[ cfg( not( feature = "web_viewer" ) ) ]
343
346
{
347
+ _ = web_port;
348
+ _ = ws_port;
344
349
_ = open_browser;
345
350
Err ( PyRuntimeError :: new_err (
346
351
"The Rerun SDK was not compiled with the 'web_viewer' feature" ,
@@ -362,7 +367,7 @@ fn start_web_viewer_server(port: u16) -> PyResult<()> {
362
367
363
368
#[ cfg( not( feature = "web_viewer" ) ) ]
364
369
{
365
- _ = open_browser ;
370
+ _ = port ;
366
371
Err ( PyRuntimeError :: new_err (
367
372
"The Rerun SDK was not compiled with the 'web_viewer' feature" ,
368
373
) )
0 commit comments