Convert net_CoalesceDirs function to Rust
Categories
(Core :: Networking, enhancement, P5)
Tracking
()
People
(Reporter: undef1nd, Assigned: wenzhaoliao)
References
Details
(Whiteboard: [necko-triaged])
Attachments
(2 files, 2 obsolete files)
+++ This bug was initially created as a clone of Bug #1620769 +++
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36
Steps to reproduce:
- Rewrite net_CoalesceDirs helper function to Rust
https://searchfox.org/mozilla-central/source/netwerk/base/nsURLHelper.cpp - Implement it in https://searchfox.org/mozilla-central/source/netwerk/base/rust-helper/src/lib.rs
- Call it from nsURLHelper.cpp
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Comment 1•5 years ago
|
||
This good-first-bug hasn't had any activity for 6 months, it is automatically unassigned.
For more information, please visit auto_nag documentation.
Updated•3 years ago
|
Hello, I'd be willing to take on this issue. Would be great if you could assign this to me
Updated•3 years ago
|
Do you want to keep the C-style nature of the algorithm (i.e. in-place modification of the string), or do you want a more rust-like approach, using splits, iterators etc? For that I would have to create new buffers to hold the processed data
Comment 4•3 years ago
|
||
It needs to work on an existing char buffer as it's called from our URL parser here
I know that, and I am passing that raw c string to the rust function, i was just wondering if you wanted to keep the in-place modification (i.e. iterating over the string, copying and moving bytes to overwrite unneeded parts of the path), or if it would also be possible to transform the string into a rust string, where I can use rust functions to more easily modify the string, and then finally copy the contents of the rust string over to the original string again.
Basically I'm unsure whether the in-place modification is just a consequence of the C-style algorithm or a performance consideration
Comment 6•3 years ago
•
|
||
It would be best to avoid any extra heap allocations as that would affect performance.
Comment 7•2 years ago
|
||
This good-first-bug hasn't had any activity for 2 months, it is automatically unassigned.
For more information, please visit BugBot documentation.
Rewrite net_CoalesceDirs helper function to Rust
https://searchfox.org/mozilla-central/source/netwerk/base/nsURLHelper.cpp
Implement it in
https://searchfox.org/mozilla-central/source/netwerk/base/rust-helper/src/lib.rs
Call it from nsURLHelper.cpp
Updated•2 years ago
|
Updated•2 years ago
|
Comment 9•2 years ago
|
||
This good-first-bug hasn't had any activity for 2 months, it is automatically unassigned.
For more information, please visit BugBot documentation.
Comment 10•2 years ago
|
||
Comment 11•2 years ago
|
||
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
| Assignee | ||
Comment 13•4 days ago
|
||
Updated•4 days ago
|
Description
•