commit | 76dcceebe2713d12626b1eb02595f13ecaecbf75 | [log] [tgz] |
---|---|---|
author | Todd Wang <toddw@google.com> | Mon Mar 07 11:34:31 2016 -0800 |
committer | Todd Wang <toddw@google.com> | Mon Mar 07 11:34:31 2016 -0800 |
tree | 404d6179a8fb1e834e62a91f7ee4209a80951ab2 | |
parent | 01efdd4b155f914831cc49d73b52ebef90fca124 [diff] |
js.core: Remove generated IsZero logic. The purpose of the IsZero logic was as a speed-up; the normal vom zero-field encoding is slow, since it actually encodes fields and then backtracks to throw away zero-valued fields. However the generated IsZero was actually significantly *slower*, for the native types case, and possibly also the non-native types case. In the future we will re-enable the IsZero logic for simple cases (no native types, no typeobject or union). And we may enable IsZero for the more complicated cases, if we can come up with a simple strategy that is actually faster that the default backtracking implementation. MultiPart: 4/6 Change-Id: Ic6e60d44142b5dc2a2c273efba6f6e5dbd1177f4
This repository defines the JavaScript API for Vanadium. The client and server APIs defined here work both in Node.js and the browser.
npm install --save vanadium/js
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