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

fix: drop rusha #117

Merged
merged 3 commits into from
Jan 12, 2023
Merged

fix: drop rusha #117

merged 3 commits into from
Jan 12, 2023

Conversation

ThaUnknown
Copy link
Member

@ThaUnknown ThaUnknown commented Nov 2, 2022

What is the purpose of this pull request? (put an "X" next to item)

[ ] Documentation update
[ ] Bug fix
[ ] New feature
[ ] Other, please explain:

What changes did you make? (Give an overview)
replaced simple-sha1 with uint8-util, thus dropping rusha, replaced all buffer with uint8array

main function is now async, so this is breaking
Which issue (if any) does this pull request address?
webtorrent/webtorrent#2390
Is there anything you'd like reviewers to focus on?

@welcome
Copy link

welcome bot commented Nov 2, 2022

🙌 Thanks for opening this pull request! You're awesome.

@ThaUnknown ThaUnknown enabled auto-merge (squash) December 18, 2022 18:39
@ThaUnknown ThaUnknown merged commit 0d3be61 into webtorrent:master Jan 12, 2023
webtorrent-bot pushed a commit that referenced this pull request Jan 25, 2023
# [11.0.0](v10.0.2...v11.0.0) (2023-01-25)

### Bug Fixes

* **deps:** update dependency bencode to v3 ([#122](#122)) ([2bfae53](2bfae53))
* **deps:** update dependency get-stdin to v9 ([#93](#93)) ([e36a99e](e36a99e))
* **deps:** update dependency uint8-util to ^2.1.4 ([#129](#129)) ([35ede29](35ede29))
* drop rusha ([#117](#117)) ([0d3be61](0d3be61))
* release config ([#134](#134)) ([ec9bf75](ec9bf75))

### BREAKING CHANGES

* perf: drop rusha, buffer

* fix: error throw tests
@webtorrent-bot
Copy link

🎉 This PR is included in version 11.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@klchoi
Copy link

klchoi commented Aug 4, 2023

@ThaUnknown Sorry for bumping an old PR, but would you help me understand the decision of the breaking change?

From the diff, looks like parseTorrent become async is because decodeTorrentFile is async which is because of hash function from uint8-util is async. But since we only operate on the buffer, no I/O, no networking, then making it async doesn't seem to solve any problem.

@ThaUnknown ThaUnknown deleted the rusha branch August 4, 2023 13:56
@ThaUnknown
Copy link
Member Author

to make it faster in browser

@klchoi
Copy link

klchoi commented Aug 31, 2023

@ThaUnknown thanks for clarifying. I guess the native apis make more sense in webtorrent as we're hashing huge files there, but for this package we only hash torrent files which is really tiny. It's sad we're loosing the beautiful sync api.

Sorry for the rant. I really like the sync interface in nodejs.

Thanks for your contribution.

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

Successfully merging this pull request may close these issues.

4 participants