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

try fit wasm partially #225

Merged
merged 11 commits into from
Nov 26, 2024
Merged

try fit wasm partially #225

merged 11 commits into from
Nov 26, 2024

Conversation

xlfish233
Copy link
Contributor

Add the wasm feature, ensuring it functions correctly with worker-rs.
Temporarily remove the logic related to request_with_form_data involving files; I will implement a replacement for this later.
Note that multipart may not function with the wasm feature; I will look for an alternative solution in the future.
#224

@xlfish233
Copy link
Contributor Author

not(target_arch = "wasm32") test pass on my machine.

Copy link
Collaborator

@EdJoPaTo EdJoPaTo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Temporarily remove the logic related to request_with_form_data involving files; I will implement a replacement for this later.

This comment raised some questions but I think it only targets wasm and is not affecting the existing features for unix/windows targets?

I have not looked into this that much so far, only glanced over it to give an initial feedback. I hope it doesn't feel too rushed.

Cargo.toml Outdated Show resolved Hide resolved
src/client_reqwest.rs Outdated Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
src/client_reqwest.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
src/client_reqwest.rs Outdated Show resolved Hide resolved
@xlfish233
Copy link
Contributor Author

Temporarily remove the logic related to request_with_form_data involving files; I will implement a replacement for this later.暂时删除涉及文件的request_with_form_data相关逻辑;我稍后将对此进行替换。

This comment raised some questions but I think it only targets wasm and is not affecting the existing features for unix/windows targets?这个评论提出了一些问题,但我认为它只针对 wasm,不会影响 unix/windows 目标的现有功能?

I have not looked into this that much so far, only glanced over it to give an initial feedback. I hope it doesn't feel too rushed.到目前为止,我还没有对此进行太多研究,只是浏览了一下以给出初步反馈。我希望它不会让人感觉太匆忙。

Thank you for reviewing my work. Here are some details regarding this commit:

This commit was somewhat rushed as it is intended for my bot project, which required a quick turnaround.

All modifications are focused on the WebAssembly (WASM) target and its features.
The logic for other target platforms, such as Unix and Windows, remains unchanged, so I believe the functionality should still be intact on these systems.

I will carefully consider your suggestions and work on developing an alternative method for attaching files in the request_with_form_data function.

@EdJoPaTo
Copy link
Collaborator

Personally I am fine with a PR not including file support for WASM as long as it stays intact for existing users. Having WASM without file support is more than having no WASM support ;)

@xlfish233
Copy link
Contributor Author

I've just updated some of the work by incorporating most of your suggestions. However, I believe there's still significant room for improvement. Could you provide further feedback?

src/client_reqwest.rs Outdated Show resolved Hide resolved
src/client_reqwest.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
src/client_reqwest.rs Outdated Show resolved Hide resolved
src/client_reqwest.rs Outdated Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
@xlfish233
Copy link
Contributor Author

Thank you for your valuable feedback on my pull request. I appreciate the insights and suggestions you've provided, many of which I hadn't considered and are definitely worth adopting. Due to my current involvement in other projects, it might take some time before I can continue with the next set of changes for this PR. I'll keep you updated on my progress. @EdJoPaTo

@EdJoPaTo
Copy link
Collaborator

@xlfish233 I should be able to push to your branch (Edits by maintainers are allowed).
I can remove the second feature and fully do it via cfg(target_arch).

For other things I would like your input and wait for you when you have the time.

Thank you for your valuable feedback on my pull request. I appreciate the insights and suggestions you've provided, many of which I hadn't considered and are definitely worth adopting.

Likewise! Working together on this seems working well to get this integrated!

@xlfish233
Copy link
Contributor Author

most recent commit i try only use target_arch = "wasm32" to difference it. now,it work's well at existing and can run with --target wasm32-unknown-unknown --no-default-features --features async-http-client

Copy link
Collaborator

@EdJoPaTo EdJoPaTo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! I added a CI task to test the Wasm support which also works. ✨

I am getting into nitpicking with my review so its in a good shape already! Additionally to the new comments, please check the past review comments which I haven't marked as resolved yet. :)

Cargo.toml Outdated Show resolved Hide resolved
src/client_reqwest.rs Outdated Show resolved Hide resolved
src/client_reqwest.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@EdJoPaTo EdJoPaTo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another nitpick. Other than that it seems like a good thing to add to frankenstein. @ayrat555 what are your thoughts on this?

src/client_reqwest.rs Show resolved Hide resolved
src/client_reqwest.rs Outdated Show resolved Hide resolved
xlfish233 and others added 2 commits November 14, 2024 09:41
@EdJoPaTo
Copy link
Collaborator

Im not sure why the CI is failing… 👀

@xlfish233
Copy link
Contributor Author

Im not sure why the CI is failing… 👀

Seem caused by wasm target has some unreachable codes

@xlfish233
Copy link
Contributor Author

wasm target has many warning unreachable pattern. may be it can be fixed by adding many cfg target something,but it's may not a good idea.

@xlfish233
Copy link
Contributor Author

wasm target has many warning unreachable pattern. may be it can be fixed by adding many cfg target something,but it's may not a good idea.

what do you think @EdJoPaTo

@xlfish233
Copy link
Contributor Author

Seem it caused by other matters,not from this changes.

@EdJoPaTo
Copy link
Collaborator

yeah, its also failing for the main master branch: https://github.com/ayrat555/frankenstein/actions/runs/11809675193

@ayrat555
Copy link
Owner

sorry for a late reply. I think a found the problem
#230

@ayrat555 ayrat555 merged commit 2c1a4ec into ayrat555:master Nov 26, 2024
10 of 29 checks passed
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

Successfully merging this pull request may close these issues.

3 participants