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

Package the WASM compilation for Node? #31

Open
benwis opened this issue Jun 22, 2022 · 3 comments
Open

Package the WASM compilation for Node? #31

benwis opened this issue Jun 22, 2022 · 3 comments

Comments

@benwis
Copy link

benwis commented Jun 22, 2022

Hi @keiya01! I just found your og_image_writer crate, and it seems to do exactly what I need! I was just wondering if you had considered creating a WASM version compiled with the Node target, and publishing it to npm, to make it a bit easier for people to import. Happy to submit that as a PR, or if you'd prefer, to fork and maintain that separately. I'm also curious about a napi-rs version!

@keiya01
Copy link
Owner

keiya01 commented Jun 23, 2022

Thank you @benwis for sending issue!
I have already published node version pkg in https://www.npmjs.com/package/og_image_writer but can't you use this pkg in node.js?
And I'm interesting for support a napi-rs version! I will try to do it.

@benwis
Copy link
Author

benwis commented Jun 23, 2022

I probably can, but compiling with the node target means you can skip the init call on the server. I'd usually recommend using the exports in package.json to specify a browser version built using --target web and a node version built using --target node.

Glad it's already on npm!

@keiya01
Copy link
Owner

keiya01 commented Jun 23, 2022

Okay, I will optimize pkg for node.js.
Thank you for your suggestion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants