Dan Cross cross
cross commented on pull request vitrine/wmaker#7 2025-12-02 13:48:02 -05:00
Rewrite WUtils notification.c in Rust

I'm mildly bummed out that this went away, because it's decently concise, which is nice.

cross commented on pull request vitrine/wmaker#7 2025-12-02 11:20:01 -05:00
Rewrite WUtils notification.c in Rust

Is it just me, or is the formatting here kind of off?

cross approved vitrine/wmaker#3 2025-12-02 11:17:02 -05:00
Rewrite WUtils string.c in Rust
cross approved vitrine/wmaker#4 2025-12-02 11:09:55 -05:00
Rewrite WUtils bagtree.c in Rust
cross commented on pull request vitrine/wmaker#4 2025-12-02 11:09:44 -05:00
Rewrite WUtils bagtree.c in Rust

ok, I think that's fine.

cross approved vitrine/wmaker#6 2025-11-25 16:34:57 -05:00
Rewrite WUtils tree.c in Rust
cross commented on pull request vitrine/wmaker#6 2025-11-25 16:30:11 -05:00
Rewrite WUtils tree.c in Rust

I wonder about extracting this into a small function that wraps an Option or something? Probably not worth it.

cross suggested changes for vitrine/wmaker#3 2025-10-31 11:02:43 -04:00
Rewrite WUtils string.c in Rust
cross commented on pull request vitrine/wmaker#3 2025-10-31 11:02:43 -04:00
Rewrite WUtils string.c in Rust

I don't think this is what you want, necessarily. You want to find a zero byte, sure, but looking beyond the first len bytes is not useful and may not even be correct, if the source string is not e.g. 0 terminated. I would argue that's a bug, but I could be wrong.

cross commented on pull request vitrine/wmaker#3 2025-10-31 11:02:43 -04:00
Rewrite WUtils string.c in Rust

So this will allocate a Vec<u8> to hold the trimmed bytes, and then invoke alloc_string to do another allocation. I don't know if there's a good way around that; perhaps use strndup? Something like,

cross commented on pull request vitrine/wmaker#5 2025-10-31 11:01:41 -04:00
Tweak start-captive-wmaker.sh to behave a little more nicely.

LGTM

cross commented on pull request vitrine/wmaker#4 2025-10-29 15:44:29 -04:00
Rewrite WUtils bagtree.c in Rust

It feels like you almost don't need this at all; you could do everything you need to do with the Bag abstraction by just making it a newtype over a BTreeMap, and then dereferencing the newtype pointer at the FFI boundary. Something like,

cross commented on pull request vitrine/wmaker#1 2025-10-29 12:19:25 -04:00
memory: replace most of memory.c with Rust mem

I'm merging this into another branch and will open a PR for that to the main repo, under refactor/wutil-rs.

When you went in and updated calls to malloc/free, did you also look at…

cross created pull request vitrine/wmaker#1 2025-10-14 07:24:22 -04:00
memory: replace most of memory.c with Rust mem
cross pushed to malloc-rs at cross/wmaker 2025-10-14 07:23:04 -04:00
cross created branch malloc-rs in cross/wmaker 2025-10-14 07:23:04 -04:00
cross pushed to refactor/riir at cross/wmaker 2025-10-14 07:21:49 -04:00
d91275d959 memory: replace most of memory.c with Rust mem
cross created repository cross/wmaker 2025-10-14 06:51:32 -04:00