moonmime

    Byte-preserving recursive MIME message parser for MoonBit

    mime
    email
    eml
    rfc5322
    multipart
    Download zip
    Author
    Version
    0.1.0
    License
    Apache-2.0
    Last updated
    7 hours ago
    Downloads
    3

    Dependencies

    #MoonMIME

    Bounded, byte-preserving recursive MIME parsing for MoonBit.

    let message = @moonmime.parse(
    b"Subject: hello\r\nContent-Type: text/plain\r\n\r\nMoonBit",
    )
    inspect(message.root.media_type.essence(), content="text/plain")

    v0.1 parses ordered and folded headers, recursive multipart/*, direct message/rfc822, Base64, Quoted-Printable, RFC 2047 encoded-words, and RFC 2231 extended parameters. It exposes source byte ranges, strict/compatible modes, structured errors and diagnostics, attachment metadata, preferred display text, and deterministic JSON/text reports.

    The parser does no network or filesystem I/O. The separate Native CLI can inspect a local .eml file, print display text, or enumerate attachments; it never extracts attachment files.

    See the repository README for the full guide, scope, resource limits, security model, standards matrix, and testing instructions. Licensed under Apache-2.0.

    decode_body

    Decode a selected entity body after validating its source range.

    edge_limits

    Re-export the smaller edge-oriented limits through the root package.

    inspect_json

    Parse and return the stable v1 JSON inspection report.

    inspect_text

    Parse and return the human-oriented entity summary.

    parse

    Parse with secure resource defaults and strict RFC-oriented behavior.

    secure_limits

    Re-export the secure default limits through the root package.

    Source Files

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io