Registry / utility / ffi-inliner

ffi-inliner

JSON →
library0.2.4rbrubygemsunverified

With ffi-inliner you can run C code within your ruby script.

gem install ffi-inliner
INSTALL
IMPORT
SIG · FFI-INLINER
F
ffi-inliner
utilityrubyv0.2.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

FFI
require 'ffi-inliner'

Inline C code and call it from Ruby

require 'ffi-inliner' # Inline C code to add two numbers FFI::Inline::Compiler.compile do code <<-C int add(int a, int b) { return a + b; } C end puts add(3, 4) # => 7
Debug
Known issues
breakingRequires a C compiler (e.g., gcc) to be installed.
fix
Install a C compiler (e.g., build-essential on Debian/Ubuntu, Xcode Command Line Tools on macOS).
affects: >= 0.0.0
Upgrade
Version history
0.2.4latest on RubyGems
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
ffi-inliner — gem install ffi-inliner · libregistry