HyperDrive Archive from webassembly.org
$ npm install @hyperdrives/webassembly.org
or (Github):
$ npm install hyperdrives/webassembly.org
You can read the archive directly by simply requiring and initializing the hyperdrive with the correct public key.
const storage = require.resolve('@hyperdrives/webassembly.org')
const webassembly = require('hyperdrive')(storage, key, opts)
or using a convenient wrapper:
const webassembly = require('@hyperdrives/webassembly.org')(key, opts)
You can also leverage random-access-http to read the archive from the public Github repository.
'use strict'
const hyperdrive = require('hyperdrive')
const http = require('random-access-http')
const prefix = 'https://github.com/hyperdrives/webassembly.org/raw/master/'
const key ='082dc40709a26a382194c14db1e1cee90156d4671300b19282df1cb9bcf1d24c'
const drive = hyperdrive((filename) => http(prefix + filename), key)
webassembly.readdir('/', console.log)
The webassembly archive represents an offline archive of http://webassembly.org/
082dc40709a26a382194c14db1e1cee90156d4671300b19282df1cb9bcf1d24c