Module: Binaryen

Defined in:
lib/binaryen.rb,
lib/binaryen/error.rb,
lib/binaryen/command.rb,
lib/binaryen/version.rb

Defined Under Namespace

Classes: Command, Error, MaximumOutputExceeded, NonZeroExitStatus, Signal

Constant Summary collapse

VERSION =
"1.1.6.14"
BINARYEN_VERSION =
"version_116"

Class Method Summary collapse

Class Method Details

.bindirObject

Path to the vendored binaryen binary executables



24
25
26
# File 'lib/binaryen.rb', line 24

def bindir
  @bindir ||= File.join(vendordir, "bin")
end

.includedirObject

Path to the vendored binaryen headers and definitions



34
35
36
# File 'lib/binaryen.rb', line 34

def includedir
  @includedir ||= File.join(vendordir, "include")
end

.libdirObject

Path to the vendored binaryen libraries



29
30
31
# File 'lib/binaryen.rb', line 29

def libdir
  @libdir ||= File.join(vendordir, "lib")
end

.vendordirObject

Path to the vendored binaryen files



12
13
14
15
16
17
18
19
20
21
# File 'lib/binaryen.rb', line 12

def vendordir
  @vendordir ||= begin
    cpu = RbConfig::CONFIG["host_cpu"]
    os = RbConfig::CONFIG["host_os"]
    if os.include?("darwin")
      os = "darwin"
    end
    File.expand_path(File.join(File.dirname(__FILE__), "..", "vendor", "#{cpu}-#{os}"))
  end
end