Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Apart from the
backend
directory, the Packetry source code is currently one big bucket of code. Some of the files, particularlycapture.rs
, are huge. There is no index of what lives where. This makes it difficult for new contributors to find their way around and get started.This PR tries to make it a bit easier for people to find their way around the source code. The main changes are:
ui
module (tree_list_model
,model
,row_data
,item_widget
,record_ui
andtest_replay
).database
module (stream
,data_stream
,index_stream
andcompact_index
).capture
into a newitem
module (ItemSource
,TrafficItem
,DeviceItem
etc) .util
module.This leaves a much more manageable set of files at the top level, including:
main.rs
,cli.rs
andfuzzer.rs
)build.rs
andversion.rs
)usb.rs
,decoder.rs
,capture.rs
,item.rs
,pcap.rs
)There is further work that could be done to break some of the larger files down further and add commentary, but I think this makes for a reasonable start.
There are no functional changes. This PR is purely reorganisation.