dcp-client 4.2.7 → 4.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/README.md +9 -7
- package/dist/dcp-client-bundle.js +44 -45
- package/generated/sandbox-definitions.json +1 -1
- package/index.js +64 -27
- package/libexec/evaluator-node.js +2 -2
- package/libexec/sandbox/access-lists.js +2 -14
- package/libexec/sandbox/bootstrap.js +6 -5
- package/libexec/sandbox/bravojs-env.js +8 -13
- package/libexec/sandbox/bravojs-init.js +2 -2
- package/libexec/sandbox/calculate-capabilities.js +2 -37
- package/libexec/sandbox/event-loop-virtualization.js +28 -8
- package/libexec/sandbox/gpu-timers.js +69 -0
- package/libexec/sandbox/native-event-loop.js +17 -15
- package/libexec/sandbox/sa-ww-simulation.js +2 -1
- package/package.json +5 -5
package/LICENSE.md
CHANGED
package/README.md
CHANGED
|
@@ -4,14 +4,9 @@ This is the official client library for DCP, the Distributed Compute Protocol.
|
|
|
4
4
|
|
|
5
5
|
## Release Notes
|
|
6
6
|
|
|
7
|
-
### Implementation Status
|
|
8
|
-
DCP is currently (May 2021) in testing for a limited set of developers under our Early Developer Preview program. If you would like to be part of our *First Dev* cohort, visit https://dcp.dev/ and sign up! We expect the network to be ready for at-scale, arbitrary workload in June 2021.
|
|
9
|
-
|
|
10
|
-
**Note:** This document discusses [BravoJS](https://github.com/wesgarland/bravojs), however, BravoJS support is not ready at this time. It will be finished during the Early Developer Preview, in time for our general public release; the documentation is geared toward that release.
|
|
11
|
-
|
|
12
7
|
### Supported Platforms
|
|
13
8
|
The DCP-Client code can be made to run in nearly any JavaScript environment which supports ES5 and XMLHttpRequest. Our officially-supported platforms are
|
|
14
|
-
- Node.js version
|
|
9
|
+
- Node.js version 14 (LTS)
|
|
15
10
|
- BravoJS, latest version
|
|
16
11
|
- Vanilla Web - no module system at all
|
|
17
12
|
|
|
@@ -38,9 +33,16 @@ If you are a web developer looking to get started quickly, there are is a sample
|
|
|
38
33
|
#### Self-Hosted Bundle
|
|
39
34
|
To host the bundle on your own server, simply acquire the dcp-client package and copy the files `dcp-client.js` and `dcp-client.css` into a directory on your web server that your web clients can access. We recommend using the `dcp/` directory under your document root.
|
|
40
35
|
|
|
41
|
-
### BravoJS
|
|
36
|
+
### BravoJS
|
|
42
37
|
To use the DCP Client library with BravoJS, you must make the bundle and the loader visible to your web application.
|
|
43
38
|
|
|
39
|
+
```html
|
|
40
|
+
<script src="/path/to/bravojs/bravo.js"></script>
|
|
41
|
+
<script src="https://scheduler.distributed.computer/dcp-client/dcp-client.js"></script>
|
|
42
|
+
<script>
|
|
43
|
+
const compute = require('dcp/compute');
|
|
44
|
+
</script>
|
|
45
|
+
```
|
|
44
46
|
## DCP-Client API
|
|
45
47
|
While methods of initializing dcp-client vary somewhat from platform to platform or framework to framework (see below), after initializing, you will have a way to access the key exports of the dcp-client library:
|
|
46
48
|
1. `compute` - Compute API; `compute.run`, `compute.for`, etc.
|