Skip to content

Instantly share code, notes, and snippets.

@selfup
Last active May 29, 2016 22:41
Show Gist options
  • Save selfup/3c9513a0e3feeda01b0c25ad1870ba4e to your computer and use it in GitHub Desktop.
Save selfup/3c9513a0e3feeda01b0c25ad1870ba4e to your computer and use it in GitHub Desktop.
class RustPoro
extend FFI::Library
@ffi_lib_path = BinaryPath.new.rust_binary
ffi_lib @ffi_lib_path
attach_function :read_json, [:string], :string
end
class RustController < ApplicationController
def show
json_string = ObjectForRust.new.to_json
@rust_to_ruby = rust_poro.read_json(json_string)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment