restify 2.0.1 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +1 -1
  4. data/lib/restify/adapter/base.rb +1 -1
  5. data/lib/restify/cache.rb +1 -1
  6. data/lib/restify/relation.rb +7 -11
  7. data/lib/restify/response.rb +2 -2
  8. data/lib/restify/version.rb +2 -2
  9. data/spec/restify/adapter/base_spec.rb +33 -0
  10. data/spec/restify/context_spec.rb +2 -2
  11. data/spec/restify/features/opentelemetry_spec.rb +1 -1
  12. data/spec/restify/global_spec.rb +50 -1
  13. data/spec/restify/link_spec.rb +13 -3
  14. data/spec/restify/relation_spec.rb +79 -7
  15. data/spec/restify/resource_spec.rb +6 -0
  16. data/spec/restify_spec.rb +1 -1
  17. data/spec/spec_helper.rb +0 -1
  18. data/vendor/bundle/ruby/4.0.0/bundler/gems/my-rubocop-2b861962124a/LICENSE +21 -0
  19. data/vendor/bundle/ruby/4.0.0/bundler/gems/my-rubocop-2b861962124a/README.md +23 -0
  20. data/vendor/bundle/ruby/4.0.0/gems/activesupport-8.1.3/CHANGELOG.md +561 -0
  21. data/vendor/bundle/ruby/4.0.0/gems/activesupport-8.1.3/MIT-LICENSE +20 -0
  22. data/vendor/bundle/ruby/4.0.0/gems/activesupport-8.1.3/README.rdoc +40 -0
  23. data/vendor/bundle/ruby/4.0.0/gems/addressable-2.9.0/CHANGELOG.md +326 -0
  24. data/vendor/bundle/ruby/4.0.0/gems/addressable-2.9.0/LICENSE.txt +202 -0
  25. data/vendor/bundle/ruby/4.0.0/gems/addressable-2.9.0/README.md +121 -0
  26. data/vendor/bundle/ruby/4.0.0/gems/ast-2.4.3/LICENSE.MIT +20 -0
  27. data/vendor/bundle/ruby/4.0.0/gems/ast-2.4.3/README.YARD.md +12 -0
  28. data/vendor/bundle/ruby/4.0.0/gems/base64-0.3.0/README.md +48 -0
  29. data/vendor/bundle/ruby/4.0.0/gems/bigdecimal-4.1.2/LICENSE +56 -0
  30. data/vendor/bundle/ruby/4.0.0/gems/concurrent-ruby-1.3.7/CHANGELOG.md +615 -0
  31. data/vendor/bundle/ruby/4.0.0/gems/concurrent-ruby-1.3.7/LICENSE.txt +21 -0
  32. data/vendor/bundle/ruby/4.0.0/gems/concurrent-ruby-1.3.7/README.md +409 -0
  33. data/vendor/bundle/ruby/4.0.0/gems/connection_pool-3.0.2/LICENSE +20 -0
  34. data/vendor/bundle/ruby/4.0.0/gems/connection_pool-3.0.2/README.md +182 -0
  35. data/vendor/bundle/ruby/4.0.0/gems/crack-1.0.1/LICENSE +20 -0
  36. data/vendor/bundle/ruby/4.0.0/gems/crack-1.0.1/README.md +43 -0
  37. data/vendor/bundle/ruby/4.0.0/gems/diff-lcs-1.6.2/CHANGELOG.md +518 -0
  38. data/vendor/bundle/ruby/4.0.0/gems/diff-lcs-1.6.2/README.md +92 -0
  39. data/vendor/bundle/ruby/4.0.0/gems/docile-1.4.1/LICENSE +21 -0
  40. data/vendor/bundle/ruby/4.0.0/gems/docile-1.4.1/README.md +409 -0
  41. data/vendor/bundle/ruby/4.0.0/gems/drb-2.2.3/LICENSE.txt +22 -0
  42. data/vendor/bundle/ruby/4.0.0/gems/ethon-0.18.0/CHANGELOG.md +417 -0
  43. data/vendor/bundle/ruby/4.0.0/gems/ethon-0.18.0/LICENSE +20 -0
  44. data/vendor/bundle/ruby/4.0.0/gems/ethon-0.18.0/README.md +118 -0
  45. data/vendor/bundle/ruby/4.0.0/gems/ffi-1.17.4-x86_64-linux-gnu/CHANGELOG.md +507 -0
  46. data/vendor/bundle/ruby/4.0.0/gems/ffi-1.17.4-x86_64-linux-gnu/LICENSE +24 -0
  47. data/vendor/bundle/ruby/4.0.0/gems/ffi-1.17.4-x86_64-linux-gnu/LICENSE.SPECS +22 -0
  48. data/vendor/bundle/ruby/4.0.0/gems/ffi-1.17.4-x86_64-linux-gnu/README.md +138 -0
  49. data/vendor/bundle/ruby/4.0.0/gems/hashdiff-1.2.1/LICENSE +19 -0
  50. data/vendor/bundle/ruby/4.0.0/gems/hashdiff-1.2.1/README.md +323 -0
  51. data/vendor/bundle/ruby/4.0.0/gems/hashdiff-1.2.1/changelog.md +127 -0
  52. data/vendor/bundle/ruby/4.0.0/gems/hitimes-3.2.0/LICENSE.txt +16 -0
  53. data/vendor/bundle/ruby/4.0.0/gems/hitimes-3.2.0/README.md +187 -0
  54. data/vendor/bundle/ruby/4.0.0/gems/i18n-1.15.2/MIT-LICENSE +20 -0
  55. data/vendor/bundle/ruby/4.0.0/gems/i18n-1.15.2/README.md +139 -0
  56. data/vendor/bundle/ruby/4.0.0/gems/json-2.19.9/README.md +310 -0
  57. data/vendor/bundle/ruby/4.0.0/gems/language_server-protocol-3.17.0.5/LICENSE.txt +21 -0
  58. data/vendor/bundle/ruby/4.0.0/gems/language_server-protocol-3.17.0.5/README.md +88 -0
  59. data/vendor/bundle/ruby/4.0.0/gems/lint_roller-1.1.0/CHANGELOG.md +15 -0
  60. data/vendor/bundle/ruby/4.0.0/gems/lint_roller-1.1.0/LICENSE.txt +21 -0
  61. data/vendor/bundle/ruby/4.0.0/gems/lint_roller-1.1.0/README.md +173 -0
  62. data/vendor/bundle/ruby/4.0.0/gems/little-plugger-1.1.4/README.rdoc +53 -0
  63. data/vendor/bundle/ruby/4.0.0/gems/logger-1.7.0/README.md +104 -0
  64. data/vendor/bundle/ruby/4.0.0/gems/logging-2.4.0/LICENSE +22 -0
  65. data/vendor/bundle/ruby/4.0.0/gems/logging-2.4.0/README.md +140 -0
  66. data/vendor/bundle/ruby/4.0.0/gems/minitest-6.0.6/README.rdoc +763 -0
  67. data/vendor/bundle/ruby/4.0.0/gems/msgpack-1.8.3/ChangeLog +383 -0
  68. data/vendor/bundle/ruby/4.0.0/gems/msgpack-1.8.3/LICENSE +177 -0
  69. data/vendor/bundle/ruby/4.0.0/gems/msgpack-1.8.3/README.md +302 -0
  70. data/vendor/bundle/ruby/4.0.0/gems/multi_json-1.21.1/LICENSE.md +20 -0
  71. data/vendor/bundle/ruby/4.0.0/gems/multi_json-1.21.1/README.md +281 -0
  72. data/vendor/bundle/ruby/4.0.0/gems/nio4r-2.7.5/ext/libev/LICENSE +37 -0
  73. data/vendor/bundle/ruby/4.0.0/gems/nio4r-2.7.5/ext/libev/README +59 -0
  74. data/vendor/bundle/ruby/4.0.0/gems/nio4r-2.7.5/license.md +80 -0
  75. data/vendor/bundle/ruby/4.0.0/gems/nio4r-2.7.5/readme.md +91 -0
  76. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-api-1.10.0/CHANGELOG.md +219 -0
  77. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-api-1.10.0/LICENSE +201 -0
  78. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-api-1.10.0/README.md +68 -0
  79. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-common-0.25.0/CHANGELOG.md +110 -0
  80. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-common-0.25.0/LICENSE +201 -0
  81. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-common-0.25.0/README.md +62 -0
  82. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-instrumentation-base-0.26.1/CHANGELOG.md +97 -0
  83. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-instrumentation-base-0.26.1/LICENSE +201 -0
  84. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-instrumentation-base-0.26.1/README.md +155 -0
  85. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-instrumentation-ethon-0.29.0/CHANGELOG.md +192 -0
  86. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-instrumentation-ethon-0.29.0/LICENSE +201 -0
  87. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-instrumentation-ethon-0.29.0/README.md +66 -0
  88. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-registry-0.6.0/CHANGELOG.md +31 -0
  89. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-registry-0.6.0/LICENSE +201 -0
  90. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-registry-0.6.0/README.md +40 -0
  91. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-sdk-1.12.0/CHANGELOG.md +302 -0
  92. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-sdk-1.12.0/LICENSE +201 -0
  93. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-sdk-1.12.0/README.md +101 -0
  94. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-semantic_conventions-1.41.0/CHANGELOG.md +65 -0
  95. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-semantic_conventions-1.41.0/LICENSE +201 -0
  96. data/vendor/bundle/ruby/4.0.0/gems/opentelemetry-semantic_conventions-1.41.0/README.md +115 -0
  97. data/vendor/bundle/ruby/4.0.0/gems/parallel-2.1.0/MIT-LICENSE.txt +20 -0
  98. data/vendor/bundle/ruby/4.0.0/gems/parser-3.3.11.1/LICENSE.txt +26 -0
  99. data/vendor/bundle/ruby/4.0.0/gems/prism-1.9.0/CHANGELOG.md +786 -0
  100. data/vendor/bundle/ruby/4.0.0/gems/prism-1.9.0/LICENSE.md +7 -0
  101. data/vendor/bundle/ruby/4.0.0/gems/prism-1.9.0/README.md +143 -0
  102. data/vendor/bundle/ruby/4.0.0/gems/public_suffix-7.0.5/CHANGELOG.md +649 -0
  103. data/vendor/bundle/ruby/4.0.0/gems/public_suffix-7.0.5/LICENSE.txt +22 -0
  104. data/vendor/bundle/ruby/4.0.0/gems/public_suffix-7.0.5/README.md +231 -0
  105. data/vendor/bundle/ruby/4.0.0/gems/puma-8.0.2/LICENSE +29 -0
  106. data/vendor/bundle/ruby/4.0.0/gems/puma-8.0.2/README.md +484 -0
  107. data/vendor/bundle/ruby/4.0.0/gems/puma-8.0.2/docs/jungle/README.md +9 -0
  108. data/vendor/bundle/ruby/4.0.0/gems/puma-8.0.2/docs/jungle/rc.d/README.md +74 -0
  109. data/vendor/bundle/ruby/4.0.0/gems/racc-1.8.1/ChangeLog +846 -0
  110. data/vendor/bundle/ruby/4.0.0/gems/racc-1.8.1/README.ja.rdoc +58 -0
  111. data/vendor/bundle/ruby/4.0.0/gems/racc-1.8.1/README.rdoc +60 -0
  112. data/vendor/bundle/ruby/4.0.0/gems/rack-3.2.6/CHANGELOG.md +1346 -0
  113. data/vendor/bundle/ruby/4.0.0/gems/rack-3.2.6/MIT-LICENSE +20 -0
  114. data/vendor/bundle/ruby/4.0.0/gems/rack-3.2.6/README.md +384 -0
  115. data/vendor/bundle/ruby/4.0.0/gems/rainbow-3.1.1/Changelog.md +101 -0
  116. data/vendor/bundle/ruby/4.0.0/gems/rainbow-3.1.1/LICENSE +20 -0
  117. data/vendor/bundle/ruby/4.0.0/gems/rainbow-3.1.1/README.markdown +227 -0
  118. data/vendor/bundle/ruby/4.0.0/gems/rake-13.4.2/MIT-LICENSE +21 -0
  119. data/vendor/bundle/ruby/4.0.0/gems/rake-13.4.2/README.rdoc +155 -0
  120. data/vendor/bundle/ruby/4.0.0/gems/rake-release-1.4.0/LICENSE +21 -0
  121. data/vendor/bundle/ruby/4.0.0/gems/rake-release-1.4.0/README.md +107 -0
  122. data/vendor/bundle/ruby/4.0.0/gems/regexp_parser-2.12.0/LICENSE +22 -0
  123. data/vendor/bundle/ruby/4.0.0/gems/rexml-3.4.4/LICENSE.txt +22 -0
  124. data/vendor/bundle/ruby/4.0.0/gems/rexml-3.4.4/README.md +57 -0
  125. data/vendor/bundle/ruby/4.0.0/gems/rspec-3.13.2/LICENSE.md +27 -0
  126. data/vendor/bundle/ruby/4.0.0/gems/rspec-3.13.2/README.md +47 -0
  127. data/vendor/bundle/ruby/4.0.0/gems/rspec-core-3.13.6/Changelog.md +2447 -0
  128. data/vendor/bundle/ruby/4.0.0/gems/rspec-core-3.13.6/LICENSE.md +26 -0
  129. data/vendor/bundle/ruby/4.0.0/gems/rspec-core-3.13.6/README.md +389 -0
  130. data/vendor/bundle/ruby/4.0.0/gems/rspec-expectations-3.13.5/Changelog.md +1366 -0
  131. data/vendor/bundle/ruby/4.0.0/gems/rspec-expectations-3.13.5/LICENSE.md +25 -0
  132. data/vendor/bundle/ruby/4.0.0/gems/rspec-expectations-3.13.5/README.md +326 -0
  133. data/vendor/bundle/ruby/4.0.0/gems/rspec-mocks-3.13.8/Changelog.md +1351 -0
  134. data/vendor/bundle/ruby/4.0.0/gems/rspec-mocks-3.13.8/LICENSE.md +25 -0
  135. data/vendor/bundle/ruby/4.0.0/gems/rspec-mocks-3.13.8/README.md +465 -0
  136. data/vendor/bundle/ruby/4.0.0/gems/rspec-support-3.13.7/Changelog.md +444 -0
  137. data/vendor/bundle/ruby/4.0.0/gems/rspec-support-3.13.7/LICENSE.md +23 -0
  138. data/vendor/bundle/ruby/4.0.0/gems/rspec-support-3.13.7/README.md +40 -0
  139. data/vendor/bundle/ruby/4.0.0/gems/rubocop-1.88.0/LICENSE.txt +20 -0
  140. data/vendor/bundle/ruby/4.0.0/gems/rubocop-1.88.0/README.md +255 -0
  141. data/vendor/bundle/ruby/4.0.0/gems/rubocop-ast-1.49.1/LICENSE.txt +20 -0
  142. data/vendor/bundle/ruby/4.0.0/gems/rubocop-ast-1.49.1/README.md +54 -0
  143. data/vendor/bundle/ruby/4.0.0/gems/rubocop-capybara-2.23.0/CHANGELOG.md +116 -0
  144. data/vendor/bundle/ruby/4.0.0/gems/rubocop-capybara-2.23.0/MIT-LICENSE.md +21 -0
  145. data/vendor/bundle/ruby/4.0.0/gems/rubocop-capybara-2.23.0/README.md +91 -0
  146. data/vendor/bundle/ruby/4.0.0/gems/rubocop-factory_bot-2.28.0/CHANGELOG.md +135 -0
  147. data/vendor/bundle/ruby/4.0.0/gems/rubocop-factory_bot-2.28.0/MIT-LICENSE.md +21 -0
  148. data/vendor/bundle/ruby/4.0.0/gems/rubocop-factory_bot-2.28.0/README.md +91 -0
  149. data/vendor/bundle/ruby/4.0.0/gems/rubocop-performance-1.26.1/LICENSE.txt +20 -0
  150. data/vendor/bundle/ruby/4.0.0/gems/rubocop-performance-1.26.1/README.md +100 -0
  151. data/vendor/bundle/ruby/4.0.0/gems/rubocop-rspec-3.10.2/CHANGELOG.md +1136 -0
  152. data/vendor/bundle/ruby/4.0.0/gems/rubocop-rspec-3.10.2/MIT-LICENSE.md +21 -0
  153. data/vendor/bundle/ruby/4.0.0/gems/rubocop-rspec-3.10.2/README.md +112 -0
  154. data/vendor/bundle/ruby/4.0.0/gems/rubocop-rspec_rails-2.32.0/CHANGELOG.md +98 -0
  155. data/vendor/bundle/ruby/4.0.0/gems/rubocop-rspec_rails-2.32.0/MIT-LICENSE.md +21 -0
  156. data/vendor/bundle/ruby/4.0.0/gems/rubocop-rspec_rails-2.32.0/README.md +93 -0
  157. data/vendor/bundle/ruby/4.0.0/gems/ruby-progressbar-1.13.0/LICENSE.txt +19 -0
  158. data/vendor/bundle/ruby/4.0.0/gems/ruby-progressbar-1.13.0/README.md +131 -0
  159. data/vendor/bundle/ruby/4.0.0/gems/securerandom-0.4.1/README.md +72 -0
  160. data/vendor/bundle/ruby/4.0.0/gems/simplecov-0.22.0/CHANGELOG.md +191 -0
  161. data/vendor/bundle/ruby/4.0.0/gems/simplecov-0.22.0/LICENSE +20 -0
  162. data/vendor/bundle/ruby/4.0.0/gems/simplecov-0.22.0/README.md +974 -0
  163. data/vendor/bundle/ruby/4.0.0/gems/simplecov-cobertura-3.2.0/LICENSE +202 -0
  164. data/vendor/bundle/ruby/4.0.0/gems/simplecov-cobertura-3.2.0/README.md +65 -0
  165. data/vendor/bundle/ruby/4.0.0/gems/simplecov-html-0.13.2/CHANGELOG.md +114 -0
  166. data/vendor/bundle/ruby/4.0.0/gems/simplecov-html-0.13.2/LICENSE +20 -0
  167. data/vendor/bundle/ruby/4.0.0/gems/simplecov-html-0.13.2/README.md +30 -0
  168. data/vendor/bundle/ruby/4.0.0/gems/simplecov_json_formatter-0.1.4/CHANGELOG.md +13 -0
  169. data/vendor/bundle/ruby/4.0.0/gems/simplecov_json_formatter-0.1.4/README.md +29 -0
  170. data/vendor/bundle/ruby/4.0.0/gems/typhoeus-1.6.0/CHANGELOG.md +465 -0
  171. data/vendor/bundle/ruby/4.0.0/gems/typhoeus-1.6.0/LICENSE +22 -0
  172. data/vendor/bundle/ruby/4.0.0/gems/typhoeus-1.6.0/README.md +588 -0
  173. data/vendor/bundle/ruby/4.0.0/gems/tzinfo-2.0.6/LICENSE +19 -0
  174. data/vendor/bundle/ruby/4.0.0/gems/tzinfo-2.0.6/README.md +406 -0
  175. data/vendor/bundle/ruby/4.0.0/gems/unicode-display_width-3.2.0/CHANGELOG.md +299 -0
  176. data/vendor/bundle/ruby/4.0.0/gems/unicode-display_width-3.2.0/MIT-LICENSE.txt +22 -0
  177. data/vendor/bundle/ruby/4.0.0/gems/unicode-display_width-3.2.0/README.md +194 -0
  178. data/vendor/bundle/ruby/4.0.0/gems/unicode-emoji-4.2.0/CHANGELOG.md +202 -0
  179. data/vendor/bundle/ruby/4.0.0/gems/unicode-emoji-4.2.0/MIT-LICENSE.txt +20 -0
  180. data/vendor/bundle/ruby/4.0.0/gems/unicode-emoji-4.2.0/README.md +205 -0
  181. data/vendor/bundle/ruby/4.0.0/gems/uri-1.1.1/README.md +55 -0
  182. data/vendor/bundle/ruby/4.0.0/gems/webmock-3.26.2/CHANGELOG.md +2148 -0
  183. data/vendor/bundle/ruby/4.0.0/gems/webmock-3.26.2/LICENSE +20 -0
  184. data/vendor/bundle/ruby/4.0.0/gems/webmock-3.26.2/README.md +1229 -0
  185. metadata +171 -4
  186. data/doc/file.README.html +0 -192
@@ -0,0 +1,507 @@
1
+ 1.17.4 / 2026-03-26
2
+ -------------------
3
+
4
+ Fixed:
5
+ * Fix union by-value ABI mismatch with float and double types on ARM64 and X86_64.
6
+ See #1177 and #1178 for details.
7
+ * Exclude libffi files, which are unnecessary. #1176
8
+
9
+
10
+ 1.17.3 / 2025-12-29
11
+ -------------------
12
+
13
+ Fixed:
14
+ * Opt-in for MFA requirement explicitly. #1159
15
+ * Fix type signature for FFI::AutoPointer#initialize, FFI::StructByReference#native_type and FFI::Struct#auto_ptr . #1158
16
+ * Fix function signature of function_call in FFI trampoline. #1154
17
+ It failed on `aarch64-mingw-ucrt`.
18
+ * Add workaround for segmentation faults on `aarch64-mingw-ucrt`. #1154
19
+ * Call super in `Library#freeze` . #1154
20
+ * Deny duplication of AutoPointer per #dup and #clone . #1173
21
+ They led to double free before.
22
+
23
+ Added:
24
+ * Add binary gems for Ruby-4.0, now providing binary gems for Ruby-3.0 to 4.0.
25
+ * Add msys2_mingw_dependencies for Windows Mingw for automatic installation of libffi. #1143
26
+ * Mark callback dispatcher thread as fork safe for Puma. #1156
27
+ * Add missing FFI::Platform module and LastError signatures. #1169
28
+
29
+ Removed:
30
+ * Drop fat binary gems for Ruby < 3.0
31
+ * Remove `FFI::TypesGenerator` from distributed gems. #1164
32
+ * Remove libffi build dir after install, safing some install space. #1157
33
+
34
+
35
+ 1.17.2 / 2025-04-15
36
+ -------------------
37
+
38
+ Fixed:
39
+ * #1144, #1145 Update libffi to 3.4.8 to fix installation issues on latest Macos on ARM64
40
+ * Various adjustments to run the specs cleanly on Ruby-3.5 master branch.
41
+
42
+
43
+ 1.17.1 / 2024-12-30
44
+ -------------------
45
+
46
+ Fixed:
47
+ * #1117 Restart async callback dispatcher thread after fork.
48
+ * #1133 Add ruby-3.4 native gem.
49
+ * #1134 Fix FFI::DataConverter non-generic usage in RBS files.
50
+
51
+
52
+ 1.17.0 / 2024-06-02
53
+ -------------------
54
+
55
+ Fixed:
56
+ * Add FFI::AbstractMemory#read_array_of_string . It was defined but not exposed to Ruby nor tested. #1070
57
+
58
+
59
+ 1.17.0.rc2 / 2024-04-22
60
+ -------------------
61
+
62
+ Fixed:
63
+ * Add missing write barriers to StructLayout#initialize causing a segfault with GC.stress. #1079
64
+
65
+
66
+ 1.17.0.rc1 / 2024-04-08
67
+ -------------------
68
+
69
+ Fixed:
70
+ * Fix type definitions on `aarch64-linux`. #1067, #1066
71
+ * Use RB_TEST for `Pointer.autorelease=` . #1065
72
+ So that `false` and `nil` are treated as falsey and anything else as truthy.
73
+ * Replace Fixnum by Integer. #1064
74
+ Fixnum is no longer present in the ruby language.
75
+ * Update `FFI::NativeType` doc. #1061
76
+ * Store FFI::Type::Mapped of FFI::StrPtrConverter in global instead of custom type map
77
+ * Various documentation fixes. #1042
78
+ * Update `FFI::Pointer#==` to return `false` if a pointer is compared to a non-pointer object, which is the expected behavior. #1083
79
+ * Avoid warning about undefined wariable `@ffi_functions` #1085
80
+ * Fix a very unlikely GC bug when using a callback block. # 1089
81
+
82
+ Added:
83
+ * Provide binary gems for many platforms. #990
84
+ * Add Windows fat binary gem for Ruby-3.3
85
+ * Add RBS type definitions for many user facing parts of the FFI API. #1042
86
+ * Improve fallback search path logic. #1088
87
+ Respect LD_LIBRARY_PATH and DYLD_LIBRARY_PATH on Macos.
88
+ * Update libffi to current git master branch.
89
+
90
+ Removed:
91
+ * Remove `enum CHAR_ARRAY` which is no longer used. #1063
92
+
93
+
94
+ 1.16.3 / 2023-10-04
95
+ -------------------
96
+
97
+ Fixed:
98
+ * Fix gcc error when building on CentOS 7. #1052
99
+ * Avoid trying to store new DataConverter type in frozen TypeDefs hash. #1057
100
+
101
+
102
+ 1.16.2 / 2023-09-25
103
+ -------------------
104
+
105
+ Fixed:
106
+ * Handle null pointer crash after fork. #1051
107
+
108
+
109
+ 1.16.1 / 2023-09-24
110
+ -------------------
111
+
112
+ Fixed:
113
+ * Fix compiling the builtin libffi. #1049
114
+
115
+
116
+ 1.16.0 / 2023-09-23
117
+ -------------------
118
+
119
+ Fixed:
120
+ * Fix an issue with signed bitmasks when using flags on the most significant bit. #949
121
+ * Fix FFI::Pointer#initialize using NUM2LL instead of NUM2ULL.
122
+ * Fix FFI::Type#inspect to properly display the constant name. #1002
123
+ * Use libffi closure allocations on hppa-Linux. #1017
124
+ Previously they would segfault.
125
+ * Fix class name of Symbol#inspect.
126
+ * Fix MSVC support of libtest. #1028
127
+ * Fix attach_function of functions ending in ? or ! #971
128
+
129
+ Added:
130
+ * Convert all C-based classes to TypedData and use write barriers. #994, #995, #996, #997, #998, #999, #1000, #1001, #1003, #1004, #1005, #1006, #1007, #1008, #1009, #1010, #1011, #1012
131
+ This results in less pressure on the garbage collector, since the objects can be promoted to the old generation, which means they only get marked on major GC.
132
+ * Implement `ObjectSpace.memsize_of()` of all C-based classes.
133
+ * Make FFI Ractor compatible. #1023
134
+ Modules extended per `extend FFI::Library` need to be frozen in order to be used by non-main Ractors.
135
+ This can be done by calling `freeze` below of all C interface definitions.
136
+ * In a Ractor it's possible to:
137
+ * load DLLs and call its functions, access its global variables
138
+ * use builtin typedefs
139
+ * use and modify ractor local typedefs
140
+ * define callbacks
141
+ * receive async callbacks from non-ruby threads
142
+ * use frozen FFI::Library based modules with all attributes (enums, structs, typedefs, functions, callbacks)
143
+ * invoke frozen functions and callbacks defined in the main Ractor
144
+ * use FFI::Struct definitions from the main Ractor
145
+ * In a Ractor it's impossible to:
146
+ * create new FFI::Library based modules
147
+ * create new FFI::Struct definitions
148
+ * use custom global typedefs
149
+ * use non-frozen FFI::Library based modules
150
+ * Allow type retrieval of attached functions+variables. #1023
151
+ * Make FFI classes `GC.compact` friendly. #1021
152
+ * Update libffi and disable custom trampoline when using libffi closure allocation. #1020
153
+ This is because libffi changed the way how closures are allocated to static trampolines.
154
+ * Add types.conf for loongarch64-linux. #943
155
+ * Add types.conf for sw_64-linux (Shen Wei 64-bit, based on Alpha). #1018
156
+ * Add support for aarch64-windows. #1035
157
+ * Windows: Update LoadLibrary error message to include error code. #1026
158
+ * Allow private release method for FFI::ManagedStruct and FFI::AutoPointer. #1029
159
+ * Add support for passing ABI version to FFI.map_library_name. #963
160
+ This adds the new class FFI::LibraryPath .
161
+ * Add support for ruby-3.2 to windows binary gem. #1047
162
+ * Enable debug symbols for `rake compile` builds to ease debugging. #1048
163
+
164
+ Removed:
165
+ * Remove allocator of AbstractMemory. #1013
166
+ This disables AbstractMemory.new, which has no practical use.
167
+ * Remove unused FFI::SizeTypes. #1022
168
+
169
+
170
+ 1.15.5 / 2022-01-10
171
+ -------------------
172
+
173
+ Fixed:
174
+ * Fix long double argument or return values on 32bit i686. #849
175
+ * FFI::ConstGenerator: avoid usage of the same binary file simultaneously. #929
176
+
177
+ Added:
178
+ * Add Windows fat binary gem for Ruby-3.1
179
+
180
+ Removed:
181
+ * Remove Windows fat binary gem for Ruby < 2.4
182
+
183
+
184
+ 1.15.4 / 2021-09-01
185
+ -------------------
186
+
187
+ Fixed:
188
+ * Fix build for uClibc. #913
189
+ * Correct module lookup when including `ffi-module` gem. #912
190
+
191
+ Changed:
192
+ * Use ruby code of the ffi gem in JRuby-9.2.20+. #915
193
+
194
+
195
+ 1.15.3 / 2021-06-16
196
+ -------------------
197
+
198
+ Fixed:
199
+ * Fix temporary packaging issue with libffi. #904
200
+
201
+
202
+ 1.15.2 / 2021-06-16
203
+ -------------------
204
+
205
+ Added:
206
+ * Add support for Windows MINGW-UCRT build. #903
207
+ * Add `/opt/homebrew/lib/` to fallback search paths to improve homebrew support. #880 #882
208
+
209
+ Changed:
210
+ * Regenerate `types.conf` for FreeBSD12 aarch64. #902
211
+
212
+
213
+ 1.15.1 / 2021-05-22
214
+ -------------------
215
+
216
+ Fixed:
217
+ * Append -pthread to linker options. #893
218
+ * Use arm or aarch64 to identify Apple ARM CPU arch. #899
219
+ * Allow overriding `gcc` with the `CC` env var in `const_generator.rb` and `struct_generator.rb`. #897
220
+
221
+
222
+ 1.15.0 / 2021-03-05
223
+ -------------------
224
+
225
+ Fixed:
226
+ * Fix MSVC build
227
+ * Fix async callbacks in conjunction with fork(). #884
228
+
229
+ Added:
230
+ * Allow to pass callbacks in varargs. #885
231
+ * Name the threads for FFI callback dispatcher and async thread calls for easier debugging. #883
232
+ The name can be retrieved by Thread.name and is shown by Thread.list.inspect etc.
233
+ Even gdb shows the thread name on supported operating systems.
234
+ * Add types.conf for powerpc64le-linux
235
+ * Add types.conf for riscv64-linux
236
+ * More release automation of ffi gems
237
+
238
+ Changed:
239
+ * Switch from rubygems-tasks to bundler/gem_helper
240
+
241
+ Removed:
242
+ * Remove unused VariadicInvoker#init
243
+
244
+
245
+ 1.14.2 / 2020-12-21
246
+ -------------------
247
+
248
+ Fixed:
249
+ * Fix builtin libffi on newer Ubuntu caused by an outdated Makefile.in . #863
250
+
251
+
252
+ 1.14.1 / 2020-12-19
253
+ -------------------
254
+
255
+ Changed:
256
+ * Revert changes to FFI::Pointer#write_string made in ffi-1.14.0.
257
+ It breaks compatibilty in a way that can cause hard to find errors. #857
258
+
259
+
260
+ 1.14.0 / 2020-12-18
261
+ -------------------
262
+
263
+ Added:
264
+ * Add types.conf for x86_64-msys, x86_64-haiku, aarch64-openbsd and aarch64-darwin (alias arm64-darwin)
265
+ * Add method AbstractMemory#size_limit? . #829
266
+ * Add new extconf option --enable-libffi-alloc which is enabled per default on Apple M1 (arm64-darwin).
267
+
268
+ Changed:
269
+ * Do NULL pointer check only when array length > 0 . #305
270
+ * Raise an error on an unknown order argument. #830
271
+ * Change FFI::Pointer#write_string to terminate with a NUL byte like other string methods. #805
272
+ * Update bundled libffi to latest master.
273
+
274
+ Removed:
275
+ * Remove win32/stdint.h and stdbool.h because of copyright issue. #693
276
+
277
+ Fixed:
278
+ * Fix possible UTF-8 load error in loader script interpretation. #792
279
+ * Fix segfault on non-array argument to #write_array_of_*
280
+ * Fix memory leak in MethodHandle . #815
281
+ * Fix possible segfault in combination with fiddle or other libffi using gems . #835
282
+ * Fix possibility to use ffi ruby gem with JRuby-9.3 . #763
283
+ * Fix a GC issue, when a callback Proc is used on more than 2 callback signatures. #820
284
+
285
+
286
+ 1.13.1 / 2020-06-09
287
+ -------------------
288
+
289
+ Changed:
290
+ * Revert use of `ucrtbase.dll` as default C library on Windows-MINGW.
291
+ `ucrtbase.dll` is still used on MSWIN target. #790
292
+ * Test for `ffi_prep_closure_loc()` to make sure we can use this function.
293
+ This fixes incorrect use of system libffi on MacOS Mojave (10.14). #787
294
+ * Update types.conf on x86_64-dragonflybsd
295
+
296
+
297
+ 1.13.0 / 2020-06-01
298
+ -------------------
299
+
300
+ Added:
301
+ * Add TruffleRuby support. Almost all specs are running on TruffleRuby and succeed. #768
302
+ * Add ruby source files to the java gem. This allows to ship the Ruby library code per platform java gem and add it as a default gem to JRuby. #763
303
+ * Add FFI::Platform::LONG_DOUBLE_SIZE
304
+ * Add bounds checks for writing to an inline char[] . #756
305
+ * Add long double as callback return value. #771
306
+ * Update type definitions and add types from stdint.h and stddef.h on i386-windows, x86_64-windows, x86_64-darwin, x86_64-linux, arm-linux, powerpc-linux. #749
307
+ * Add new type definitions for powerpc-openbsd and sparcv9-openbsd. #775, #778
308
+
309
+ Changed:
310
+ * Raise required ruby version to >= 2.3.
311
+ * Lots of cleanups and improvements in library, specs and benchmarks.
312
+ * Fix a lot of compiler warnings at the C-extension
313
+ * Fix several install issues on MacOS:
314
+ * Look for libffi in SDK paths, since recent versions of macOS removed it from `/usr/include` . #757
315
+ * Fix error `ld: library not found for -lgcc_s.10.4`
316
+ * Don't built for i386 architecture as it is deprecated
317
+ * Several fixes for MSVC build on Windows. #779
318
+ * Use `ucrtbase.dll` as default C library on Windows instead of old `msvcrt.dll`. #779
319
+ * Update builtin libffi to fix a Powerpc issue with parameters of type long
320
+ * Allow unmodified sourcing of (the ruby code of) this gem in JRuby and TruffleRuby as a default gem. #747
321
+ * Improve check to detect if a module has a #find_type method suitable for FFI. This fixes compatibility with stdlib `mkmf` . #776
322
+
323
+ Removed:
324
+ * Reject callback with `:string` return type at definition, because it didn't work so far and is not save to use. #751, #782
325
+
326
+
327
+ 1.12.2 / 2020-02-01
328
+ -------------------
329
+
330
+ * Fix possible segfault at FFI::Struct#[] and []= after GC.compact . #742
331
+
332
+
333
+ 1.12.1 / 2020-01-14
334
+ -------------------
335
+
336
+ Added:
337
+ * Add binary gem support for ruby-2.7 on Windows
338
+
339
+
340
+ 1.12.0 / 2020-01-14
341
+ -------------------
342
+
343
+ Added:
344
+ * FFI::VERSION is defined as part of `require 'ffi'` now.
345
+ It is no longer necessary to `require 'ffi/version'` .
346
+
347
+ Changed:
348
+ * Update libffi to latest master.
349
+
350
+ Deprecated:
351
+ * Overwriting struct layouts is now warned and will be disallowed in ffi-2.0. #734, #735
352
+
353
+
354
+ 1.11.3 / 2019-11-25
355
+ -------------------
356
+
357
+ Removed:
358
+ * Remove support for tainted objects which cause deprecation warnings in ruby-2.7. #730
359
+
360
+
361
+ 1.11.2 / 2019-11-11
362
+ -------------------
363
+
364
+ Added:
365
+ * Add DragonFlyBSD as a platform. #724
366
+
367
+ Changed:
368
+ * Sort all types.conf files, so that files and changes are easier to compare.
369
+ * Regenerated type conf for freebsd12 and x86_64-linux targets. #722
370
+ * Remove MACOSX_DEPLOYMENT_TARGET that was targeting very old version 10.4. #647
371
+ * Fix library name mangling for non glibc Linux/UNIX. #727
372
+ * Fix compiler warnings raised by ruby-2.7
373
+ * Update libffi to latest master.
374
+
375
+
376
+ 1.11.1 / 2019-05-20
377
+ -------------------
378
+
379
+ Changed:
380
+ * Raise required ruby version to >=2.0. #699, #700
381
+ * Fix a possible linker error on ruby < 2.3 on Linux.
382
+
383
+
384
+ 1.11.0 / 2019-05-17
385
+ -------------------
386
+ This version was yanked on 2019-05-20 to fix an install issue on ruby-1.9.3. #700
387
+
388
+ Added:
389
+ * Add ability to disable or force use of system libffi. #669
390
+ Use like `gem inst ffi -- --enable-system-libffi` .
391
+ * Add ability to call FFI callbacks from outside of FFI call frame. #584
392
+ * Add proper documentation to FFI::Generator and ::Task
393
+ * Add gemspec metadata. #696, #698
394
+
395
+ Changed:
396
+ * Fix stdcall on Win32. #649, #669
397
+ * Fix load paths for FFI::Generator::Task
398
+ * Fix FFI::Pointer#read_string(0) to return a binary String. #692
399
+ * Fix benchmark suite so that it runs on ruby-2.x
400
+ * Move FFI::Platform::CPU from C to Ruby. #663
401
+ * Move FFI::StructByReference to Ruby. #681
402
+ * Move FFI::DataConverter to Ruby (#661)
403
+ * Various cleanups and improvements of specs and benchmarks
404
+
405
+ Removed:
406
+ * Remove ruby-1.8 and 1.9 compatibility code. #683
407
+ * Remove unused spec files. #684
408
+
409
+
410
+ 1.10.0 / 2019-01-06
411
+ -------------------
412
+
413
+ Added:
414
+ * Add /opt/local/lib/ to ffi's fallback library search path. #638
415
+ * Add binary gem support for ruby-2.6 on Windows
416
+ * Add FreeBSD on AArch64 and ARM support. #644
417
+ * Add FFI::LastError.winapi_error on Windows native or Cygwin. #633
418
+
419
+ Changed:
420
+ * Update to rake-compiler-dock-0.7.0
421
+ * Use 64-bit inodes on FreeBSD >= 12. #644
422
+ * Switch time_t and suseconds_t types to long on FreeBSD. #627
423
+ * Make register_t long_long on 64-bit FreeBSD. #644
424
+ * Fix Pointer#write_array_of_type #637
425
+
426
+ Removed:
427
+ * Drop binary gem support for ruby-2.0 and 2.1 on Windows
428
+
429
+
430
+ 1.9.25 / 2018-06-03
431
+ -------------------
432
+
433
+ Changed:
434
+ * Revert closures via libffi.
435
+ This re-adds ClosurePool and fixes compat with SELinux enabled systems. #621
436
+
437
+
438
+ 1.9.24 / 2018-06-02
439
+ -------------------
440
+
441
+ Security Note:
442
+
443
+ This update addresses vulnerability CVE-2018-1000201: DLL loading issue which can be hijacked on Windows OS, when a Symbol is used as DLL name instead of a String. Found by Matthew Bush.
444
+
445
+ Added:
446
+ * Added a CHANGELOG file
447
+ * Add mips64(eb) support, and mips r6 support. (#601)
448
+
449
+ Changed:
450
+ * Update libffi to latest changes on master.
451
+ * Don't search in hardcoded /usr paths on Windows.
452
+ * Don't treat Symbol args different to Strings in ffi_lib.
453
+ * Make sure size_t is defined in Thread.c. Fixes #609
454
+
455
+
456
+ 1.9.23 / 2018-02-25
457
+ -------------------
458
+
459
+ Changed:
460
+ * Fix unnecessary rebuild of configure in darwin multi arch. Fixes #605
461
+
462
+
463
+ 1.9.22 / 2018-02-22
464
+ -------------------
465
+
466
+ Changed:
467
+ * Update libffi to latest changes on master.
468
+ * Update detection of system libffi to match new requirements. Fixes #617
469
+ * Prefer bundled libffi over system libffi on Mac OS.
470
+ * Do closures via libffi. This removes ClosurePool and fixes compat with PaX. #540
471
+ * Use a more deterministic gem packaging.
472
+ * Fix unnecessary update of autoconf files at gem install.
473
+
474
+
475
+ 1.9.21 / 2018-02-06
476
+ -------------------
477
+
478
+ Added:
479
+ * Ruby-2.5 support by Windows binary gems. Fixes #598
480
+ * Add missing win64 types.
481
+ * Added support for Bitmask. (#573)
482
+ * Add support for MSYS2 (#572) and Sparc64 Linux. (#574)
483
+
484
+ Changed:
485
+ * Fix read_string to not throw an error on length 0.
486
+ * Don't use absolute paths for sh and env. Fixes usage on Adroid #528
487
+ * Use Ruby implementation for `which` for better compat with Windows. Fixes #315
488
+ * Fix compatibility with PPC64LE platform. (#577)
489
+ * Normalize sparc64 to sparcv9. (#575)
490
+
491
+ Removed:
492
+ * Drop Ruby 1.8.7 support (#480)
493
+
494
+
495
+ 1.9.18 / 2017-03-03
496
+ -------------------
497
+
498
+ Added:
499
+ * Add compatibility with Ruby-2.4.
500
+
501
+ Changed:
502
+ * Add missing shlwapi.h include to fix Windows build.
503
+ * Avoid undefined behaviour of LoadLibrary() on Windows. #553
504
+
505
+
506
+ 1.9.17 / 2017-01-13
507
+ -------------------
@@ -0,0 +1,24 @@
1
+ Copyright (c) 2008-2016, Ruby FFI project contributors
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without
5
+ modification, are permitted provided that the following conditions are met:
6
+ * Redistributions of source code must retain the above copyright
7
+ notice, this list of conditions and the following disclaimer.
8
+ * Redistributions in binary form must reproduce the above copyright
9
+ notice, this list of conditions and the following disclaimer in the
10
+ documentation and/or other materials provided with the distribution.
11
+ * Neither the name of the Ruby FFI project nor the
12
+ names of its contributors may be used to endorse or promote products
13
+ derived from this software without specific prior written permission.
14
+
15
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18
+ DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
19
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2008-2012 Ruby-FFI contributors
2
+
3
+ Permission is hereby granted, free of charge, to any person
4
+ obtaining a copy of this software and associated documentation
5
+ files (the "Software"), to deal in the Software without
6
+ restriction, including without limitation the rights to use,
7
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the
9
+ Software is furnished to do so, subject to the following
10
+ conditions:
11
+
12
+ The above copyright notice and this permission notice shall be
13
+ included in all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,138 @@
1
+ # Ruby-FFI https://github.com/ffi/ffi/wiki
2
+
3
+ ## Description
4
+
5
+ Ruby-FFI is a gem for programmatically loading dynamically-linked native
6
+ libraries, binding functions within them, and calling those functions
7
+ from Ruby code. Moreover, a Ruby-FFI extension works without changes
8
+ on CRuby (MRI), JRuby, Rubinius and TruffleRuby. [Discover why you should write your next extension
9
+ using Ruby-FFI](https://github.com/ffi/ffi/wiki/why-use-ffi).
10
+
11
+ ## Features
12
+
13
+ * Intuitive DSL
14
+ * Supports all C native types
15
+ * C structs (also nested), enums and global variables
16
+ * Callbacks from C to Ruby
17
+ * Automatic garbage collection of native memory
18
+ * Usable in Ractor: [How-to-use-FFI-in-Ruby-Ractors](https://github.com/ffi/ffi/wiki/Ractors)
19
+
20
+ ## Synopsis
21
+
22
+ ```ruby
23
+ require 'ffi'
24
+
25
+ module MyLib
26
+ extend FFI::Library
27
+ ffi_lib 'c'
28
+ attach_function :puts, [ :string ], :int
29
+ end
30
+
31
+ MyLib.puts 'Hello, World using libc!'
32
+ ```
33
+
34
+ For less minimalistic and more examples you may look at:
35
+
36
+ * The [documentation](https://www.rubydoc.info/gems/ffi)
37
+ * the `samples/` folder
38
+ * the examples on the [wiki](https://github.com/ffi/ffi/wiki)
39
+ * the projects using FFI listed on the wiki: https://github.com/ffi/ffi/wiki/projects-using-ffi
40
+
41
+ ## Requirements
42
+
43
+ When installing the gem on CRuby (MRI), you will need:
44
+ * A C compiler (e.g., Xcode on macOS, `gcc` or `clang` on everything else)
45
+ Optionally (speeds up installation):
46
+ * The `libffi` library and development headers - this is commonly in the `libffi-dev` or `libffi-devel` packages
47
+
48
+ The ffi gem comes with a builtin libffi version, which is used, when the system libffi library is not available or too old.
49
+ Use of the system libffi can be enforced by:
50
+ ```
51
+ gem install ffi -- --enable-system-libffi # to install the gem manually
52
+ bundle config build.ffi --enable-system-libffi # for bundle install
53
+ ```
54
+ or prevented by `--disable-system-libffi`.
55
+
56
+ On Linux systems running with [PaX](https://en.wikipedia.org/wiki/PaX) (Gentoo, Alpine, etc.), FFI may trigger `mprotect` errors. You may need to disable [mprotect](https://en.wikibooks.org/wiki/Grsecurity/Appendix/Grsecurity_and_PaX_Configuration_Options#Restrict_mprotect.28.29) for ruby (`paxctl -m [/path/to/ruby]`) for the time being until a solution is found.
57
+
58
+ On FreeBSD systems pkgconf must be installed for the gem to be able to compile using clang. Install either via packages `pkg install pkgconf` or from ports via `devel/pkgconf`.
59
+
60
+ On JRuby and TruffleRuby, there are no requirements to install the FFI gem, and `require 'ffi'` works even without installing the gem (i.e., the gem is preinstalled on these implementations).
61
+
62
+ ## Installation
63
+
64
+ From rubygems:
65
+
66
+ [sudo] gem install ffi
67
+
68
+ From a Gemfile using git or GitHub
69
+
70
+ gem 'ffi', github: 'ffi/ffi', submodules: true
71
+
72
+ or from the git repository on github:
73
+
74
+ git clone git://github.com/ffi/ffi.git
75
+ cd ffi
76
+ git submodule update --init --recursive
77
+ bundle install
78
+ rake install
79
+
80
+ ### Install options:
81
+
82
+ * `--enable-system-libffi` : Force usage of system libffi
83
+ * `--disable-system-libffi` : Force usage of builtin libffi
84
+ * `--enable-libffi-alloc` : Force closure allocation by libffi
85
+ * `--disable-libffi-alloc` : Force closure allocation by builtin method
86
+
87
+ ## License
88
+
89
+ The ffi library is covered by the BSD license, also see the LICENSE file.
90
+ The specs are covered by the same license as [ruby/spec](https://github.com/ruby/spec), the MIT license.
91
+
92
+ ## Credits
93
+
94
+ The following people have submitted code, bug reports, or otherwise contributed to the success of this project:
95
+
96
+ * Alban Peignier <alban.peignier@free.fr>
97
+ * Aman Gupta <aman@tmm1.net>
98
+ * Andrea Fazzi <andrea.fazzi@alcacoop.it>
99
+ * Andreas Niederl <rico32@gmx.net>
100
+ * Andrew Cholakian <andrew@andrewvc.com>
101
+ * Antonio Terceiro <terceiro@softwarelivre.org>
102
+ * Benoit Daloze <eregontp@gmail.com>
103
+ * Brian Candler <B.Candler@pobox.com>
104
+ * Brian D. Burns <burns180@gmail.com>
105
+ * Bryan Kearney <bkearney@redhat.com>
106
+ * Charlie Savage <cfis@zerista.com>
107
+ * Chikanaga Tomoyuki <nagachika00@gmail.com>
108
+ * Hongli Lai <hongli@phusion.nl>
109
+ * Ian MacLeod <ian@nevir.net>
110
+ * Jake Douglas <jake@shiftedlabs.com>
111
+ * Jean-Dominique Morani <jdmorani@mac.com>
112
+ * Jeremy Hinegardner <jeremy@hinegardner.org>
113
+ * Jesús García Sáez <blaxter@gmail.com>
114
+ * Joe Khoobyar <joe@ankhcraft.com>
115
+ * Jurij Smakov <jurij@wooyd.org>
116
+ * KISHIMOTO, Makoto <ksmakoto@dd.iij4u.or.jp>
117
+ * Kim Burgestrand <kim@burgestrand.se>
118
+ * Lars Kanis <lars@greiz-reinsdorf.de>
119
+ * Luc Heinrich <luc@honk-honk.com>
120
+ * Luis Lavena <luislavena@gmail.com>
121
+ * Matijs van Zuijlen <matijs@matijs.net>
122
+ * Matthew King <automatthew@gmail.com>
123
+ * Mike Dalessio <mike.dalessio@gmail.com>
124
+ * NARUSE, Yui <naruse@airemix.jp>
125
+ * Park Heesob <phasis@gmail.com>
126
+ * Shin Yee <shinyee@speedgocomputing.com>
127
+ * Stephen Bannasch <stephen.bannasch@gmail.com>
128
+ * Suraj N. Kurapati <sunaku@gmail.com>
129
+ * Sylvain Daubert <sylvain.daubert@laposte.net>
130
+ * Victor Costan
131
+ * beoran@gmail.com
132
+ * ctide <christide@christide.com>
133
+ * emboss <Martin.Bosslet@googlemail.com>
134
+ * hobophobe <unusualtears@gmail.com>
135
+ * meh <meh@paranoici.org>
136
+ * postmodern <postmodern.mod3@gmail.com>
137
+ * wycats@gmail.com <wycats@gmail.com>
138
+ * Wayne Meissner <wmeissner@gmail.com>