version = “0.1.0”
name = ”classifier_reborn"(
-), looks like thermite and cargo behave differently processing dashes.
extern crate la;to import macros
rake thermite:build checking for cargo... yes /usr/local/bin/cargo build --release Compiling ruru v0.9.2 /Users/chase/.cargo/registry/src/github.com-88ac128001ac3a9a/ruru-0.9.2/src/dsl.rs:152:72: 152:84 error: `$return_type:ty` is followed by `$body:block`, which is not allowed for `ty` fragments /Users/chase/.cargo/registry/src/github.com-88ac128001ac3a9a/ruru-0.9.2/src/dsl.rs:152 ($($arg_name: ident: $arg_type: ty),*) -> $return_type: ty $body: block ^~~~~~~~~~~~ error: aborting due to previous error error: Could not compile `ruru`. To learn more, run the command again with --verbose. rake aborted! Command failed with status (101): [/usr/local/bin/cargo build --release...] /Users/chase/.rvm/gems/ruby-2.4.0/gems/thermite-0.8.0/lib/thermite/cargo.rb:41:in `block in run_cargo' /Users/chase/.rvm/gems/ruby-2.4.0/gems/thermite-0.8.0/lib/thermite/cargo.rb:40:in `chdir' /Users/chase/.rvm/gems/ruby-2.4.0/gems/thermite-0.8.0/lib/thermite/cargo.rb:40:in `run_cargo' /Users/chase/.rvm/gems/ruby-2.4.0/gems/thermite-0.8.0/lib/thermite/cargo.rb:58:in `run_cargo_build' /Users/chase/.rvm/gems/ruby-2.4.0/gems/thermite-0.8.0/lib/thermite/tasks.rb:121:in `block in define_build_task' /Users/chase/.rvm/gems/ruby-2.4.0@global/gems/rake-12.0.0/exe/rake:27:in `<top (required)>' /Users/chase/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:15:in `eval' /Users/chase/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:15:in `<main>' Tasks: TOP => thermite:build (See full trace by running task with --trace)
Q1: Do the parameters in a Rust method count as references to prevent the Ruby VM from garbage collecting the parameters while the Rust method is running without GVL?
Q2: Does calling
let mut hsh = Hash::new(); in Rust allocate the object on the Ruby heap, or a separate heap?
Q3: Does Ruru call finalizer on the above
Hash automatically when its ownership scope ends? Or is it subject to garbage collection at a later time?
Q4: Are Ruby objects instantiated from Rust different in any way from the Ruby objects passed into Rust as parameters, or returned from Rust to Ruby?
ruby-syscode executed without GVL become safe? I suspect it does not, and only pure Rust code would be safe?
ruru. i thought about replacing each
daft_funktfunction with a native rust function but I'm not sure if there would be any performance benefit to doing so. Is this just a awful idea? Am I on to something here? More importantly, is this even possible?