Skip to content

Commit 0044d15

Browse files
committed
refactor: move CLI to separate crate to fix cross-compilation
1 parent 5e8ed03 commit 0044d15

5 files changed

Lines changed: 18 additions & 9 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[workspace]
22
resolver = "2"
3-
members = ["crates/supermarkdown", "crates/supermarkdown-napi"]
3+
members = ["crates/supermarkdown", "crates/supermarkdown-cli", "crates/supermarkdown-napi"]
44

55
[workspace.package]
66
version = "0.0.4"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ cargo add supermarkdown
3636
Install the CLI binary via cargo:
3737

3838
```bash
39-
cargo install supermarkdown
39+
cargo install supermarkdown-cli
4040
```
4141

4242
## Command Line Usage
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[package]
2+
name = "supermarkdown-cli"
3+
description = "CLI for supermarkdown HTML to Markdown conversion"
4+
version.workspace = true
5+
edition.workspace = true
6+
license.workspace = true
7+
repository.workspace = true
8+
authors.workspace = true
9+
10+
[[bin]]
11+
name = "supermarkdown"
12+
path = "src/main.rs"
13+
14+
[dependencies]
15+
supermarkdown = { path = "../supermarkdown", default-features = false }
File renamed without changes.

crates/supermarkdown/Cargo.toml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ readme = "../../README.md"
1010
keywords = ["html", "markdown", "converter", "llm", "parser"]
1111
categories = ["parsing", "text-processing", "web-programming"]
1212

13-
[[bin]]
14-
name = "supermarkdown"
15-
path = "src/bin/supermarkdown.rs"
16-
required-features = ["cli"]
17-
1813
[dependencies]
1914
scraper.workspace = true
2015
html5ever.workspace = true
@@ -27,8 +22,7 @@ memchr.workspace = true
2722
log = { workspace = true, optional = true }
2823

2924
[features]
30-
default = ["cli"]
31-
cli = []
25+
default = []
3226
logging = ["log"]
3327

3428
[dev-dependencies]

0 commit comments

Comments
 (0)