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

Rewrite some of JavaScript API in "ext/node" to Rust #17809

Closed
4 of 6 tasks
bartlomieju opened this issue Feb 17, 2023 · 7 comments
Closed
4 of 6 tasks

Rewrite some of JavaScript API in "ext/node" to Rust #17809

bartlomieju opened this issue Feb 17, 2023 · 7 comments
Labels
good first issue Good for newcomers help wanted community help requested

Comments

@bartlomieju
Copy link
Member

bartlomieju commented Feb 17, 2023

An example PR that shows how it can be done: #17792

TODO:

@bartlomieju bartlomieju added good first issue Good for newcomers help wanted community help requested labels Feb 17, 2023
@bartlomieju bartlomieju pinned this issue Feb 17, 2023
@kt3k
Copy link
Member

kt3k commented Feb 18, 2023

I don't think we need to replace crypto-browserify file by file basis. What we use from crypto-browserify is mainly the 4 APIs publicEncrypt publicDecrypt privateEncrypt privateDecrypt, but crypto-browserify includes way more than that. I think we can implement these 4 APIs more directly by using some convenient crates from crates.io

@bartlomieju
Copy link
Member Author

Sounds good, thanks for investigating @kt3k!

@Antonio476587
Copy link
Contributor

Can I rewrite ext/node/polyfills/internal/util/inspect.mjs to Rust?

@iuioiua
Copy link
Contributor

iuioiua commented Mar 6, 2023

I want to implement crypto.Sign and crypto.Verify based on the work done in denoland/std#3190. However, it'd require bringing back some browserify-sign code deleted in #17792. Is that ok?

@kt3k
Copy link
Member

kt3k commented Mar 6, 2023

@Antonio476587
We are planning to replace util.inspect (of Node) by Deno.inspect first because they contain too much similar code (ref #17960). So it's not good time to do that now. (When that transition is finished, maybe it's worth it to rewrite Deno.inspect in Rust in the future)

@bartlomieju
Copy link
Member Author

@iuioiua it would be preferable to use a Rust crate to implement required APIs via ops. Since we already supported most of the required algorithms it seems it's not necessary to bring browserify-sign to implement it. @littledivy could you provide some pointers here?

@ry
Copy link
Member

ry commented Apr 7, 2023

Most of these issues are solved now. We'll open a new one if necessary.

@ry ry closed this as completed Apr 7, 2023
@ry ry unpinned this issue Apr 7, 2023
hardfist pushed a commit to hardfist/deno that referenced this issue Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted community help requested
Projects
None yet
Development

No branches or pull requests

5 participants