Last active
May 29, 2016 22:41
-
-
Save selfup/3c9513a0e3feeda01b0c25ad1870ba4e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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