You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wasm3/test/wasi/c-ray
Brenden Schumacher dd5df82e91
Fixed typos in relation to issue #211 (#212)
3 years ago
..
README.md Update wasi tests 3 years ago
c-ray-f.c Fixed typos in relation to issue #211 (#212) 3 years ago
c-ray.wasm Update wasi tests 3 years ago
scene Restructure tests 3 years ago
scene.jpg Restructure tests 3 years ago
sphfract Restructure tests 3 years ago
sphfract.jpg Restructure tests 3 years ago

README.md

C-Ray 1.1

Results

                           time(ms)
Node v13.0.1 (interpreter)   181527
wasm-micro-runtime            78499
wac (wax)                         -
wasm3                             -
Wasmer 0.11.0 singlepass       1447
wasmtime 0.7.0 (--optimize)     576
Wasmer 0.11.0 cranelift         565
wasmer-js (Node v13.0.1)        336
Wasmer 0.11.0 llvm            crash
WAVM                            299
Native (GCC 7.4.0, 32-bit)      249

Building

wasicc -g0 -O3 c-ray-f.c -Dunix -o c-ray.wasm

Running

export ENGINES_PATH=/opt/wasm_engines

# Wasm3
cat scene | ../../../build/wasm3 c-ray.wasm -s 1024x768 > foo.ppm

# wasm-micro-runtime
cat scene | $ENGINES_PATH/wasm-micro-runtime/core/iwasm/products/linux/build/iwasm c-ray.wasm -s 1024x768 > foo.ppm

# wasmtime
cat scene | wasmtime --optimize c-ray.wasm -- -s 1024x768 > foo.ppm

# Wasmer
cat scene | wasmer run c-ray.wasm -- -s 1024x768 > foo.ppm
cat scene | wasmer run --backend singlepass c-ray.wasm -- -s 1024x768 > foo.ppm
cat scene | wasmer run --backend llvm       c-ray.wasm -- -s 1024x768 > foo.ppm

# Wasmer-JS (V8)
cat scene | wasmer-js run c-ray.wasm -s 1024x768 > foo.ppm

cat scene | node --wasm_interpret_all $(which wasmer-js) run c-ray.wasm -s 1024x768 > foo.ppm

# WAVM
cat scene | $ENGINES_PATH/WAVM/Release/bin/wavm run c-ray.wasm -s 1024x768 > foo.ppm