Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
manumonti opened this issue Jul 24, 2023 · 2 comments
Closed

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

manumonti opened this issue Jul 24, 2023 · 2 comments
Assignees
Labels
developer experience Those issues that can make it difficult for a developer to use nucypher-ts documentation Improvements or additions to documentation

Comments

@manumonti
Copy link
Member

manumonti commented Jul 24, 2023

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.

@manumonti manumonti added documentation Improvements or additions to documentation developer experience Those issues that can make it difficult for a developer to use nucypher-ts labels Jul 24, 2023
@piotr-roslaniec
Copy link
Contributor

I agree with your remarks on 1 & 2 - These could be replaced by a link to external resource with some explanation and a quick "Getting started" section. nucypher-ts users should only need enough context about WASM to be able to run nucypher-ts in their preferred environment (web, mobile, node).

I think there is a prerequisite to a satisfactory documentation on WASM - The "developer" experience of bundling / packaging of nucyper-ts. This issue has already been documented here: #120. Solving this would make the link described in point 3 redundant.

@piotr-roslaniec
Copy link
Contributor

Closed by #299

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer experience Those issues that can make it difficult for a developer to use nucypher-ts documentation Improvements or additions to documentation
Projects
Status: Completed
Development

No branches or pull requests

2 participants