Sha256: 53f16f835ab4570c17a36b9eaba64023d81a9cd08680b6e042a6079909ff49e0
Contents?: true
Size: 388 Bytes
Versions: 2
Compression:
Stored size: 388 Bytes
Contents
#include<stdio.h> #include<ruby.h> extern char *hello_rust(void); VALUE hello(void) { char *hello = hello_rust(); printf("%s\n", hello); return Qnil; } // https://github.com/ruby/ruby/blob/trunk/README.EXT#L682 void Init_rust_example(void) { VALUE rust_example = rb_define_module("RustExample"); rb_define_singleton_method(rust_example, "hello", hello, 0); }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rust_example-0.1.0-x86_64-darwin-13 | ext/rust_example/rust_example.c |
rust_example-0.1.0-x86_64-linux | ext/rust_example/rust_example.c |