-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement bindings for Turbopack trace server (#8094)
### Description Implement turbopack_bindings for the trace server. Added under `turbopack_bindings::turbopack::trace_server`. Currently only exposing one function: `turbopack_bindings::turbopack::trace_server::start_turbopack_trace_server` <!-- ✍️ Write a short summary of your work. If necessary, include relevant screenshots. --> ### Testing Instructions <!-- Give a quick description of steps to test your changes. -->
- Loading branch information
1 parent
533dd97
commit 45a8742
Showing
5 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#![feature(iter_intersperse)] | ||
#![feature(hash_raw_entry)] | ||
#![feature(box_patterns)] | ||
|
||
use std::{path::PathBuf, sync::Arc}; | ||
|
||
use self::{reader::TraceReader, server::serve, store_container::StoreContainer}; | ||
|
||
mod bottom_up; | ||
mod reader; | ||
mod self_time_tree; | ||
mod server; | ||
mod span; | ||
mod span_bottom_up_ref; | ||
mod span_graph_ref; | ||
mod span_ref; | ||
mod store; | ||
mod store_container; | ||
mod u64_empty_string; | ||
mod u64_string; | ||
mod viewer; | ||
|
||
pub fn start_turbopack_trace_server(path: PathBuf) { | ||
let store = Arc::new(StoreContainer::new()); | ||
let reader = TraceReader::spawn(store.clone(), path); | ||
|
||
serve(store).unwrap(); | ||
|
||
reader.join().unwrap(); | ||
} |