Skip to content

Commit 5e8ed03

Browse files
committed
fix: make CLI binary conditional to fix cross-compilation
1 parent 63aef35 commit 5e8ed03

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

crates/supermarkdown-napi/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ authors.workspace = true
1111
crate-type = ["cdylib"]
1212

1313
[dependencies]
14-
supermarkdown = { path = "../supermarkdown" }
14+
supermarkdown = { path = "../supermarkdown", default-features = false }
1515
napi.workspace = true
1616
napi-derive.workspace = true
1717
tokio.workspace = true

crates/supermarkdown/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ categories = ["parsing", "text-processing", "web-programming"]
1313
[[bin]]
1414
name = "supermarkdown"
1515
path = "src/bin/supermarkdown.rs"
16+
required-features = ["cli"]
1617

1718
[dependencies]
1819
scraper.workspace = true
@@ -26,7 +27,8 @@ memchr.workspace = true
2627
log = { workspace = true, optional = true }
2728

2829
[features]
29-
default = []
30+
default = ["cli"]
31+
cli = []
3032
logging = ["log"]
3133

3234
[dev-dependencies]

crates/supermarkdown/tests/fixtures_test.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
//! These tests verify that supermarkdown handles various real-world HTML
44
//! documents correctly, including edge cases and malformed input.
55
6-
use supermarkdown::{convert, convert_with_options, Options};
76
use std::fs;
87
use std::path::PathBuf;
98

9+
use supermarkdown::{convert, convert_with_options, Options};
10+
1011
fn fixtures_dir() -> PathBuf {
1112
PathBuf::from(env!("CARGO_MANIFEST_DIR"))
1213
.join("tests")

0 commit comments

Comments
 (0)