{"id":13995494,"url":"https://github.com/sgodwincs/webidl-rs","last_synced_at":"2026-04-02T01:41:12.287Z","repository":{"id":45492332,"uuid":"94347503","full_name":"sgodwincs/webidl-rs","owner":"sgodwincs","description":"A WebIDL parser written in Rust.","archived":false,"fork":false,"pushed_at":"2024-07-27T06:56:45.000Z","size":418,"stargazers_count":35,"open_issues_count":6,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-14T11:36:00.471Z","etag":null,"topics":["lexer","parser","rust","webidl"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sgodwincs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-06-14T15:43:21.000Z","updated_at":"2025-09-28T17:46:13.000Z","dependencies_parsed_at":"2025-07-22T22:31:03.371Z","dependency_job_id":"fa7f930d-756c-4d8b-ae39-4dd126404bb3","html_url":"https://github.com/sgodwincs/webidl-rs","commit_stats":null,"previous_names":["sgodwincs/webidl-parser"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sgodwincs/webidl-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgodwincs%2Fwebidl-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgodwincs%2Fwebidl-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgodwincs%2Fwebidl-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgodwincs%2Fwebidl-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sgodwincs","download_url":"https://codeload.github.com/sgodwincs/webidl-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgodwincs%2Fwebidl-rs/sbom","scorecard":{"id":814455,"data":{"date":"2025-08-11","repo":{"name":"github.com/sgodwincs/webidl-rs","commit":"53062e97c1bbabd0b9e24e073202275989820e15"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":2,"reason":"Found 5/19 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 16 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T13:54:45.929Z","repository_id":45492332,"created_at":"2025-08-23T13:54:45.929Z","updated_at":"2025-08-23T13:54:45.929Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31294072,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T01:05:07.454Z","status":"ssl_error","status_checked_at":"2026-04-02T00:56:46.496Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["lexer","parser","rust","webidl"],"created_at":"2024-08-09T14:03:26.706Z","updated_at":"2026-04-02T01:41:12.270Z","avatar_url":"https://github.com/sgodwincs.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# webidl-rs\n\n[![LICENSE](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n[![Build Status](https://travis-ci.org/sgodwincs/webidl-rs.svg?branch=master)](https://travis-ci.org/sgodwincs/webidl-rs)\n[![Crates.io Version](https://img.shields.io/crates/v/webidl.svg)](https://crates.io/crates/webidl)\n\nA parser for [WebIDL](https://heycam.github.io/webidl/) in Rust.\n\n[Documentation](https://docs.rs/webidl/)\n\n# Example\n\n## Lexing\n\n```rust\nuse webidl::*;\n\nlet lexer = Lexer::new(\"/* Example taken from emscripten site */\\n\\\n                        enum EnumClass_EnumWithinClass {\\n\\\n                            \\\"EnumClass::e_val\\\"\\n\\\n                        };\");\nassert_eq!(lexer.collect::\u003cVec\u003c_\u003e\u003e(),\n           vec![Ok((41, Token::Enum, 45)),\n                Ok((46, Token::Identifier(\"EnumClass_EnumWithinClass\".to_string()), 71)),\n                Ok((72, Token::LeftBrace, 73)),\n                Ok((74, Token::StringLiteral(\"EnumClass::e_val\".to_string()), 92)),\n                Ok((93, Token::RightBrace, 94)),\n                Ok((94, Token::Semicolon, 95))]);\n```\n\n## Parsing\n\n```rust\nuse webidl::*;\nuse webidl::ast::*;\n\nlet result = parse_string(\"[Attribute] interface Node { };\");\n\nassert_eq!(result,\n           Ok(vec![Definition::Interface(Interface::NonPartial(NonPartialInterface {\n                extended_attributes: vec![\n                    Box::new(ExtendedAttribute::NoArguments(\n                        Other::Identifier(\"Attribute\".to_string())))],\n                inherits: None,\n                members: vec![],\n                name: \"Node\".to_string()\n           }))]));\n```\n\n## Pretty printing AST\n\nAn example of a visitor implementation can be found [here](https://github.com/sgodwincs/webidl-rs/blob/master/src/parser/visitor/pretty_print.rs). Below is an example of how it is used:\n\n```rust\nuse webidl::ast::*;\nuse webidl::visitor::*;\n\nlet ast = vec![Definition::Interface(Interface::NonPartial(NonPartialInterface {\n                extended_attributes: vec![\n                    Box::new(ExtendedAttribute::NoArguments(\n                        Other::Identifier(\"Attribute\".to_string())))],\n                inherits: None,\n                members: vec![InterfaceMember::Attribute(Attribute::Regular(RegularAttribute {\n                             extended_attributes: vec![],\n                             inherits: false,\n                             name: \"attr\".to_string(),\n                             read_only: true,\n                             type_: Box::new(Type {\n                                 extended_attributes: vec![],\n                                 kind: TypeKind::SignedLong,\n                                 nullable: true\n                             })\n                         }))],\n                name: \"Node\".to_string()\n          }))];\nlet mut visitor = PrettyPrintVisitor::new();\nvisitor.visit(\u0026ast);\nassert_eq!(visitor.get_output(),\n           \"[Attribute]\\ninterface Node {\\n    readonly attribute long? attr;\\n};\\n\\n\");\n```\n\n# Conformance\n\nThe parser is conformant with regards to the [WebIDL grammar](https://heycam.github.io/webidl/#idl-grammar) except for three points:\n\n- Extended attributes, as described by the grammar, are not supported due to their lack of semantic meaning when parsed. Instead, limited forms are supported (as shown in the [table](https://heycam.github.io/webidl/#idl-extended-attributes)). This parser allows a bit more flexibility when parsing extended attributes of the form `A=B`. The specification states that `A` and `B` must be identifiers, but this parser accepts `B` as any token. If you would like for any extended attributes to be parsed (essentially any sequences of tokens), please consider looking at [#8](https://github.com/sgodwincs/webidl-rs/issues/8) to help resolve the problem with doing so.\n- This parser supports the old `implements` keyword that is no longer a part of the official specification. This is for backwards compatibility. \n- This parser supports the old `legacycaller` keyword that is no longer a part of the official specification. This is for backwards compatibility. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgodwincs%2Fwebidl-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsgodwincs%2Fwebidl-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgodwincs%2Fwebidl-rs/lists"}