Just wanted to share some stuff I've been working on recently. This is mostly interesting for developers, but I wanted to post it here in case someone working on a CoH2-related project finds it useful.
vault
vault is a Rust library for parsing CoH2 replays. Basically you give it a CoH2 replay and it runs through the replay pulling out information, such as map, players, and chat messages. Once it's done, you get back an object that you can use for some task. For instance, as of version 19545 vault has been powering COH2.ORG's replay system. When you upload a replay here, an application gets run (more on that later) that gives vault the replay and gets back a string representation of the replay information. This information is stored and displayed every time you view a replay on the site.
A few things make vault interesting. First, it can parse zipped archives of replay files and entire directories of replays on top of parsing single files. Each file in an archive or directory is parsed on its own thread, so parsing large numbers of replays at once is extremely fast. Furthermore, vault exposes a C-like interface, which means it can be called from any language that can call into C libraries. This lets you use vault from C# or a web application running Python or node.js without having to port the code, and means you can take advantage of the threading and fast parsing that vault gives you without having to learn or write your entire application in Rust.
Unfortunately, vault does not currently parse useful information about player commands and actions. I'm in touch with Relic about getting more information on the way commands are structured in replays, but if you have any knowledge on this subject please get in touch with me! I'd really appreciate it.
More information and further documentation for vault can be found at https://github.com/ryantaylor/vault
flank
flank is the parsing application I mentioned above. It's mostly a proof of concept and reference for using the vault library, but because it writes replay data as JSON to standard output it can be used like it is on this site, to parse replays, capture the JSON output, and then do something with it. Output isn't pretty-printed yet so it's not too useful on its own, but it can give you a sense of how quickly vault can parse large numbers of replays in directories and archives.
More information and further documentation for flank can be found at https://github.com/ryantaylor/flank
Thanks for reading guys! I'll be keeping this thread updated as I make changes and improvements. Let me know if you have any questions! If you try the library or the application and have issues or notice areas that could be improved, please post here or create a GitHub issue.
Special thanks to Seb and pingtoft, this would have taken a lot more time if I didn't have their code to look at for reference.