rainbow-js
rainbow-js copied to clipboard
Document how to use as a JS library with `require("rainbow-js-arc")`
We should document the library people get when they require("rainbow-js-arc")
from a Node.js program. This is the API surface area that should be documented:
const rainbowLibrary = require("rainbow-js-arc");
const rainbowInstance =
rainbowLibrary.makeRainbow(
System_in, System_out, System_err, System_getenvAsync0,
System_getenvAsync1, System_exitAsync, System_fs);
const rainbowInstance2 =
rainbowLibrary.makeNodeRainbow(stdin, getStdout, getStderr);
const rainbowInstance3 = rainbowLibrary.getSharedRainbow();
The documentation for makeRainbow()
is bound to be the most complex part. If possible, we should document it thoroughly enough that people can write their own I/O systems for Rainbow.js like index-first.js
, index-last.js
, and rainbow-node-src.js
do.
any progress or demo/examples on this? thanks
No, there hasn't been any work on this since creating the issue. The best "documentation" right now is the code in the repo (index-first.js
, index-last.js
, rainbow-node.js
).
To make it slightly easier to channel effort on this whenever someone is motivated to work on it, I'll note this issue is related to:
- https://github.com/arclanguage/anarki/issues/227
i see. thanks