#csv #csv-parser #iana #mime #serde-derive #list #parses

bin+lib static_mime

Another mime type that embeds data from the IANA directly

1 unstable release

0.1.5 Mar 9, 2025
0.1.4 Mar 9, 2025
0.1.3 Mar 9, 2025
0.1.1 Mar 8, 2025
0.1.0 Mar 8, 2025

#839 in Rust patterns

Download history 315/week @ 2025-03-04 41/week @ 2025-03-11

356 downloads per month

AGPL-3.0-or-later

25KB
368 lines

Steps

Downloads CSV files from iana.org Parses the CSVs into only a new-line delimited list of mime strings Embeds a newline separated list of mimes in top_level constants

Features

Serde

Includes Serde derives on all types

Cli

Includes a very simple cli, mainly for testing

Compact

Uses CompactStr for the sub_type instead of a normal String Should keep the string on the stack, because the vast majority are small enough (under ~25 chars, I think)

Dependencies

~0.3–6.5MB
~125K SLoC