Skip to content

script language write in rust, simple but useless

Notifications You must be signed in to change notification settings

MrRooten/fscript-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduce

Running on bytecode, simple and useless program language, zero dependence script language.

Usage

Compile

cargo build --release

Test

While Test

println('test and benchmark self add 3000000')

i = 0
while i < 3000000 {
    i = i + 1
}

println(i)
target/release/fscript-rs ./test_script/test_while.fs
test and benchmark self add 3000000
3000000
count: 27000012
397.871106ms

Class Test

class Abc {
    fn __new__(self) {
        self.abc = 123
        return self
    }

    fn __str__(self) {
        return 'return string'
    }
}

a = Abc()
println(a)

println("Get a.abc")
println(a.abc)

if a.abc > 3 {
    println('a.abc > 3')
}
return string
Get a.abc
123
a.abc > 3
count: 44
675.794µs

For Test

a = [1, 2, 3, 4, 5]

for i in a {
    println(i)
}
1
2
3
4
5
count: 79
41.709µs

About

script language write in rust, simple but useless

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages