commit | 1f163dcf5caec7082c5804c79ae009d2f57a8daf | [log] [tgz] |
---|---|---|
author | Shyam Jayaraman <bjornick@google.com> | Fri May 15 16:14:07 2015 -0700 |
committer | Shyam Jayaraman <bjornick@google.com> | Fri May 15 16:14:10 2015 -0700 |
tree | 6df4abcc3161ce0afe21ba445615a888ef613e0d | |
parent | 88b8843a7de2fbebfc912af08af248033a35a2cb [diff] |
js/core: Make decode async. This is step 1 in a multi step process to use a separate type flow between go and js. The separate type flow will allow us to use a new encoder/decoder for each rpc, but share the type messages between them. This should result in a huge perfomance improvement. I'm sending this change out separately because it's a monster and I don't want to hide the real type flow change in this monster. In the process, I also found a bug in the caveat validator that failed to validate async caveat chains when there were more than 1 caveat in the chain. Change-Id: Ida1814a1715e1bad492bcba4c4d522a576906ec7
This repository defines the JavaScript API for Vanadium. The client and server APIs defined here work both in Node.js and the browser.
npm
can be used to install this library:
npm install --save git@github.com:vanadium/js.git
Documentation for this API is available at https://jsdoc.v.io/ Tutorials can be found at https://v.io/tutorials/javascript/
The entry point to the API is through a module called vanadium
, everything else is considered private and should not be accessed by the users of the API.
The vanadium
module is exported as a global in the browser JavaScript library and for Browserify and Node.js the “main” property in the package.json
points to /src/vanadium
making it the index module and therefore Browserify and Node.js users can gain access to the API with:
var vanadium = require("vanadium");
One of the goals of this project is to only write the code once and have it run in both Node.js and browsers. Therefore, specific build and testing steps have been designed in the project to ensure this goal.
When run in a browser, vanadium.js
expects that the vanadium extension will be installed.
Bugs and feature requests should be filed in the Vanadium issue tracker.
GNU Make is used to build and test Vanadium.
Build everything:
make build
Test everything:
make test
Run a specific test suite:
make test-unit make test-unit-node make test-unit-browser make test-integration make test-integration-node make test-integration-browser
Remove all build and testing artifacts:
make clean