{"id":18104458,"url":"https://github.com/jphenow/tomlrs-php","last_synced_at":"2025-08-01T20:43:58.848Z","repository":{"id":140675658,"uuid":"470640964","full_name":"jphenow/tomlrs-php","owner":"jphenow","description":"Rust extension to bring fast TOML parsing to PHP","archived":false,"fork":false,"pushed_at":"2022-03-29T18:16:59.000Z","size":14,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T18:52:14.659Z","etag":null,"topics":["php","rust","toml"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/jphenow.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}},"created_at":"2022-03-16T15:24:46.000Z","updated_at":"2024-11-14T09:22:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"357663ff-ba32-48b5-9e70-18c4b0c66f3c","html_url":"https://github.com/jphenow/tomlrs-php","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jphenow/tomlrs-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jphenow%2Ftomlrs-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jphenow%2Ftomlrs-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jphenow%2Ftomlrs-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jphenow%2Ftomlrs-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jphenow","download_url":"https://codeload.github.com/jphenow/tomlrs-php/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jphenow%2Ftomlrs-php/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268294324,"owners_count":24227663,"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-08-01T02:00:08.611Z","response_time":67,"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":["php","rust","toml"],"created_at":"2024-10-31T22:14:53.805Z","updated_at":"2025-08-01T20:43:58.827Z","avatar_url":"https://github.com/jphenow.png","language":"PHP","funding_links":[],"categories":["Data Formats"],"sub_categories":[],"readme":"# tomlrs-php\n\nUse Rust to provide fast TOML parsing to PHP.\n\nThis is somewhat experimental at the moment, but happy to help anyone take it to the next stage.\n\nThis was written after leaving a company that used PHP and I had some performance issues in particular cases.\nI will not be using PHP professionally for the foreseeable future, so if you'd like to take this project and turn it into a published library please do so.\n\n## Building, extending PHP\n\n```sh\n$\u003e cargo build --release\n# in php.ini set extension=/path-to-project/target/debug/libtomlrs_php.dylib or:\n$\u003e php -dextension=path-to-project/target/release/libtomlrs_php.dylib \u003cyour php file\u003e\n```\n\n# PHP\n\n```php\n\u003c?php\n\n$parsed = parse_toml(__DIR__ . \"/test.toml\");\nvar_dump($parsed); // key-value array of TOML values\n```\n\n## Benchmark\n\nRun on my Macbook Pro:\n\n```\nProcessor Name:\t8-Core Intel Core i9\nProcessor Speed:\t2.4 GHz\nNumber of Processors:\t1\nTotal Number of Cores:\t8\nL2 Cache (per Core):\t256 KB\nL3 Cache:\t16 MB\nHyper-Threading Technology:\tEnabled\nMemory:\t64 GB\n```\n\nRunning each parser of [an example toml file](./benchmarks/test.toml) 1000 times and collecting the average time to parse:\n\n| Library | Time (average in milliseconds) |\n| ------ | -------- |\n| `jamesmoss/toml` | 0.381ms |\n| `leonelquinteros/php-toml` | 0.847ms |\n| `yosymfony/toml` | 2.298ms |\n| `tomlrs-php` | 0.129ms |\n\nFor more information, see the [benchmarks dir](./benchmarks/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjphenow%2Ftomlrs-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjphenow%2Ftomlrs-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjphenow%2Ftomlrs-php/lists"}