html-to-markdown.cr

Crystal shard for html-to-markdown — FFI bindings via alef

html-to-markdown.cr

Crystal bindings for html-to-markdown, generated by alef. The native libhtml_to_markdown_ffi is downloaded from the upstream GitHub release (Go-style download_ffi), since Crystal has no registry for prebuilt native shards.

Install

dependencies:
  html_to_markdown_rs:
    github: dsisnero/html-to-markdown.cr
shards install
./scripts/download_ffi.sh   # fetches libhtml_to_markdown_ffi.so/.dylib/.dll

Usage

crystal build --link-flags="-L.lib -Wl,-rpath,$(pwd)/.lib" src/app.cr
require "html_to_markdown_rs"

result = HtmlToMarkdown.convert("<p>Hello world</p>", nil)
puts result.content

Test

make spec

Set HTML_TO_MARKDOWN_FFI_VERSION / HTML_TO_MARKDOWN_FFI_REPO to override the source.

Repository

html-to-markdown.cr

Owner
Statistic
  • 0
  • 0
  • 0
  • 0
  • 0
  • about 2 hours ago
  • August 9, 2026
License

Links
Synced at

Sun, 09 Aug 2026 02:12:00 GMT

Languages