Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs for lib bindings with supported library versions #14900

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/big/lib_gmp.cr
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Supported library versions:
#
# * libgmp
# * libmpir
#
# See https://crystal-lang.org/reference/man/required_libraries.html#big-numbers
{% if flag?(:win32) %}
@[Link("mpir")]
{% else %}
Expand Down
5 changes: 5 additions & 0 deletions src/compiler/crystal/ffi/lib_ffi.cr
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Supported library versions:
#
# * libffi
#
# See https://crystal-lang.org/reference/man/required_libraries.html#compiler-dependencies
module Crystal
@[Link("ffi")]
{% if compare_versions(Crystal::VERSION, "1.11.0-dev") >= 0 %}
Expand Down
5 changes: 5 additions & 0 deletions src/crystal/lib_iconv.cr
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ require "c/stddef"
{% raise "The `without_iconv` flag is preventing you to use the LibIconv module" %}
{% end %}

# Supported library versions:
#
# * libiconv-gnu
#
# See https://crystal-lang.org/reference/man/required_libraries.html#big-numbers
@[Link("iconv")]
{% if compare_versions(Crystal::VERSION, "1.11.0-dev") >= 0 %}
@[Link(dll: "libiconv.dll")]
Expand Down
5 changes: 5 additions & 0 deletions src/crystal/system/unix/lib_event2.cr
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ require "c/netdb"
@[Link("rt")]
{% end %}

# Supported library versions:
#
# * libevent2
#
# See https://crystal-lang.org/reference/man/required_libraries.html#other-runtime-libraries
{% if flag?(:openbsd) %}
@[Link("event_core")]
@[Link("event_extra")]
Expand Down
5 changes: 5 additions & 0 deletions src/gc/boehm.cr
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ require "crystal/tracing"
@[Link("gc", pkg_config: "bdw-gc")]
{% end %}

# Supported library versions:
#
# * libgc (8.2.0+; earlier versions require a patch for MT support)
#
# See https://crystal-lang.org/reference/man/required_libraries.html#other-runtime-libraries
{% if compare_versions(Crystal::VERSION, "1.11.0-dev") >= 0 %}
@[Link(dll: "gc.dll")]
{% end %}
Expand Down
11 changes: 11 additions & 0 deletions src/lib_c.cr
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# Supported library versions:
#
# * glibc (2.26+)
# * musl libc (1.2+)
# * system libraries of several BSDs
# * macOS system library (11+)
# * MSVCRT
# * WASI
# * bionic libc
#
# See https://crystal-lang.org/reference/man/required_libraries.html#system-library
{% if flag?(:win32) %}
@[Link({{ flag?(:static) ? "libucrt" : "ucrt" }})]
{% end %}
Expand Down
5 changes: 5 additions & 0 deletions src/lib_z/lib_z.cr
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Supported library versions:
#
# * zlib
#
# See https://crystal-lang.org/reference/man/required_libraries.html#other-stdlib-libraries
@[Link("z")]
{% if compare_versions(Crystal::VERSION, "1.11.0-dev") >= 0 %}
@[Link(dll: "zlib1.dll")]
Expand Down
5 changes: 5 additions & 0 deletions src/llvm/lib_llvm.cr
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
end
{% end %}

# Supported library versions:
#
# * LLVM (8-18; aarch64 requires 12+)
straight-shoota marked this conversation as resolved.
Show resolved Hide resolved
#
# See https://crystal-lang.org/reference/man/required_libraries.html#other-stdlib-libraries
{% begin %}
lib LibLLVM
IS_180 = {{LibLLVM::VERSION.starts_with?("18.0")}}
Expand Down
6 changes: 6 additions & 0 deletions src/openssl/lib_crypto.cr
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Supported library versions:
#
# * openssl (1.1.0+)
# * libressl
#
# See https://crystal-lang.org/reference/man/required_libraries.html#tls
{% begin %}
lib LibCrypto
{% if flag?(:win32) %}
Expand Down
6 changes: 6 additions & 0 deletions src/openssl/lib_ssl.cr
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ require "./lib_crypto"
{% raise "The `without_openssl` flag is preventing you to use the LibSSL module" %}
{% end %}

# Supported library versions:
#
# * openssl (1.1.0+)
# * libressl
#
# See https://crystal-lang.org/reference/man/required_libraries.html#tls
{% begin %}
lib LibSSL
{% if flag?(:win32) %}
Expand Down
5 changes: 5 additions & 0 deletions src/regex/lib_pcre.cr
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Supported library versions:
#
# * libpcre
#
# See https://crystal-lang.org/reference/man/required_libraries.html#regular-expression-engine
@[Link("pcre", pkg_config: "libpcre")]
{% if compare_versions(Crystal::VERSION, "1.11.0-dev") >= 0 %}
@[Link(dll: "pcre.dll")]
Expand Down
5 changes: 5 additions & 0 deletions src/regex/lib_pcre2.cr
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Supported library versions:
#
# * libpcre2 (recommended: 10.36+)
#
# See https://crystal-lang.org/reference/man/required_libraries.html#regular-expression-engine
@[Link("pcre2-8", pkg_config: "libpcre2-8")]
{% if compare_versions(Crystal::VERSION, "1.11.0-dev") >= 0 %}
@[Link(dll: "pcre2-8.dll")]
Expand Down
5 changes: 5 additions & 0 deletions src/xml/libxml2.cr
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ require "./parser_options"
require "./html_parser_options"
require "./save_options"

# Supported library versions:
#
# * libxml2
#
# See https://crystal-lang.org/reference/man/required_libraries.html#other-stdlib-libraries
@[Link("xml2", pkg_config: "libxml-2.0")]
{% if compare_versions(Crystal::VERSION, "1.11.0-dev") >= 0 %}
@[Link(dll: "libxml2.dll")]
Expand Down
5 changes: 5 additions & 0 deletions src/yaml/lib_yaml.cr
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
require "./enums"

# Supported library versions:
#
# * libyaml
#
# See https://crystal-lang.org/reference/man/required_libraries.html#other-stdlib-libraries
@[Link("yaml", pkg_config: "yaml-0.1")]
{% if compare_versions(Crystal::VERSION, "1.11.0-dev") >= 0 %}
@[Link(dll: "yaml.dll")]
Expand Down
Loading