Skip to content

Commit c423864

Browse files
committed
chore: regenerated with alef v0.19.1
Picks up Swift FFI fix (RustBridgeC.h now populated, was placeholder breaking `cannot find type 'RustStr'`), Codable conformance for Swift NodeContent, JNI string-method helper, and re-resolution of test_apps dependency pins from the published registries (3.4.0 is the last successful publish — test_apps were referencing the unreleased 3.5.0-rc.1).
1 parent 6764e07 commit c423864

90 files changed

Lines changed: 21724 additions & 6286 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Changed
11+
12+
- **bindings: regenerated with alef 0.19.1.** Picks up the Swift FFI fix: `packages/swift/Sources/RustBridgeC/RustBridgeC.h` now contains the full concatenated SwiftBridgeCore + binding-crate headers (was a placeholder under 0.19.0, breaking `swift build` with `cannot find type 'RustStr' in scope`); `packages/swift/Sources/HtmlToMarkdown/HtmlToMarkdown.swift` gains complete `Codable` conformance for `NodeContent` (custom `init(from:)`/`encode(to:)` over the tag/value layout); JNI gains a `jni_call_string_method` helper consolidating the boilerplate around `Object`-returning `String` method calls. `alef sync-versions` also re-resolved `test_apps/` dependency pins from the published registries (npm/PyPI/NuGet/RubyGems/Maven/Crates/Go/CRAN) — h2m's last successful publish is `3.4.0`, so the e2e test apps now reference `3.4.0` (or the rc tag where pinned), not the unreleased `3.5.0-rc.1` workspace version.
13+
1014
## [3.5.0-rc.1] - 2026-05-24
1115

1216
### Changed

alef.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[workspace]
2-
alef_version = "0.19.0"
2+
alef_version = "0.19.1"
33
languages = [
44
"python",
55
"node",

crates/html-to-markdown-ffi/Cargo.toml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ keywords = ["html", "markdown", "converter"]
99
categories = ["text-processing"]
1010
repository = "https://github.com/kreuzberg-dev/html-to-markdown"
1111

12+
[lib]
13+
crate-type = ["cdylib", "staticlib"]
14+
15+
[dependencies]
16+
html-to-markdown-rs = { path = "../html-to-markdown", version = "3.5.0-rc.1", features = ["full", "metadata", "visitor", "serde", "inline-images"] }
17+
serde_json = "1"
18+
tokio = { version = "1", features = ["full"] }
19+
async-trait = "0.1"
20+
1221
# `serde_json` and `tokio` are emitted unconditionally above so the manifest
1322
# is stable across regens (and so the C FFI codegen can pull them in when an
1423
# async / Result-typed function appears in the API surface), but for umbrella
@@ -20,24 +29,9 @@ repository = "https://github.com/kreuzberg-dev/html-to-markdown"
2029
[package.metadata.cargo-machete]
2130
ignored = ["serde_json", "tokio", "async-trait"]
2231

23-
[lib]
24-
crate-type = ["cdylib", "staticlib"]
25-
2632
[features]
2733
default = []
2834

29-
[dependencies]
30-
async-trait = "0.1"
31-
html-to-markdown-rs = { path = "../html-to-markdown", version = "3.5.0-rc.1", features = [
32-
"full",
33-
"metadata",
34-
"visitor",
35-
"serde",
36-
"inline-images",
37-
] }
38-
serde_json = "1"
39-
tokio = { version = "1", features = ["full"] }
40-
4135
[build-dependencies]
4236
cbindgen = "0.29"
4337

crates/html-to-markdown-node/Cargo.toml

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,24 @@ readme = false
88
keywords = ["html", "markdown", "converter"]
99
categories = ["text-processing"]
1010

11-
# `serde_json` is emitted unconditionally above so the manifest is stable
12-
# across regens, but for umbrella crates with no JSON-marshalled return types
13-
# it is genuinely unused. The conditional `async-trait` / `futures-util` deps
14-
# are similarly flagged when the umbrella has trait-bridge / streaming
15-
# adapters configured but no actual async-trait callsite in this binding.
16-
[package.metadata.cargo-machete]
17-
ignored = ["serde_json", "async-trait"]
18-
1911
[lib]
2012
crate-type = ["cdylib"]
2113

2214
[dependencies]
23-
async-trait = "0.1"
24-
html-to-markdown-rs = { version = "3.5.0-rc.1", path = "../html-to-markdown", features = [
25-
"full",
26-
"metadata",
27-
"visitor",
28-
"serde",
29-
"inline-images",
30-
] }
15+
html-to-markdown-rs = { version = "3.5.0-rc.1", path = "../html-to-markdown", features = ["full", "metadata", "visitor", "serde", "inline-images"] }
3116
napi = { version = "3", features = ["async"] }
3217
napi-derive = "3"
3318
serde = { version = "1", features = ["derive"] }
3419
serde_json = "1"
20+
async-trait = "0.1"
21+
22+
# `serde_json` is emitted unconditionally above so the manifest is stable
23+
# across regens, but for umbrella crates with no JSON-marshalled return types
24+
# it is genuinely unused. The conditional `async-trait` / `futures-util` deps
25+
# are similarly flagged when the umbrella has trait-bridge / streaming
26+
# adapters configured but no actual async-trait callsite in this binding.
27+
[package.metadata.cargo-machete]
28+
ignored = ["serde_json", "async-trait"]
3529

3630
[build-dependencies]
3731
napi-build = "2"

crates/html-to-markdown-php/Cargo.toml

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@ readme = false
88
keywords = ["html", "markdown", "converter"]
99
categories = ["text-processing"]
1010

11+
[lib]
12+
crate-type = ["cdylib"]
13+
14+
[dependencies]
15+
html-to-markdown-rs = { version = "3.5.0-rc.1", path = "../html-to-markdown", features = ["full", "metadata", "visitor", "serde", "inline-images"] }
16+
ext-php-rs = "0.15"
17+
serde = { version = "1", features = ["derive"] }
18+
serde_json = "1"
19+
tokio = { version = "1", features = ["full"] }
20+
async-trait = "0.1"
21+
1122
# `serde_json` and `tokio` are emitted unconditionally above so the manifest
1223
# is stable across regens, but for umbrella crates with no async fns and no
1324
# JSON-marshalled return types they are genuinely unused. The conditional
@@ -17,22 +28,5 @@ categories = ["text-processing"]
1728
[package.metadata.cargo-machete]
1829
ignored = ["serde_json", "tokio", "async-trait"]
1930

20-
[lib]
21-
crate-type = ["cdylib"]
22-
2331
[features]
2432
extension-module = []
25-
26-
[dependencies]
27-
async-trait = "0.1"
28-
ext-php-rs = "0.15"
29-
html-to-markdown-rs = { version = "3.5.0-rc.1", path = "../html-to-markdown", features = [
30-
"full",
31-
"metadata",
32-
"visitor",
33-
"serde",
34-
"inline-images",
35-
] }
36-
serde = { version = "1", features = ["derive"] }
37-
serde_json = "1"
38-
tokio = { version = "1", features = ["full"] }

crates/html-to-markdown-py/Cargo.toml

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,19 @@ readme = false
88
keywords = ["html", "markdown", "converter"]
99
categories = ["text-processing"]
1010

11+
[lib]
12+
name = "_html_to_markdown"
13+
crate-type = ["cdylib"]
14+
15+
[dependencies]
16+
html-to-markdown-rs = { version = "3.5.0-rc.1", path = "../html-to-markdown", features = ["full", "metadata", "visitor", "serde", "inline-images"] }
17+
pyo3 = { version = "0.28" }
18+
pyo3-async-runtimes = { version = "0.28", features = ["tokio-runtime"] }
19+
serde = { version = "1", features = ["derive"] }
20+
serde_json = "1"
21+
async-trait = "0.1"
22+
tokio = { version = "1", features = ["rt-multi-thread"] }
23+
1124
# `pyo3-async-runtimes` and `serde_json` are emitted unconditionally above so
1225
# the manifest is stable across regens, but for umbrella crates with no
1326
# async fns or no JSON-marshalled return types they are genuinely unused.
@@ -17,24 +30,5 @@ categories = ["text-processing"]
1730
[package.metadata.cargo-machete]
1831
ignored = ["pyo3-async-runtimes", "serde_json", "async-trait", "tokio"]
1932

20-
[lib]
21-
name = "_html_to_markdown"
22-
crate-type = ["cdylib"]
23-
2433
[features]
2534
extension-module = ["pyo3/extension-module", "pyo3/abi3-py310"]
26-
27-
[dependencies]
28-
async-trait = "0.1"
29-
html-to-markdown-rs = { version = "3.5.0-rc.1", path = "../html-to-markdown", features = [
30-
"full",
31-
"metadata",
32-
"visitor",
33-
"serde",
34-
"inline-images",
35-
] }
36-
pyo3 = { version = "0.28" }
37-
pyo3-async-runtimes = { version = "0.28", features = ["tokio-runtime"] }
38-
serde = { version = "1", features = ["derive"] }
39-
serde_json = "1"
40-
tokio = { version = "1", features = ["rt-multi-thread"] }

crates/html-to-markdown-py/src/pyproject.toml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[build-system]
22
build-backend = "maturin"
3-
requires = [ "maturin>=1,<2" ]
3+
requires = [ "maturin>=1.0,<2.0" ]
44

55
[project]
66
name = "html-to-markdown"
@@ -20,9 +20,8 @@ classifiers = [
2020
"Programming Language :: Python :: 3.14",
2121
]
2222
urls.repository = "https://github.com/kreuzberg-dev/html-to-markdown"
23-
2423
[dependency-groups]
25-
dev = [ "mypy>=1.19", "ruff>=0.14.8" ]
24+
dev = [ "mypy>=1.19.0", "ruff>=0.14.8" ]
2625

2726
[tool.maturin]
2827
module-name = "html_to_markdown._html_to_markdown"
@@ -35,8 +34,8 @@ python-packages = [ "html_to_markdown" ]
3534
[tool.ruff]
3635
target-version = "py310"
3736
line-length = 120
38-
format.docstring-code-line-length = 120
3937
format.docstring-code-format = true
38+
format.docstring-code-line-length = 120
4039
lint.select = [ "ALL" ]
4140
lint.ignore = [
4241
"ANN401",
@@ -63,7 +62,8 @@ lint.ignore = [
6362
"TD",
6463
"TRY",
6564
]
66-
lint.per-file-ignores."html_to_markdown/__init__.py" = [ "I001" ]
65+
lint.mccabe.max-complexity = 15
66+
lint.per-file-ignores."tests/**" = [ "ANN", "D103", "PLR2004", "S101" ]
6767
# The alef Python codegen still emits cosmetic warnings on the wrapper
6868
# modules: api.py keeps the legacy `from typing import AsyncIterator` and a
6969
# single-line import block, options.py carries # noqa: TC001 / F401 markers
@@ -72,8 +72,7 @@ lint.per-file-ignores."html_to_markdown/__init__.py" = [ "I001" ]
7272
# the codegen is updated to emit ruff-clean output.
7373
lint.per-file-ignores."html_to_markdown/api.py" = [ "F401", "I001", "UP035" ]
7474
lint.per-file-ignores."html_to_markdown/options.py" = [ "F401", "RUF100" ]
75-
lint.per-file-ignores."tests/**" = [ "ANN", "D103", "PLR2004", "S101" ]
76-
lint.mccabe.max-complexity = 15
75+
lint.per-file-ignores."html_to_markdown/__init__.py" = [ "I001" ]
7776
lint.pydocstyle.convention = "google"
7877
lint.pylint.max-args = 10
7978
lint.pylint.max-branches = 15
@@ -93,10 +92,5 @@ overrides = [
9392
# sees only the static-type discrepancy. Disable the four error codes the
9493
# discrepancy raises until the codegen emits matching `_to_rust_*` calls and
9594
# casts the return values.
96-
{ module = "html_to_markdown.api", disable_error_code = [
97-
"call-arg",
98-
"arg-type",
99-
"return-value",
100-
"attr-defined",
101-
] },
95+
{ module = "html_to_markdown.api", disable_error_code = [ "call-arg", "arg-type", "return-value", "attr-defined" ] },
10296
]

crates/html-to-markdown-rs-jni/src/lib.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,20 @@ fn string_to_jstring(env: &mut Env<'_>, s: &str) -> jstring {
4444
}
4545
}
4646

47+
fn jni_call_string_method(
48+
env: &mut Env<'_>,
49+
obj: JObject,
50+
method_name: &str,
51+
method_sig: &str,
52+
) -> std::result::Result<String, jni::errors::Error> {
53+
let class = env.get_object_class(obj)?;
54+
let method_id = env.get_method_id(&class, method_name, method_sig)?;
55+
let result = env
56+
.call_method_unchecked(obj, method_id, jni::objects::ReturnType::Object, &[])?
57+
.l()?;
58+
jstring_to_string(env, JString::from(result))
59+
}
60+
4761
fn throw_jni_error(env: &mut Env<'_>, msg: &str) {
4862
// If the error class cannot be found (misconfigured AAR), fall back to a
4963
// generic RuntimeException so the caller always gets *some* exception rather

0 commit comments

Comments
 (0)