Skip to content

[Docs] Revisiting WASM integration in nucypher-ts #256

@manumonti

Description

@manumonti

From an adopter with no previous experience perspective, I think the WASM configuration can be tricky.

Reading the Get started - Install nucypher-ts section, we can extract that:

First, we can read "One dependency takes advantage of WASM". Does this mean it is totally necessary to handle WASM? or is there a chance that I finally use some nucypher-ts component that doesn't need to use WASM? If it's mandatory to integrate WASM, I would say something like "nucypher-ts takes advantage of WASM", treating the package as a whole.

Also, we find three links here:

  1. One explaining what WASM is. This is ok, but I would prefer a one-line description instead of a link with more information and subsections that a developer doesn't need to know to just use nucypher-ts.
  2. Another explaining the different ways in which I can load and run WASM code, using Fetch, WebAssembly.intantiate, XMLHttpRequest and so on. AFAIK, a developer importing nucypher-ts doesn't need to do this, so this information can be confusing and unnecessary.
  3. Another link with a webpack template (wasm-pack)[https://rustwasm.github.io/docs/wasm-pack/tutorials/npm-browser-packages/using-your-library.html] where WASM code is loaded. IMHO this is a not very useful read since it is not very oriented to nucypher-ts, and it would be better if a link to some simple nucypher-ts example is given here (like webpack-bundler). Also, as mentioned in [Docs] WASM-pack template project doesn't seem to work with node v18 #255, this code is outdated.

As a suggestion, maybe we need a new section for WASM configuration. Do you think this would make easy the understanding of WASM implications?

These are my impressions when trying to put myself in nucypher-newbie shoes. But these can be partial or I may be missing information, so we can discuss this here.

Metadata

Metadata

Labels

developer experienceThose issues that can make it difficult for a developer to use nucypher-tsdocumentationImprovements or additions to documentation

Type

No type

Projects

Status

Completed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions