Skip to content

Commit b51d68d

Browse files
committed
Cleaner build system
1 parent 71a1b1c commit b51d68d

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ rand = ["randlib"]
2222
smartcore = ["smartcorelib", "bincode"]
2323

2424
[dependencies]
25-
rhai = "1.8"
25+
rhai = ">=1.8.0"
2626
nalgebralib = {version = "0.32.1", optional = true, package = "nalgebra" }
2727
polars = {version = "0.27.2", optional = true }
2828
url = {version = "2.2.2", optional = true }
@@ -36,7 +36,7 @@ smartcorelib = {version = "0.3.0", optional = true, package = "smartcore", featu
3636
bincode = { version = "1.3.3", optional = true }
3737

3838
[build-dependencies]
39-
rhai = "1.8"
39+
rhai = ">=1.8.0"
4040
nalgebralib = {version = "0.32.1", optional = true, package = "nalgebra" }
4141
polars = {version = "0.27.2", optional = true }
4242
url = {version = "2.2.2", optional = true }

build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ fn main() {
66

77
// Make empty file for documentation and tests
88
std::fs::File::create(std::env::var("OUT_DIR").unwrap() + "/rhai-sci-docs.md").unwrap();
9-
std::fs::File::create("tests/rhai-sci-tests.rs").unwrap();
9+
std::fs::File::create(std::env::var("OUT_DIR").unwrap() + "/rhai-sci-tests.rs").unwrap();
1010
}
1111

1212
#[cfg(feature = "metadata")]
@@ -40,7 +40,7 @@ fn main() {
4040
std::fs::File::create(std::env::var("OUT_DIR").unwrap() + "/rhai-sci-docs.md").unwrap();
4141

4242
// Make a file for tests
43-
let mut test_file = std::fs::File::create("tests/rhai-sci-tests.rs").unwrap();
43+
let mut test_file = std::fs::File::create(std::env::var("OUT_DIR").unwrap() + "/rhai-sci-tests.rs").unwrap();
4444

4545
// Build an engine for doctests
4646
let mut engine = Engine::new();

tests/rhai-sci-tests.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#[cfg(feature = "metadata")]
2+
include!(concat!(env!("OUT_DIR"), "/rhai-sci-tests.rs"));

0 commit comments

Comments
 (0)