Sha256: 09815cecdf154317bb570fc02c7e85dce2b9c82ba8cef9ecfbddc3771ae4a4b0

Contents?: true

Size: 786 Bytes

Versions: 2

Compression:

Stored size: 786 Bytes

Contents

require "bundler/gem_tasks"
require "rspec/core/rake_task"
require 'rake/clean'

CLOBBER.include('lib/*{.so,.bundle}')


RSpec::Core::RakeTask.new(:spec)

task build: ["thermite:build", :build_ext]
task :default => [:clobber, :build, :spec]

require 'thermite/tasks'

Thermite::Tasks.new(cargo_project_path: "ext/pasta-bindings/libpasta/libpasta-capi/")

desc 'Run Rust & Ruby testsuites'
task test: ['thermite:build', 'thermite:test'] do
  # …
end

desc 'Build the libpasta C extension'  
task :build_ext do
  Dir.chdir("ext/pasta-bindings") do
    sh "USE_STATIC=1 STATIC_LIBPASTA=libpasta/libpasta-capi/target/release/libpasta.a make ruby"
  end
  cp "ext/pasta-bindings/ruby/pasta.so", "lib/"
end

task :clean do
  Dir.chdir("ext/pasta-bindings") do
    sh "make clean"
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
libpasta-0.1.0.pre.rc0-x86_64-linux Rakefile
libpasta-0.0.6-x86_64-linux Rakefile