Ruby support #1

Open
jaroslaw wants to merge 165 commits from ruby into main
6 changed files with 22 additions and 0 deletions
Showing only changes of commit b3cd04aad6 - Show all commits

View file

@ -0,0 +1,3 @@
function test_func()
rust_func(entity.index)
end

View file

@ -0,0 +1,5 @@
index = entity.index
function test_func()
rust_func(index)
end

View file

@ -0,0 +1,3 @@
function test_func()
rust_func(entity)
end

View file

@ -0,0 +1,3 @@
function test_func()
rust_func(Vec3(1.5, 2.5, -3.5))
end

View file

@ -0,0 +1,7 @@
function test_func(vec3)
-- raise unless vec3.is_a?(Vec3) # TODO: BevyScriptum::Vec3 and add example how to include it globally like Sinatra does
-- raise unless vec3.x == 1.5
-- raise unless vec3.y == 2.5
-- raise unless vec3.z == -3.5
mark_success()
end

View file

@ -4,6 +4,7 @@
// TODO: maybe unify api and call non thread methods non_send
// TODO: add tests for entity variable and buitin types for every runtime
// TODO: line numbers for errors
// TODO: caan rhai have Vec3 constructor instead of vec3_new
use std::{
collections::HashMap,