javascript 0.3.0

A JavaScript engine implementation in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
// feature probe for 'SharedArrayBuffer'
try {
  if (typeof SharedArrayBuffer === 'undefined') throw new Error('SharedArrayBuffer missing');
  var buf = new SharedArrayBuffer(8);
  if (!buf) throw new Error('SharedArrayBuffer failed');
  if (buf.byteLength !== 8) throw new Error('SharedArrayBuffer byteLength mismatch');
  console.log('OK');
} catch (e) {
  console.log('NO');
}