!homDUJhmxHaZNgyLVA:matrix.org

binrw

165 Members
Official Matrix channel for the binread & binrw Rust libraries. Bridged to Discord. https://github.com/jam1garner/binrw/12 Servers

Load older messages


SenderMessageTime
7 Jan 2024
@snover:matrix.orgsnover it is currently always gated on verbose-backtrace feature, probably because i was not thinking very hard about it at the time 05:48:10
@_discord_214199485105045504:t2bot.ioscanmountgoat I think my confusion is why it works when I use a stable compiler if it's nightly only. Unless we're not talking about the same thing lol 05:48:53
@snover:matrix.orgsnoverwell you asked how to get it from proc-macro input :-)05:51:24
@snover:matrix.orgsnover i assume “while parsing field in <source>” is happening by the compiler diagnostics, the only one that binrw creates itself is “while parsing field '<field>' in <struct name>” 05:52:50
@_discord_214199485105045504:t2bot.ioscanmountgoat The second point sounds like what I want. What should I look up for that? 05:55:30
@snover:matrix.orgsnover the struct name comes from syn::DeriveInput::ident 05:56:51
@snover:matrix.orgsnover the code to emit that message is at binrw_derive/src/binrw/codegen/read_options/struct.rs:577 05:57:39
@snover:matrix.orgsnover maybe the disconnect is that you actually just want to know the information at runtime? in which case, binrw_derive is just emitting ::core::line! macro 05:58:47
@_discord_214199485105045504:t2bot.ioscanmountgoat Yeah I just need it printed to the console at runtime rather than in the macro code itself. I'll look over that code later. Thanks. 06:02:51
12 Jan 2024
@_discord_1058118632804196453:t2bot.ioawesomerly joined the room.18:22:25
@_discord_1058118632804196453:t2bot.ioawesomerly changed their display name from awesomerly#0 to awesomerly.18:22:26
@_discord_1058118632804196453:t2bot.ioawesomerly hi smg im prolly gonna copy the methods you used made a library wrapper around binrw if that's ok 18:22:26
@_discord_214199485105045504:t2bot.ioscanmountgoat awesomerly 18:26:54
@_discord_1058118632804196453:t2bot.ioawesomerly nevermind i found a crate that will do what i wanted, and maybe do PRs 18:27:26
@_discord_1058118632804196453:t2bot.ioawesomerly i'm trying to parse valve bsp files 18:27:30
@_discord_1058118632804196453:t2bot.ioawesomerly * nevermind i found a crate that will do what i wanted that also uses binrw, and maybe do PRs to it if necessary 18:27:42
@_discord_1058118632804196453:t2bot.ioawesomerly i was thinking tha tlike your project i would wrap around the binrw reading and wriitng functions and implement them as traits 18:28:08
@_discord_1058118632804196453:t2bot.ioawesomerly im a noob so excuse the unclear language 18:28:19
@_discord_214199485105045504:t2bot.ioscanmountgoat Which project of mine are you referring to? 18:29:26
@_discord_214199485105045504:t2bot.ioscanmountgoat I've found that binread generally works well enough as is without needing a wrapper. Depending on the file format you may need to use something different than binwrite. 18:32:27
@_discord_1058118632804196453:t2bot.ioawesomerly https://github.com/icewind1991/vbsp 18:33:55
@_discord_1058118632804196453:t2bot.ioawesomerly here's the project i found 18:33:59
@_discord_1058118632804196453:t2bot.ioawesomerly looking at it one thing that concerns me a bit is that the example tells you to read the entire file into memory and then pass it in 18:34:19
@_discord_1058118632804196453:t2bot.ioawesomerly im sure that using BinReaderExt with some kind of a streamed thing would save on memory 18:34:53
@_discord_1058118632804196453:t2bot.ioawesomerly perhaps 18:34:55
@_discord_1058118632804196453:t2bot.ioawesomerly idk this stuff is the first real thing i'm doing with rust 18:35:08
@_discord_1058118632804196453:t2bot.ioawesomerly some maps are hundreds of megabytes at max 18:37:12
@_discord_1058118632804196453:t2bot.ioawesomerly but usually they're in the tens of megabytes if they're big or like small enough to not matter 18:37:51
@_discord_1058118632804196453:t2bot.ioawesomerly but i worry that if i only want the info from a certain lump and from the header file 18:38:06
@_discord_1058118632804196453:t2bot.ioawesomerly that reading the entire thing into memory will be excessive 18:38:11

Show newer messages


Back to Room ListRoom Version: 6