Skip to content

Commit

Permalink
refac: project layout (lib + bin)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsfpdn committed Feb 26, 2024
1 parent 05139e0 commit b36b676
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
11 changes: 10 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@
name = "sdd-rs"
version = "0.1.0"
edition = "2021"
authors = ["josef podany"]
repository = "https://github.com/jsfpdn/sdd-rs"
description = "Bottom-up sentential decision diagram compiler."

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
name = "sddrs"
path = "src/lib.rs"

[[bin]]
name = "bottom_up_compiler"
path = "bin/main.rs"

[dependencies]
10 changes: 2 additions & 8 deletions src/main.rs → bin/main.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
use crate::manager::SddManager;
use crate::options::{GcSchedule, InitialVTree, SddOptions, VTreeStrategy};

pub mod literal;
pub mod manager;
pub mod options;
pub mod sdd;
pub mod vtree;
use sddrs::manager::SddManager;
use sddrs::options::{GcSchedule, InitialVTree, SddOptions, VTreeStrategy};

fn main() {
let options = SddOptions::default()
Expand Down
5 changes: 5 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pub mod literal;
pub mod manager;
pub mod options;
pub mod sdd;
pub mod vtree;
2 changes: 1 addition & 1 deletion src/sdd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::collections::HashSet;
use std::hash::Hash;

use crate::literal::Literal;
use crate::SddManager;
use crate::manager::SddManager;

type NodeIndex = u64;

Expand Down

0 comments on commit b36b676

Please sign in to comment.