Repository: calyxir/calyx (language: rust)

Issue:
Reorganize top-level folder
The repository top-level is getting quite messy. I recommend creating a new `crates/` folder to store all of the Rust-specific stuff we've been writing. We also need to figure out how to organize the various tools we keep building.


Discussion / hints:

Fix patch:
diff --git a/Cargo.toml b/Cargo.toml
index 3e6d287143..877c7e551e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,12 +1,12 @@
 # =========== Workspace configuration ===========
 [workspace]
 members = [
-    "calyx-ir",
-    "calyx-utils",
-    "calyx-opt",
-    "calyx-frontend",
-    "calyx-stdlib",
-    "calyx-backend",
+    "calyx/ir",
+    "calyx/utils",
+    "calyx/opt",
+    "calyx/frontend",
+    "calyx/stdlib",
+    "calyx/backend",
     "calyx-lsp",
     "cider",
     "web/rust",
@@ -54,11 +54,11 @@ pest_derive = "2"
 pest_consume = "1"
 argh = "0.1"
 anyhow = "1"
-calyx-utils = { path = "calyx-utils", version = "0.7.1" }
-calyx-ir = { path = "calyx-ir", version = "0.7.1" }
-calyx-frontend = { path = "calyx-frontend", version = "0.7.1" }
-calyx-opt = { path = "calyx-opt", version = "0.7.1" }
-calyx-backend = { path = "calyx-backend", version = "0.7.1" }
+calyx-utils = { path = "calyx/utils", version = "0.7.1" }
+calyx-ir = { path = "calyx/ir", version = "0.7.1" }
+calyx-frontend = { path = "calyx/frontend", version = "0.7.1" }
+calyx-opt = { path = "calyx/opt", version = "0.7.1" }
+calyx-backend = { path = "calyx/backend", version = "0.7.1" }
 baa = { version = "0.16.0", features = ["bigint", "serde1", "fraction1"] }
 
 [workspace.dependencies.petgraph]
@@ -99,7 +99,7 @@ default = []
 serialize = ["calyx-ir/serialize", "serde/rc", "calyx-backend/sexp"]
 
 [build-dependencies]
-calyx-stdlib = { path = "calyx-stdlib", version = "0.7.1" }
+calyx-stdlib = { path = "calyx/stdlib", version = "0.7.1" }
 
 [dependencies]
 atty.workspace = true
@@ -124,9 +124,9 @@ lto = "thin"
 # = ========== Benchmarks ===========
 [dev-dependencies]
 criterion = { version = "0.3", features = ["html_reports"] }
-calyx-ir = { path = "calyx-ir" }
-calyx-opt = { path = "calyx-opt" }
-calyx-frontend = { path = "calyx-frontend" }
+calyx-ir = { path = "calyx/ir" }
+calyx-opt = { path = "calyx/opt" }
+calyx-frontend = { path = "calyx/frontend" }
 
 [[bench]]
 name = "component-sharing"
diff --git a/calyx-frontend/resources/compile.futil b/calyx-frontend/resources/compile.futil
deleted file mode 120000
index 40462cad23..0000000000
--- a/calyx-frontend/resources/compile.futil
+++ /dev/null
@@ -1,1 +0,0 @@
-../../primitives/compile.futil
\ No newline at end of file
diff --git a/calyx-backend/Cargo.toml b/calyx/backend/Cargo.toml
similarity index 100%
rename from calyx-backend/Cargo.toml
rename to calyx/backend/Cargo.toml
diff --git a/calyx-backend/src/backend_opt.rs b/calyx/backend/src/backend_opt.rs
similarity index 100%
rename from calyx-backend/src/backend_opt.rs
rename to calyx/backend/src/backend_opt.rs
diff --git a/calyx-backend/src/firrtl.rs b/calyx/backend/src/firrtl.rs
similarity index 100%
rename from calyx-backend/src/firrtl.rs
rename to calyx/backend/src/firrtl.rs
diff --git a/calyx-backend/src/lib.rs b/calyx/backend/src/lib.rs
similarity index 100%
rename from calyx-backend/src/lib.rs
rename to calyx/backend/src/lib.rs
diff --git a/calyx-backend/src/mlir.rs b/calyx/backend/src/mlir.rs
similarity index 100%
rename from calyx-backend/src/mlir.rs
rename to calyx/backend/src/mlir.rs
diff --git a/calyx-backend/src/primitive_uses.rs b/calyx/backend/src/primitive_uses.rs
similarity index 100%
rename from calyx-backend/src/primitive_uses.rs
rename to calyx/backend/src/primitive_uses.rs
diff --git a/calyx-backend/src/resources.rs b/calyx/backend/src/resources.rs
similarity index 100%
rename from calyx-backend/src/resources.rs
rename to calyx/backend/src/resources.rs
diff --git a/calyx-backend/src/sexp.rs b/calyx/backend/src/sexp.rs
similarity index 100%
rename from calyx-backend/src/sexp.rs
rename to calyx/backend/src/sexp.rs
diff --git a/calyx-backend/src/traits.rs b/calyx/backend/src/traits.rs
similarity index 100%
rename from calyx-backend/src/traits.rs
rename to calyx/backend/src/traits.rs
diff --git a/calyx-backend/src/verilog.rs b/calyx/backend/src/verilog.rs
similarity index 100%
rename from calyx-backend/src/verilog.rs
rename to calyx/backend/src/verilog.rs
diff --git a/calyx-backend/src/xilinx/axi.rs b/calyx/backend/src/xilinx/axi.rs
similarity index 100%
rename from calyx-backend/src/xilinx/axi.rs
rename to calyx/backend/src/xilinx/axi.rs
diff --git a/calyx-backend/src/xilinx/axi_address_space.rs b/calyx/backend/src/xilinx/axi_address_space.rs
similarity index 100%
rename from calyx-backend/src/xilinx/axi_address_space.rs
rename to calyx/backend/src/xilinx/axi_address_space.rs
diff --git a/calyx-backend/src/xilinx/control_axi.rs b/calyx/backend/src/xilinx/control_axi.rs
similarity index 100%
rename from calyx-backend/src/xilinx/control_axi.rs
rename to calyx/backend/src/xilinx/control_axi.rs
diff --git a/calyx-backend/src/xilinx/fsm.rs b/calyx/backend/src/xilinx/fsm.rs
similarity index 100%
rename from calyx-backend/src/xilinx/fsm.rs
rename to calyx/backend/src/xilinx/fsm.rs
diff --git a/calyx-backend/src/xilinx/memory_axi.rs b/calyx/backend/src/xilinx/memory_axi.rs
similarity index 100%
rename from calyx-backend/src/xilinx/memory_axi.rs
rename to calyx/backend/src/xilinx/memory_axi.rs
diff --git a/calyx-backend/src/xilinx/mod.rs b/calyx/backend/src/xilinx/mod.rs
similarity index 100%
rename from calyx-backend/src/xilinx/mod.rs
rename to calyx/backend/src/xilinx/mod.rs
diff --git a/calyx-backend/src/xilinx/toplevel.rs b/calyx/backend/src/xilinx/toplevel.rs
similarity index 100%
rename from calyx-backend/src/xilinx/toplevel.rs
rename to calyx/backend/src/xilinx/toplevel.rs
diff --git a/calyx-backend/src/xilinx/utils.rs b/calyx/backend/src/xilinx/utils.rs
similarity index 100%
rename from calyx-backend/src/xilinx/utils.rs
rename to calyx/backend/src/xilinx/utils.rs
diff --git a/calyx-backend/src/xilinx/xml.rs b/calyx/backend/src/xilinx/xml.rs
similarity index 100%
rename from calyx-backend/src/xilinx/xml.rs
rename to calyx/backend/src/xilinx/xml.rs
diff --git a/calyx-frontend/Cargo.toml b/calyx/frontend/Cargo.toml
similarity index 100%
rename from calyx-frontend/Cargo.toml
rename to calyx/frontend/Cargo.toml
diff --git a/calyx/frontend/resources/compile.futil b/calyx/frontend/resources/compile.futil
new file mode 120000
index 0000000000..dbdf1af46f
--- /dev/null
+++ b/calyx/frontend/resources/compile.futil
@@ -0,0 +1,1 @@
+../../../primitives/compile.futil
\ No newline at end of file
diff --git a/calyx-frontend/src/ast.rs b/calyx/frontend/src/ast.rs
similarity index 100%
rename from calyx-frontend/src/ast.rs
rename to calyx/frontend/src/ast.rs
diff --git a/calyx-frontend/src/attribute.rs b/calyx/frontend/src/attribute.rs
similarity index 100%
rename from calyx-frontend/src/attribute.rs
rename to calyx/frontend/src/attribute.rs
diff --git a/calyx-frontend/src/attributes.rs b/calyx/frontend/src/attributes.rs
similarity index 100%
rename from calyx-frontend/src/attributes.rs
rename to calyx/frontend/src/attributes.rs
diff --git a/calyx-frontend/src/common.rs b/calyx/frontend/src/common.rs
similarity index 100%
rename from calyx-frontend/src/common.rs
rename to calyx/frontend/src/common.rs
diff --git a/calyx-frontend/src/lib.rs b/calyx/frontend/src/lib.rs
similarity index 100%
rename from calyx-frontend/src/lib.rs
rename to calyx/frontend/src/lib.rs
diff --git a/calyx-frontend/src/lib_sig.rs b/calyx/frontend/src/lib_sig.rs
similarity index 100%
rename from calyx-frontend/src/lib_sig.rs
rename to calyx/frontend/src/lib_sig.rs
diff --git a/calyx-frontend/src/parser.rs b/calyx/frontend/src/parser.rs
similarity index 100%
rename from calyx-frontend/src/parser.rs
rename to calyx/frontend/src/parser.rs
diff --git a/calyx-frontend/src/source_info.rs b/calyx/frontend/src/source_info.rs
similarity index 100%
rename from calyx-frontend/src/source_info.rs
rename to calyx/frontend/src/source_info.rs
diff --git a/calyx-frontend/src/syntax.pest b/calyx/frontend/src/syntax.pest
similarity index 100%
rename from calyx-frontend/src/syntax.pest
rename to calyx/frontend/src/syntax.pest
diff --git a/calyx-frontend/src/workspace.rs b/calyx/frontend/src/workspace.rs
similarity index 100%
rename from calyx-frontend/src/workspace.rs
rename to calyx/frontend/src/workspace.rs
diff --git a/calyx-ir/Cargo.toml b/calyx/ir/Cargo.toml
similarity index 100%
rename from calyx-ir/Cargo.toml
rename to calyx/ir/Cargo.toml
diff --git a/calyx-ir/src/builder.rs b/calyx/ir/src/builder.rs
similarity index 100%
rename from calyx-ir/src/builder.rs
rename to calyx/ir/src/builder.rs
diff --git a/calyx-ir/src/common.rs b/calyx/ir/src/common.rs
similarity index 100%
rename from calyx-ir/src/common.rs
rename to calyx/ir/src/common.rs
diff --git a/calyx-ir/src/component.rs b/calyx/ir/src/component.rs
similarity index 100%
rename from calyx-ir/src/component.rs
rename to calyx/ir/src/component.rs
diff --git a/calyx-ir/src/context.rs b/calyx/ir/src/context.rs
similarity index 100%
rename from calyx-ir/src/context.rs
rename to calyx/ir/src/context.rs
diff --git a/calyx-ir/src/control.rs b/calyx/ir/src/control.rs
similarity index 100%
rename from calyx-ir/src/control.rs
rename to calyx/ir/src/control.rs
diff --git a/calyx-ir/src/flat_guard.rs b/calyx/ir/src/flat_guard.rs
similarity index 100%
rename from calyx-ir/src/flat_guard.rs
rename to calyx/ir/src/flat_guard.rs
diff --git a/calyx-ir/src/from_ast.rs b/calyx/ir/src/from_ast.rs
similarity index 100%
rename from calyx-ir/src/from_ast.rs
rename to calyx/ir/src/from_ast.rs
diff --git a/calyx-ir/src/guard.rs b/calyx/ir/src/guard.rs
similarity index 100%
rename from calyx-ir/src/guard.rs
rename to calyx/ir/src/guard.rs
diff --git a/calyx-ir/src/lib.rs b/calyx/ir/src/lib.rs
similarity index 100%
rename from calyx-ir/src/lib.rs
rename to calyx/ir/src/lib.rs
diff --git a/calyx-ir/src/macros.rs b/calyx/ir/src/macros.rs
similarity index 100%
rename from calyx-ir/src/macros.rs
rename to calyx/ir/src/macros.rs
diff --git a/calyx-ir/src/printer.rs b/calyx/ir/src/printer.rs
similarity index 100%
rename from calyx-ir/src/printer.rs
rename to calyx/ir/src/printer.rs
diff --git a/calyx-ir/src/reserved_names.rs b/calyx/ir/src/reserved_names.rs
similarity index 100%
rename from calyx-ir/src/reserved_names.rs
rename to calyx/ir/src/reserved_names.rs
diff --git a/calyx-ir/src/rewriter.rs b/calyx/ir/src/rewriter.rs
similarity index 100%
rename from calyx-ir/src/rewriter.rs
rename to calyx/ir/src/rewriter.rs
diff --git a/calyx-ir/src/serializers.rs b/calyx/ir/src/serializers.rs
similarity index 100%
rename from calyx-ir/src/serializers.rs
rename to calyx/ir/src/serializers.rs
diff --git a/calyx-ir/src/structure.rs b/calyx/ir/src/structure.rs
similarity index 100%
rename from calyx-ir/src/structure.rs
rename to calyx/ir/src/structure.rs
diff --git a/calyx-ir/src/utils.rs b/calyx/ir/src/utils.rs
similarity index 100%
rename from calyx-ir/src/utils.rs
rename to calyx/ir/src/utils.rs
diff --git a/calyx-opt/Cargo.toml b/calyx/opt/Cargo.toml
similarity index 100%
rename from calyx-opt/Cargo.toml
rename to calyx/opt/Cargo.toml
diff --git a/calyx-opt/LICENSE b/calyx/opt/LICENSE
similarity index 100%
rename from calyx-opt/LICENSE
rename to calyx/opt/LICENSE
diff --git a/calyx-opt/src/analysis/compaction_analysis.rs b/calyx/opt/src/analysis/compaction_analysis.rs
similarity index 100%
rename from calyx-opt/src/analysis/compaction_analysis.rs
rename to calyx/opt/src/analysis/compaction_analysis.rs
diff --git a/calyx-opt/src/analysis/compute_static.rs b/calyx/opt/src/analysis/compute_static.rs
similarity index 100%
rename from calyx-opt/src/analysis/compute_static.rs
rename to calyx/opt/src/analysis/compute_static.rs
diff --git a/calyx-opt/src/analysis/control_id.rs b/calyx/opt/src/analysis/control_id.rs
similarity index 100%
rename from calyx-opt/src/analysis/control_id.rs
rename to calyx/opt/src/analysis/control_id.rs
diff --git a/calyx-opt/src/analysis/control_order.rs b/calyx/opt/src/analysis/control_order.rs
similarity index 100%
rename from calyx-opt/src/analysis/control_order.rs
rename to calyx/opt/src/analysis/control_order.rs
diff --git a/calyx-opt/src/analysis/control_ports.rs b/calyx/opt/src/analysis/control_ports.rs
similarity index 100%
rename from calyx-opt/src/analysis/control_ports.rs
rename to calyx/opt/src/analysis/control_ports.rs
diff --git a/calyx-opt/src/analysis/dataflow_order.rs b/calyx/opt/src/analysis/dataflow_order.rs
similarity index 100%
rename from calyx-opt/src/analysis/dataflow_order.rs
rename to calyx/opt/src/analysis/dataflow_order.rs
diff --git a/calyx-opt/src/analysis/domination_analysis/dominator_map.rs b/calyx/opt/src/analysis/domination_analysis/dominator_map.rs
similarity index 100%
rename from calyx-opt/src/analysis/domination_analysis/dominator_map.rs
rename to calyx/opt/src/analysis/domination_analysis/dominator_map.rs
diff --git a/calyx-opt/src/analysis/domination_analysis/mod.rs b/calyx/opt/src/analysis/domination_analysis/mod.rs
similarity index 100%
rename from calyx-opt/src/analysis/domination_analysis/mod.rs
rename to calyx/opt/src/analysis/domination_analysis/mod.rs
diff --git a/calyx-opt/src/analysis/domination_analysis/node_analysis.rs b/calyx/opt/src/analysis/domination_analysis/node_analysis.rs
similarity index 100%
rename from calyx-opt/src/analysis/domination_analysis/node_analysis.rs
rename to calyx/opt/src/analysis/domination_analysis/node_analysis.rs
diff --git a/calyx-opt/src/analysis/domination_analysis/static_par_domination.rs b/calyx/opt/src/analysis/domination_analysis/static_par_domination.rs
similarity index 100%
rename from calyx-opt/src/analysis/domination_analysis/static_par_domination.rs
rename to calyx/opt/src/analysis/domination_analysis/static_par_domination.rs
diff --git a/calyx-opt/src/analysis/graph.rs b/calyx/opt/src/analysis/graph.rs
similarity index 100%
rename from calyx-opt/src/analysis/graph.rs
rename to calyx/opt/src/analysis/graph.rs
diff --git a/calyx-opt/src/analysis/graph_coloring.rs b/calyx/opt/src/analysis/graph_coloring.rs
similarity index 100%
rename from calyx-opt/src/analysis/graph_coloring.rs
rename to calyx/opt/src/analysis/graph_coloring.rs
diff --git a/calyx-opt/src/analysis/inference_analysis.rs b/calyx/opt/src/analysis/inference_analysis.rs
similarity index 100%
rename from calyx-opt/src/analysis/inference_analysis.rs
rename to calyx/opt/src/analysis/inference_analysis.rs
diff --git a/calyx-opt/src/analysis/live_range_analysis.rs b/calyx/opt/src/analysis/live_range_analysis.rs
similarity index 100%
rename from calyx-opt/src/analysis/live_range_analysis.rs
rename to calyx/opt/src/analysis/live_range_analysis.rs
diff --git a/calyx-opt/src/analysis/mod.rs b/calyx/opt/src/analysis/mod.rs
similarity index 100%
rename from calyx-opt/src/analysis/mod.rs
rename to calyx/opt/src/analysis/mod.rs
diff --git a/calyx-opt/src/analysis/port_interface.rs b/calyx/opt/src/analysis/port_interface.rs
similarity index 100%
rename from calyx-opt/src/analysis/port_interface.rs
rename to calyx/opt/src/analysis/port_interface.rs
diff --git a/calyx-opt/src/analysis/promotion_analysis.rs b/calyx/opt/src/analysis/promotion_analysis.rs
similarity index 100%
rename from calyx-opt/src/analysis/promotion_analysis.rs
rename to calyx/opt/src/analysis/promotion_analysis.rs
diff --git a/calyx-opt/src/analysis/reaching_defns.rs b/calyx/opt/src/analysis/reaching_defns.rs
similarity index 100%
rename from calyx-opt/src/analysis/reaching_defns.rs
rename to calyx/opt/src/analysis/reaching_defns.rs
diff --git a/calyx-opt/src/analysis/read_write_set.rs b/calyx/opt/src/analysis/read_write_set.rs
similarity index 100%
rename from calyx-opt/src/analysis/read_write_set.rs
rename to calyx/opt/src/analysis/read_write_set.rs
diff --git a/calyx-opt/src/analysis/schedule_conflicts.rs b/calyx/opt/src/analysis/schedule_conflicts.rs
similarity index 100%
rename from calyx-opt/src/analysis/schedule_conflicts.rs
rename to calyx/opt/src/analysis/schedule_conflicts.rs
diff --git a/calyx-opt/src/analysis/share_set.rs b/calyx/opt/src/analysis/share_set.rs
similarity index 100%
rename from calyx-opt/src/analysis/share_set.rs
rename to calyx/opt/src/analysis/share_set.rs
diff --git a/calyx-opt/src/analysis/static_fsm.rs b/calyx/opt/src/analysis/static_fsm.rs
similarity index 100%
rename from calyx-opt/src/analysis/static_fsm.rs
rename to calyx/opt/src/analysis/static_fsm.rs
diff --git a/calyx-opt/src/analysis/static_par_timing.rs b/calyx/opt/src/analysis/static_par_timing.rs
similarity index 100%
rename from calyx-opt/src/analysis/static_par_timing.rs
rename to calyx/opt/src/analysis/static_par_timing.rs
diff --git a/calyx-opt/src/analysis/static_tree.rs b/calyx/opt/src/analysis/static_tree.rs
similarity index 100%
rename from calyx-opt/src/analysis/static_tree.rs
rename to calyx/opt/src/analysis/static_tree.rs
diff --git a/calyx-opt/src/analysis/variable_detection.rs b/calyx/opt/src/analysis/variable_detection.rs
similarity index 100%
rename from calyx-opt/src/analysis/variable_detection.rs
rename to calyx/opt/src/analysis/variable_detection.rs
diff --git a/calyx-opt/src/default_passes.rs b/calyx/opt/src/default_passes.rs
similarity index 100%
rename from calyx-opt/src/default_passes.rs
rename to calyx/opt/src/default_passes.rs
diff --git a/calyx-opt/src/lib.rs b/calyx/opt/src/lib.rs
similarity index 100%
rename from calyx-opt/src/lib.rs
rename to calyx/opt/src/lib.rs
diff --git a/calyx-opt/src/pass_manager.rs b/calyx/opt/src/pass_manager.rs
similarity index 100%
rename from calyx-opt/src/pass_manager.rs
rename to calyx/opt/src/pass_manager.rs
diff --git a/calyx-opt/src/passes/add_guard.rs b/calyx/opt/src/passes/add_guard.rs
similarity index 100%
rename from calyx-opt/src/passes/add_guard.rs
rename to calyx/opt/src/passes/add_guard.rs
diff --git a/calyx-opt/src/passes/canonical.rs b/calyx/opt/src/passes/canonical.rs
similarity index 100%
rename from calyx-opt/src/passes/canonical.rs
rename to calyx/opt/src/passes/canonical.rs
diff --git a/calyx-opt/src/passes/cell_share.rs b/calyx/opt/src/passes/cell_share.rs
similarity index 100%
rename from calyx-opt/src/passes/cell_share.rs
rename to calyx/opt/src/passes/cell_share.rs
diff --git a/calyx-opt/src/passes/clk_insertion.rs b/calyx/opt/src/passes/clk_insertion.rs
similarity index 100%
rename from calyx-opt/src/passes/clk_insertion.rs
rename to calyx/opt/src/passes/clk_insertion.rs
diff --git a/calyx-opt/src/passes/collapse_control.rs b/calyx/opt/src/passes/collapse_control.rs
similarity index 100%
rename from calyx-opt/src/passes/collapse_control.rs
rename to calyx/opt/src/passes/collapse_control.rs
diff --git a/calyx-opt/src/passes/comb_prop.rs b/calyx/opt/src/passes/comb_prop.rs
similarity index 100%
rename from calyx-opt/src/passes/comb_prop.rs
rename to calyx/opt/src/passes/comb_prop.rs
diff --git a/calyx-opt/src/passes/compile_control.rs b/calyx/opt/src/passes/compile_control.rs
similarity index 100%
rename from calyx-opt/src/passes/compile_control.rs
rename to calyx/opt/src/passes/compile_control.rs
diff --git a/calyx-opt/src/passes/compile_invoke.rs b/calyx/opt/src/passes/compile_invoke.rs
similarity index 100%
rename from calyx-opt/src/passes/compile_invoke.rs
rename to calyx/opt/src/passes/compile_invoke.rs
diff --git a/calyx-opt/src/passes/compile_repeat.rs b/calyx/opt/src/passes/compile_repeat.rs
similarity index 100%
rename from calyx-opt/src/passes/compile_repeat.rs
rename to calyx/opt/src/passes/compile_repeat.rs
diff --git a/calyx-opt/src/passes/compile_static.rs b/calyx/opt/src/passes/compile_static.rs
similarity index 100%
rename from calyx-opt/src/passes/compile_static.rs
rename to calyx/opt/src/passes/compile_static.rs
diff --git a/calyx-opt/src/passes/component_iniliner.rs b/calyx/opt/src/passes/component_iniliner.rs
similarity index 100%
rename from calyx-opt/src/passes/component_iniliner.rs
rename to calyx/opt/src/passes/component_iniliner.rs
diff --git a/calyx-opt/src/passes/data_path_infer.rs b/calyx/opt/src/passes/data_path_infer.rs
similarity index 100%
rename from calyx-opt/src/passes/data_path_infer.rs
rename to calyx/opt/src/passes/data_path_infer.rs
diff --git a/calyx-opt/src/passes/dead_assignment_removal.rs b/calyx/opt/src/passes/dead_assignment_removal.rs
similarity index 100%
rename from calyx-opt/src/passes/dead_assignment_removal.rs
rename to calyx/opt/src/passes/dead_assignment_removal.rs
diff --git a/calyx-opt/src/passes/dead_cell_removal.rs b/calyx/opt/src/passes/dead_cell_removal.rs
similarity index 100%
rename from calyx-opt/src/passes/dead_cell_removal.rs
rename to calyx/opt/src/passes/dead_cell_removal.rs
diff --git a/calyx-opt/src/passes/dead_group_removal.rs b/calyx/opt/src/passes/dead_group_removal.rs
similarity index 100%
rename from calyx-opt/src/passes/dead_group_removal.rs
rename to calyx/opt/src/passes/dead_group_removal.rs
diff --git a/calyx-opt/src/passes/default_assigns.rs b/calyx/opt/src/passes/default_assigns.rs
similarity index 100%
rename from calyx-opt/src/passes/default_assigns.rs
rename to calyx/opt/src/passes/default_assigns.rs
diff --git a/calyx-opt/src/passes/dump_ports.rs b/calyx/opt/src/passes/dump_ports.rs
similarity index 100%
rename from calyx-opt/src/passes/dump_ports.rs
rename to calyx/opt/src/passes/dump_ports.rs
diff --git a/calyx-opt/src/passes/externalize.rs b/calyx/opt/src/passes/externalize.rs
similarity index 100%
rename from calyx-opt/src/passes/externalize.rs
rename to calyx/opt/src/passes/externalize.rs
diff --git a/calyx-opt/src/passes/go_insertion.rs b/calyx/opt/src/passes/go_insertion.rs
similarity index 100%
rename from calyx-opt/src/passes/go_insertion.rs
rename to calyx/opt/src/passes/go_insertion.rs
diff --git a/calyx-opt/src/passes/group_to_invoke.rs b/calyx/opt/src/passes/group_to_invoke.rs
similarity index 100%
rename from calyx-opt/src/passes/group_to_invoke.rs
rename to calyx/opt/src/passes/group_to_invoke.rs
diff --git a/calyx-opt/src/passes/group_to_seq.rs b/calyx/opt/src/passes/group_to_seq.rs
similarity index 100%
rename from calyx-opt/src/passes/group_to_seq.rs
rename to calyx/opt/src/passes/group_to_seq.rs
diff --git a/calyx-opt/src/passes/infer_share.rs b/calyx/opt/src/passes/infer_share.rs
similarity index 100%
rename from calyx-opt/src/passes/infer_share.rs
rename to calyx/opt/src/passes/infer_share.rs
diff --git a/calyx-opt/src/passes/lower_guards.rs b/calyx/opt/src/passes/lower_guards.rs
similarity index 100%
rename from calyx-opt/src/passes/lower_guards.rs
rename to calyx/opt/src/passes/lower_guards.rs
diff --git a/calyx-opt/src/passes/math_utilities.rs b/calyx/opt/src/passes/math_utilities.rs
similarity index 100%
rename from calyx-opt/src/passes/math_utilities.rs
rename to calyx/opt/src/passes/math_utilities.rs
diff --git a/calyx-opt/src/passes/merge_assign.rs b/calyx/opt/src/passes/merge_assign.rs
similarity index 100%
rename from calyx-opt/src/passes/merge_assign.rs
rename to calyx/opt/src/passes/merge_assign.rs
diff --git a/calyx-opt/src/passes/mod.rs b/calyx/opt/src/passes/mod.rs
similarity index 100%
rename from calyx-opt/src/passes/mod.rs
rename to calyx/opt/src/passes/mod.rs
diff --git a/calyx-opt/src/passes/papercut.rs b/calyx/opt/src/passes/papercut.rs
similarity index 100%
rename from calyx-opt/src/passes/papercut.rs
rename to calyx/opt/src/passes/papercut.rs
diff --git a/calyx-opt/src/passes/profiler_instrumentation.rs b/calyx/opt/src/passes/profiler_instrumentation.rs
similarity index 100%
rename from calyx-opt/src/passes/profiler_instrumentation.rs
rename to calyx/opt/src/passes/profiler_instrumentation.rs
diff --git a/calyx-opt/src/passes/remove_ids.rs b/calyx/opt/src/passes/remove_ids.rs
similarity index 100%
rename from calyx-opt/src/passes/remove_ids.rs
rename to calyx/opt/src/passes/remove_ids.rs
diff --git a/calyx-opt/src/passes/reset_insertion.rs b/calyx/opt/src/passes/reset_insertion.rs
similarity index 100%
rename from calyx-opt/src/passes/reset_insertion.rs
rename to calyx/opt/src/passes/reset_insertion.rs
diff --git a/calyx-opt/src/passes/schedule_compaction.rs b/calyx/opt/src/passes/schedule_compaction.rs
similarity index 100%
rename from calyx-opt/src/passes/schedule_compaction.rs
rename to calyx/opt/src/passes/schedule_compaction.rs
diff --git a/calyx-opt/src/passes/simplify_guards.rs b/calyx/opt/src/passes/simplify_guards.rs
similarity index 100%
rename from calyx-opt/src/passes/simplify_guards.rs
rename to calyx/opt/src/passes/simplify_guards.rs
diff --git a/calyx-opt/src/passes/simplify_static_guards.rs b/calyx/opt/src/passes/simplify_static_guards.rs
similarity index 100%
rename from calyx-opt/src/passes/simplify_static_guards.rs
rename to calyx/opt/src/passes/simplify_static_guards.rs
diff --git a/calyx-opt/src/passes/simplify_with_control.rs b/calyx/opt/src/passes/simplify_with_control.rs
similarity index 100%
rename from calyx-opt/src/passes/simplify_with_control.rs
rename to calyx/opt/src/passes/simplify_with_control.rs
diff --git a/calyx-opt/src/passes/static_fsm_opts.rs b/calyx/opt/src/passes/static_fsm_opts.rs
similarity index 100%
rename from calyx-opt/src/passes/static_fsm_opts.rs
rename to calyx/opt/src/passes/static_fsm_opts.rs
diff --git a/calyx-opt/src/passes/static_inference.rs b/calyx/opt/src/passes/static_inference.rs
similarity index 100%
rename from calyx-opt/src/passes/static_inference.rs
rename to calyx/opt/src/passes/static_inference.rs
diff --git a/calyx-opt/src/passes/static_inliner.rs b/calyx/opt/src/passes/static_inliner.rs
similarity index 100%
rename from calyx-opt/src/passes/static_inliner.rs
rename to calyx/opt/src/passes/static_inliner.rs
diff --git a/calyx-opt/src/passes/static_promotion.rs b/calyx/opt/src/passes/static_promotion.rs
similarity index 100%
rename from calyx-opt/src/passes/static_promotion.rs
rename to calyx/opt/src/passes/static_promotion.rs
diff --git a/calyx-opt/src/passes/synthesis_papercut.rs b/calyx/opt/src/passes/synthesis_papercut.rs
similarity index 100%
rename from calyx-opt/src/passes/synthesis_papercut.rs
rename to calyx/opt/src/passes/synthesis_papercut.rs
diff --git a/calyx-opt/src/passes/top_down_compile_control.rs b/calyx/opt/src/passes/top_down_compile_control.rs
similarity index 100%
rename from calyx-opt/src/passes/top_down_compile_control.rs
rename to calyx/opt/src/passes/top_down_compile_control.rs
diff --git a/calyx-opt/src/passes/unroll_bound.rs b/calyx/opt/src/passes/unroll_bound.rs
similarity index 100%
rename from calyx-opt/src/passes/unroll_bound.rs
rename to calyx/opt/src/passes/unroll_bound.rs
diff --git a/calyx-opt/src/passes/well_formed.rs b/calyx/opt/src/passes/well_formed.rs
similarity index 100%
rename from calyx-opt/src/passes/well_formed.rs
rename to calyx/opt/src/passes/well_formed.rs
diff --git a/calyx-opt/src/passes/wire_inliner.rs b/calyx/opt/src/passes/wire_inliner.rs
similarity index 100%
rename from calyx-opt/src/passes/wire_inliner.rs
rename to calyx/opt/src/passes/wire_inliner.rs
diff --git a/calyx-opt/src/passes/wrap_main.rs b/calyx/opt/src/passes/wrap_main.rs
similarity index 100%
rename from calyx-opt/src/passes/wrap_main.rs
rename to calyx/opt/src/passes/wrap_main.rs
diff --git a/calyx-opt/src/passes_experimental/discover_external.rs b/calyx/opt/src/passes_experimental/discover_external.rs
similarity index 100%
rename from calyx-opt/src/passes_experimental/discover_external.rs
rename to calyx/opt/src/passes_experimental/discover_external.rs
diff --git a/calyx-opt/src/passes_experimental/external_to_ref.rs b/calyx/opt/src/passes_experimental/external_to_ref.rs
similarity index 100%
rename from calyx-opt/src/passes_experimental/external_to_ref.rs
rename to calyx/opt/src/passes_experimental/external_to_ref.rs
diff --git a/calyx-opt/src/passes_experimental/hole_inliner.rs b/calyx/opt/src/passes_experimental/hole_inliner.rs
similarity index 100%
rename from calyx-opt/src/passes_experimental/hole_inliner.rs
rename to calyx/opt/src/passes_experimental/hole_inliner.rs
diff --git a/calyx-opt/src/passes_experimental/metadata_table_gen.rs b/calyx/opt/src/passes_experimental/metadata_table_gen.rs
similarity index 100%
rename from calyx-opt/src/passes_experimental/metadata_table_gen.rs
rename to calyx/opt/src/passes_experimental/metadata_table_gen.rs
diff --git a/calyx-opt/src/passes_experimental/mod.rs b/calyx/opt/src/passes_experimental/mod.rs
similarity index 100%
rename from calyx-opt/src/passes_experimental/mod.rs
rename to calyx/opt/src/passes_experimental/mod.rs
diff --git a/calyx-opt/src/passes_experimental/par_to_seq.rs b/calyx/opt/src/passes_experimental/par_to_seq.rs
similarity index 100%
rename from calyx-opt/src/passes_experimental/par_to_seq.rs
rename to calyx/opt/src/passes_experimental/par_to_seq.rs
diff --git a/calyx-opt/src/passes_experimental/register_unsharing.rs b/calyx/opt/src/passes_experimental/register_unsharing.rs
similarity index 100%
rename from calyx-opt/src/passes_experimental/register_unsharing.rs
rename to calyx/opt/src/passes_experimental/register_unsharing.rs
diff --git a/calyx-opt/src/passes_experimental/sync/compile_sync.rs b/calyx/opt/src/passes_experimental/sync/compile_sync.rs
similarity index 100%
rename from calyx-opt/src/passes_experimental/sync/compile_sync.rs
rename to calyx/opt/src/passes_experimental/sync/compile_sync.rs
diff --git a/calyx-opt/src/passes_experimental/sync/compile_sync_without_sync_reg.rs b/calyx/opt/src/passes_experimental/sync/compile_sync_without_sync_reg.rs
similarity index 100%
rename from calyx-opt/src/passes_experimental/sync/compile_sync_without_sync_reg.rs
rename to calyx/opt/src/passes_experimental/sync/compile_sync_without_sync_reg.rs
diff --git a/calyx-opt/src/passes_experimental/sync/mod.rs b/calyx/opt/src/passes_experimental/sync/mod.rs
similarity index 100%
rename from calyx-opt/src/passes_experimental/sync/mod.rs
rename to calyx/opt/src/passes_experimental/sync/mod.rs
diff --git a/calyx-opt/src/traversal/action.rs b/calyx/opt/src/traversal/action.rs
similarity index 100%
rename from calyx-opt/src/traversal/action.rs
rename to calyx/opt/src/traversal/action.rs
diff --git a/calyx-opt/src/traversal/construct.rs b/calyx/opt/src/traversal/construct.rs
similarity index 100%
rename from calyx-opt/src/traversal/construct.rs
rename to calyx/opt/src/traversal/construct.rs
diff --git a/calyx-opt/src/traversal/diagnostics.rs b/calyx/opt/src/traversal/diagnostics.rs
similarity index 100%
rename from calyx-opt/src/traversal/diagnostics.rs
rename to calyx/opt/src/traversal/diagnostics.rs
diff --git a/calyx-opt/src/traversal/mod.rs b/calyx/opt/src/traversal/mod.rs
similarity index 100%
rename from calyx-opt/src/traversal/mod.rs
rename to calyx/opt/src/traversal/mod.rs
diff --git a/calyx-opt/src/traversal/post_order.rs b/calyx/opt/src/traversal/post_order.rs
similarity index 100%
rename from calyx-opt/src/traversal/post_order.rs
rename to calyx/opt/src/traversal/post_order.rs
diff --git a/calyx-opt/src/traversal/visitor.rs b/calyx/opt/src/traversal/visitor.rs
similarity index 100%
rename from calyx-opt/src/traversal/visitor.rs
rename to calyx/opt/src/traversal/visitor.rs
diff --git a/calyx-stdlib/Cargo.toml b/calyx/stdlib/Cargo.toml
similarity index 100%
rename from calyx-stdlib/Cargo.toml
rename to calyx/stdlib/Cargo.toml
diff --git a/calyx-stdlib/README.md b/calyx/stdlib/README.md
similarity index 100%
rename from calyx-stdlib/README.md
rename to calyx/stdlib/README.md
diff --git a/calyx-stdlib/primitives b/calyx/stdlib/primitives
similarity index 100%
rename from calyx-stdlib/primitives
rename to calyx/stdlib/primitives
diff --git a/calyx-stdlib/src/lib.rs b/calyx/stdlib/src/lib.rs
similarity index 100%
rename from calyx-stdlib/src/lib.rs
rename to calyx/stdlib/src/lib.rs
diff --git a/calyx-stdlib/src/primitives.rs b/calyx/stdlib/src/primitives.rs
similarity index 81%
rename from calyx-stdlib/src/primitives.rs
rename to calyx/stdlib/src/primitives.rs
index 766327e428..8742f925aa 100644
--- a/calyx-stdlib/src/primitives.rs
+++ b/calyx/stdlib/src/primitives.rs
@@ -12,9 +12,12 @@ macro_rules! load_prims {
         pub const $name: [(&str, &str); 2] = [
             (
                 $futil_path,
-                include_str!(concat!("../primitives/", $futil_path)),
+                include_str!(concat!("../../../primitives/", $futil_path)),
+            ),
+            (
+                $sv_path,
+                include_str!(concat!("../../../primitives/", $sv_path)),
             ),
-            ($sv_path, include_str!(concat!("../primitives/", $sv_path))),
         ];
     };
 }
@@ -30,8 +33,10 @@ load_prims! { STALLABLE, "stallable.futil", "stallable.sv" }
 load_prims! { SYNC, "sync.futil", "sync.sv" }
 
 /// The core primitive in the compiler
-pub const COMPILE_LIB: (&str, &str) =
-    ("compile.futil", include_str!("../primitives/compile.futil"));
+pub const COMPILE_LIB: (&str, &str) = (
+    "compile.futil",
+    include_str!("../../../primitives/compile.futil"),
+);
 
 pub const KNOWN_LIBS: [(&str, [(&str, &str); 2]); 9] = [
     ("core", CORE),
diff --git a/calyx-utils/Cargo.toml b/calyx/utils/Cargo.toml
similarity index 100%
rename from calyx-utils/Cargo.toml
rename to calyx/utils/Cargo.toml
diff --git a/calyx-utils/src/errors.rs b/calyx/utils/src/errors.rs
similarity index 100%
rename from calyx-utils/src/errors.rs
rename to calyx/utils/src/errors.rs
diff --git a/calyx-utils/src/float.rs b/calyx/utils/src/float.rs
similarity index 100%
rename from calyx-utils/src/float.rs
rename to calyx/utils/src/float.rs
diff --git a/calyx-utils/src/id.rs b/calyx/utils/src/id.rs
similarity index 100%
rename from calyx-utils/src/id.rs
rename to calyx/utils/src/id.rs
diff --git a/calyx-utils/src/lib.rs b/calyx/utils/src/lib.rs
similarity index 100%
rename from calyx-utils/src/lib.rs
rename to calyx/utils/src/lib.rs
diff --git a/calyx-utils/src/math.rs b/calyx/utils/src/math.rs
similarity index 100%
rename from calyx-utils/src/math.rs
rename to calyx/utils/src/math.rs
diff --git a/calyx-utils/src/measure_time.rs b/calyx/utils/src/measure_time.rs
similarity index 100%
rename from calyx-utils/src/measure_time.rs
rename to calyx/utils/src/measure_time.rs
diff --git a/calyx-utils/src/namegenerator.rs b/calyx/utils/src/namegenerator.rs
similarity index 100%
rename from calyx-utils/src/namegenerator.rs
rename to calyx/utils/src/namegenerator.rs
diff --git a/calyx-utils/src/out_file.rs b/calyx/utils/src/out_file.rs
similarity index 100%
rename from calyx-utils/src/out_file.rs
rename to calyx/utils/src/out_file.rs
diff --git a/calyx-utils/src/pos_string.rs b/calyx/utils/src/pos_string.rs
similarity index 100%
rename from calyx-utils/src/pos_string.rs
rename to calyx/utils/src/pos_string.rs
diff --git a/calyx-utils/src/position.rs b/calyx/utils/src/position.rs
similarity index 100%
rename from calyx-utils/src/position.rs
rename to calyx/utils/src/position.rs
diff --git a/calyx-utils/src/weight_graph.rs b/calyx/utils/src/weight_graph.rs
similarity index 100%
rename from calyx-utils/src/weight_graph.rs
rename to calyx/utils/src/weight_graph.rs
diff --git a/cider/Cargo.toml b/cider/Cargo.toml
index e54f41a37d..2ed56320b7 100644
--- a/cider/Cargo.toml
+++ b/cider/Cargo.toml
@@ -34,10 +34,10 @@ num-traits = "0.2.19"
 
 petgraph = "0.6.3"
 
-calyx-ir = { path = "../calyx-ir" }
-calyx-utils = { path = "../calyx-utils", features = ["serialize"] }
-calyx-opt = { path = "../calyx-opt" }
-calyx-frontend = { path = "../calyx-frontend" }
+calyx-ir.workspace = true
+calyx-opt.workspace = true
+calyx-frontend.workspace = true
+calyx-utils = { workspace = true, features = ["serialize"] }
 cider-idx = { path = "../cider-idx" }
 
 ciborium = "0.2.2"
diff --git a/tools/component_cells/Cargo.toml b/tools/component_cells/Cargo.toml
index 1a91750f19..11484fa767 100644
--- a/tools/component_cells/Cargo.toml
+++ b/tools/component_cells/Cargo.toml
@@ -19,10 +19,10 @@ serde.workspace = true
 argh.workspace = true
 serde_json = "1.0.79"
 
-calyx-utils = { path = "../../calyx-utils" }
-calyx-frontend = { path = "../../calyx-frontend" }
-calyx-opt = { path = "../../calyx-opt" }
+calyx-utils.workspace = true
+calyx-frontend.workspace = true
+calyx-opt.workspace = true
 
 [dependencies.calyx-ir]
-path = "../../calyx-ir"
+workspace = true
 features = ["serialize"]
diff --git a/tools/data_gen/Cargo.toml b/tools/data_gen/Cargo.toml
index e103b5ddbb..16053869e5 100644
--- a/tools/data_gen/Cargo.toml
+++ b/tools/data_gen/Cargo.toml
@@ -12,7 +12,7 @@ serde_json = "1.0.79"
 rand = "0.8.4"
 argh = "0.1"
 
-calyx-ir = { path = "../../calyx-ir"}
-calyx-utils = { path = "../../calyx-utils"}
-calyx-frontend = { path = "../../calyx-frontend"}
-calyx-opt = { path = "../../calyx-opt"}
\ No newline at end of file
+calyx-ir.workspace = true
+calyx-utils.workspace = true
+calyx-frontend.workspace = true
+calyx-opt.workspace = true
diff --git a/tools/yxi/Cargo.toml b/tools/yxi/Cargo.toml
index 0d7e5ae883..9ad176f952 100644
--- a/tools/yxi/Cargo.toml
+++ b/tools/yxi/Cargo.toml
@@ -17,12 +17,11 @@ rust-version.workspace = true
 [dependencies]
 serde.workspace = true
 argh.workspace = true
+calyx-utils.workspace = true
+calyx-frontend.workspace = true
+calyx-opt.workspace = true
 serde_json = "1.0.79"
 
-calyx-utils = { path = "../../calyx-utils" }
-calyx-frontend = { path = "../../calyx-frontend" }
-calyx-opt = { path = "../../calyx-opt" }
-
 [dependencies.calyx-ir]
-path = "../../calyx-ir"
+workspace = true
 features = ["serialize"]
diff --git a/web/rust/Cargo.toml b/web/rust/Cargo.toml
index 9560fee84b..23df52de77 100644
--- a/web/rust/Cargo.toml
+++ b/web/rust/Cargo.toml
@@ -14,7 +14,7 @@ serde_json = "1.0.59"
 serde_derive = "1.0"
 console_error_panic_hook = "0.1.7"
 
-calyx-opt = { path = "../../calyx-opt" }
-calyx-ir = { path = "../../calyx-ir" }
-calyx-frontend = { path = "../../calyx-frontend" }
-calyx-utils = { path = "../../calyx-utils" }
\ No newline at end of file
+calyx-opt.workspace = true
+calyx-ir.workspace = true
+calyx-frontend.workspace = true
+calyx-utils.workspace = true


Test patch: