Class: Rust::CWrapperGenerator
- Inherits:
-
Object
- Object
- Rust::CWrapperGenerator
- Defined in:
- lib/rust_require/c_wrapper_generator.rb,
lib/rust_require/c_wrapper_generator.rb
Overview
A Generator for Rust-to-C-wrappers Is initialized with a Json file containing relevant info about the rust file
Defined Under Namespace
Classes: WrapperFn
Instance Method Summary collapse
-
#generate_wrapper ⇒ Object
Generates a Rust-to-C code wrapper as rust code (String).
-
#initialize(json) ⇒ CWrapperGenerator
constructor
info file, already parsed with json.
Constructor Details
#initialize(json) ⇒ CWrapperGenerator
info file, already parsed with json
9 10 11 |
# File 'lib/rust_require/c_wrapper_generator.rb', line 9 def initialize(json) @json = json end |
Instance Method Details
#generate_wrapper ⇒ Object
Generates a Rust-to-C code wrapper as rust code (String)
14 15 16 |
# File 'lib/rust_require/c_wrapper_generator.rb', line 14 def generate_wrapper generate_mod_wrapper(@json, '') end |