Skip to content

Commit

Permalink
Add Cargo workspace configuration
Browse files Browse the repository at this point in the history
Introducing virtual workspace Cargo.toml file allows reusing workspace
configuration (version, dependencies) in all Rust subprojects.
  • Loading branch information
vsbogd committed Feb 2, 2024
1 parent c66db3a commit ddde909
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 16 deletions.
17 changes: 17 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[workspace]
members = [
"lib",
"c",
"repl",
]
resolver = "2"

[workspace.package]
version = "0.1.6"
edition = "2021"

[workspace.dependencies]
hyperon = { path = "./lib", version = "0.1.6" }
regex = "1.5.4"
log = "0.4.0"
env_logger = "0.8.4"
13 changes: 6 additions & 7 deletions c/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
[package]
name = "hyperonc"
version = "0.1.6"
authors = ["Vitaly Bogdanov <[email protected]>"]
edition = "2018"
version.workspace = true
edition.workspace = true

[dependencies]
hyperon = { path = "../lib/" }
regex = "1.5.4"
log = "0.4.0"
env_logger = "0.8.4"
hyperon = { workspace = true }
regex = { workspace = true }
log = { workspace = true }
env_logger = { workspace = true }

[lib]
name = "hyperonc"
Expand Down
11 changes: 5 additions & 6 deletions lib/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
[package]
name = "hyperon"
version = "0.1.6"
authors = ["Vitaly Bogdanov <[email protected]>"]
edition = "2021"
version.workspace = true
edition.workspace = true

[dependencies]
mopa = "0.2.2"
regex = "1.5.4"
log = "0.4.0"
env_logger = "0.8.4"
regex = { workspace = true }
log = { workspace = true }
env_logger = { workspace = true }
directories = "5.0.1" # For Environment to find platform-specific config location
smallvec = "1.10.0"
im = "15.1.0"
Expand Down
6 changes: 3 additions & 3 deletions repl/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "metta-repl"
version = "0.1.0"
edition = "2021"
version.workspace = true
edition.workspace = true
description = "A shell to execute MeTTa"

[dependencies]
Expand All @@ -11,7 +11,7 @@ clap = { version = "4.4.0", features = ["derive"] }
signal-hook = "0.3.17"
pyo3 = { version = "0.19.2", features = ["auto-initialize"], optional = true }
pep440_rs = { version = "0.3.11", optional = true }
hyperon = { path = "../lib/", optional = true } #TODO: We can only link Hyperon directly or through Python, but not both at the same time. The right fix is to allow HyperonPy to be built within Hyperon, See https://github.com/trueagi-io/hyperon-experimental/issues/283
hyperon = { workspace = true, optional = true } #TODO: We can only link Hyperon directly or through Python, but not both at the same time. The right fix is to allow HyperonPy to be built within Hyperon, See https://github.com/trueagi-io/hyperon-experimental/issues/283

[[bin]]
name = "metta"
Expand Down

0 comments on commit ddde909

Please sign in to comment.