Set up thermite

This commit is contained in:
Matthias Beyer 2017-02-04 12:30:55 +01:00
parent 4d1282d163
commit 5eaddbc6f2
4 changed files with 19 additions and 1 deletions

View file

@ -1,2 +1,5 @@
require "bundler/gem_tasks" require "bundler/gem_tasks"
task :default => :spec require 'thermite/tasks'
Thermite::Tasks.new(cargo_project_path: "..", cargo_workspace_member: "libimagruby")

5
libimagruby/ext/Rakefile Normal file
View file

@ -0,0 +1,5 @@
require 'thermite/tasks'
Thermite::Tasks.new(cargo_project_path: "..", cargo_workspace_member: "libimagruby")
task default: %w(thermite:build)

View file

@ -23,4 +23,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "bundler", "~> 1.13" spec.add_development_dependency "bundler", "~> 1.13"
spec.add_development_dependency "rake", "~> 10.0" spec.add_development_dependency "rake", "~> 10.0"
spec.add_development_dependency 'thermite', "~> 0.11", ">= 0.11.1"
spec.extensions << 'ext/Rakefile'
end end

View file

@ -1,5 +1,12 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
require 'thermite/fiddle'
toplevel_dir = File.dirname(File.dirname(__FILE__))
Thermite::Fiddle.load_module('init_imag',
cargo_project_path: toplevel_dir,
ruby_project_path: toplevel_dir)
module Imag module Imag
IMAG_INIT_FN_NAME = 'imag_ruby_initialize' IMAG_INIT_FN_NAME = 'imag_ruby_initialize'