Crystal bindings for crawlberg,
generated by alef. The native libcrawlberg_ffi is
downloaded from the crawlberg GitHub release (Go-style download_ffi), since Crystal has no
registry for prebuilt native shards.
dependencies:
crawlberg:
github: dsisnero/crawlberg.crshards install
./scripts/download_ffi.sh # fetches libcrawlberg_ffi.so/.dylib/.dll for your platformLink against the staged native library and require the shard:
crystal build --link-flags="-L.lib -Wl,-rpath,$(pwd)/.lib" src/app.crrequire "crawlberg"
engine = Crawlberg.create_engine(Crawlberg::CrawlConfig.from_json("{\"max_concurrent\":2}"))make spec # = download_ffi + crystal specThe FFI library is cached in .lib/ (gitignored). Set CRAWLBERG_FFI_VERSION /
CRAWLBERG_FFI_REPO to override the release source.