{"id":15995221,"url":"https://github.com/hoodie/sdp-nom","last_synced_at":"2025-09-12T20:31:57.457Z","repository":{"id":44933277,"uuid":"174882185","full_name":"hoodie/sdp-nom","owner":"hoodie","description":"⚓️ i=a wasm friendly SDP parser","archived":false,"fork":false,"pushed_at":"2022-12-17T10:48:39.000Z","size":259,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-31T00:19:17.682Z","etag":null,"topics":["sdp","wasm","webrtc"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hoodie.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-Apache","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-10T21:18:27.000Z","updated_at":"2023-07-25T14:24:16.000Z","dependencies_parsed_at":"2023-01-29T17:00:25.671Z","dependency_job_id":null,"html_url":"https://github.com/hoodie/sdp-nom","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/hoodie/sdp-nom","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoodie%2Fsdp-nom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoodie%2Fsdp-nom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoodie%2Fsdp-nom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoodie%2Fsdp-nom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hoodie","download_url":"https://codeload.github.com/hoodie/sdp-nom/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoodie%2Fsdp-nom/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274873258,"owners_count":25365823,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-12T02:00:09.324Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["sdp","wasm","webrtc"],"created_at":"2024-10-08T07:12:01.461Z","updated_at":"2025-09-12T20:31:57.199Z","avatar_url":"https://github.com/hoodie.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# sdp-nom\n\n[![build](https://img.shields.io/github/actions/workflow/status/hoodie/sdp-nom/ci.yml?branch=main)](https://github.com/hoodie/notify-rust/actions?query=workflow%3A\"Continuous+Integration\")\n[![Crates.io](https://img.shields.io/crates/d/sdp-nom)](https://crates.io/crates/sdp-nom)\n[![contributors](https://img.shields.io/github/contributors/hoodie/sdp-nom)](https://github.com/hoodie/sdp-nom/graphs/contributors)\n![maintenance](https://img.shields.io/maintenance/yes/2022)\n\n[![version](https://img.shields.io/crates/v/sdp-nom)](https://crates.io/crates/sdp-nom/)\n[![documentation](https://img.shields.io/badge/docs-latest-blue.svg)](https://docs.rs/sdp-nom/)\n[![license](https://img.shields.io/crates/l/sdp-nom.svg?style=flat)](https://crates.io/crates/sdp-nom/)\n\n\u003c/div\u003e\n\nThis is a [nom][]-based SDP parser.\nIt can parse and reserialize and is currently optimized for a very small wasm footprint (hence the use of [ufmt][]).\nYou don't need reserialization? Just build with `--no-default-features`.\n\n## Why?\n\nThere is already [mozilla's webrtc-sdp][mozilla-sdp], [sdp from webrtc.rs][webrtc_rs] and [sdp-types],\nwhich are all very good, why make another?\nThis is still very much a \"for fun\" project, so don't mind me!\n\n## cargo-features\n\n| name     | what it does                                  | default |\n| -------- | --------------------------------------------- | ------- |\n| udisplay | use [ufmt][] to reserialize session and lines | **yes** |\n| debug    | provide `Debug` formatting for all types      | **yes** |\n| serde    | well serde support of course                  | no      |\n| wee      | use [wee][] allocator                         | no      |\n\n## Objectives\n\nWith this parser we try to implement a wasm-friendly, low-copy and high-level-nom parser.\n\n### WASM-Friendly\n\nBy using [wee][] and [ufmt][] we try to achieve a small binary size.\nFurther Debug-printing is a feature that can be disabled.\nFurther concrete wasm-related work is on the horizon.\n\n### low copy\n\nZero copy seems a bit out of reach but this parser tries to enable as much as possible without actually copying over the content of the sdp.\nThis is achieved by reading any string into a [`Cow`][] and only optionally creating a `'static` copy of the content.\n\n### functional high-level parser-combinators\n\nSDP is a weird standard,\nthere is no container format specification other than that lines start with a `char` followed by `=`.\nBasically every line follows it's own rules.\nTherefore every line has its own parser like in this example:\n\n```rust\n/// Email `e=\u003cemail-address\u003e`\npub struct EmailAddress\u003c'a\u003e(pub Cow\u003c'a, str\u003e);\n\n/// \"e=email@example.com\"\npub fn email_address_line(input: \u0026str) -\u003e IResult\u003c\u0026str, EmailAddress\u003e {\n    line(\"e=\", wsf(map(cowify(read_string), EmailAddress)))(input)\n}\n```\n\n## License\n\nicalendar-rs is licensed under either of\n\n* Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)\n* MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)\n\nat your option.\n\n## Contribution\n\nAny help in form of descriptive and friendly [issues](https://github.com/hoodie/sdp-nom/issues) or comprehensive pull requests are welcome! \n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in sdp-nom by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n\n[nom]: https://docs.rs/nom\n[ufmt]: https://docs.rs/ufmt\n[wee]: https://docs.rs/wee_alloc\n[mozilla-sdp]: https://crates.io/crates/webrtc-sdp\n[webrtc_rs]: https://crates.io/crates/sdp\n[sdp-types]: https://crates.io/crates/sdp-types\n[`cow`]: https://doc.rust-lang.org/stable/std/borrow/enum.Cow.html\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoodie%2Fsdp-nom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhoodie%2Fsdp-nom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoodie%2Fsdp-nom/lists"}