(executables
 (names test_bytes binary)
 (libraries)
 (modes js))

(rule
 (target test_bytes.referencejs)
 (deps test_bytes.bc.js)
 (action
  (with-stdout-to
   %{target}
   (run node ./test_bytes.bc.js))))

(rule
 (alias runtest)
 (deps test_bytes.reference test_bytes.referencejs)
 (action
  (diff test_bytes.reference test_bytes.referencejs)))

(rule
 (target binary.referencejs)
 (deps binary.bc.js)
 (action
  (with-stdout-to
   %{target}
   (run node ./binary.bc.js))))

(alias
 (name runtest)
 (deps binary.referencejs))
