Nodejs Compatibility #3

Open
opened 11 months ago by CEbbinghaus · 2 comments
CEbbinghaus commented 11 months ago (Migrated from github.com)

Now I know this isn't a priority but it would be nice if lines 45-46 in usdpl-front/src/connection.rs
91149f9dfc/usdpl-front/src/connection.rs (L45-L46)
could be changed to not rely on the "window" object but instead, just call fetch directly. As such would make it possible to run from nodejs which also has a built-in fetch function.

Now I know this isn't a priority but it would be nice if lines 45-46 in usdpl-front/src/connection.rs https://github.com/NGnius/usdpl-rs/blob/91149f9dfcb59ee264b009fc97ad834f21c337cb/usdpl-front/src/connection.rs#L45-L46 could be changed to not rely on the "window" object but instead, just call fetch directly. As such would make it possible to run from nodejs which also has a built-in fetch function.
NGnius commented 11 months ago (Migrated from github.com)

I'm not actually sure how do that through Rust's WASM bindings, but I don't see why it wouldn't be possible.

There's a lot of technical debt in this project right now because I've only been adding to it when I need to do something fancy in a Decky plugin. With a bit of luck this will be fixed along with the refactor/rewrite for #2 ... whenever I have some motivation to do that.

I'm not actually sure how do that through Rust's WASM bindings, but I don't see why it wouldn't be possible. There's a lot of technical debt in this project right now because I've only been adding to it when I need to do something fancy in a Decky plugin. With a bit of luck this will be fixed along with the refactor/rewrite for #2 ... whenever I have some motivation to do that.
CEbbinghaus commented 11 months ago (Migrated from github.com)

I raised an issue in rustwasm/wasm-bindgen#3377 to add support for cross-runtime fetch support which would hopefully make it simple enough to fix this too. Until then that is the main blocker for this Issue

I raised an issue in rustwasm/wasm-bindgen#3377 to add support for cross-runtime fetch support which would hopefully make it simple enough to fix this too. Until then that is the main blocker for this Issue
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: NG-SD-Plugins/usdpl-rs#3
Loading…
There is no content yet.