Skip to content
/ rfalse Public

An interpreter for the FALSE language, possibly the fastest in the world.

Notifications You must be signed in to change notification settings

m1kc/rfalse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rfalse

An interpreter for the FALSE language — possibly the fastest in the world.

  • Supports all language features;
  • Written in Rust;
  • Up to 38 times more performant than false-js (see benchmarks below). If you are aware of any faster implementations, please let me know!

Table of Contents

Benchmarks

Test false-js rfalse difference
Primes, n=1999 4392 ms 168 ms ~26x
Fibonacci, n=33 37597 ms 987 ms ~38x
Fibonacci, n=25 802 ms 21 ms ~38x

How to run

cargo run --release -- examples/hello.false

In no filename is given, stdin will be used instead.

WASM support

Experimental feature. WASM performance is about 2x worse than native build.

First, compile the WASM files:

wasm-pack build --release --target web

After that, run a webserver. For example:

python3 -m http.server 8000 -d .

Navigate to http://localhost:8000 and open the console.

Hacking

Run linter:

cargo clippy

Run tests:

cargo test

Run benchmarks:

cargo bench --bench perf

License

GNU LGPL v3

About

An interpreter for the FALSE language, possibly the fastest in the world.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published