{"id":16853269,"url":"https://github.com/chmln/asciimath-rs","last_synced_at":"2025-10-25T21:41:39.272Z","repository":{"id":57495539,"uuid":"130616520","full_name":"chmln/asciimath-rs","owner":"chmln","description":"Mathematical expression parser and evaluator","archived":false,"fork":false,"pushed_at":"2020-02-29T00:26:57.000Z","size":156,"stargazers_count":15,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-09T03:07:10.126Z","etag":null,"topics":["math","rust"],"latest_commit_sha":null,"homepage":"https://docs.rs/asciimath/","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/chmln.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-22T23:32:12.000Z","updated_at":"2025-02-17T03:08:19.000Z","dependencies_parsed_at":"2022-08-28T19:51:05.665Z","dependency_job_id":null,"html_url":"https://github.com/chmln/asciimath-rs","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/chmln/asciimath-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chmln%2Fasciimath-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chmln%2Fasciimath-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chmln%2Fasciimath-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chmln%2Fasciimath-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chmln","download_url":"https://codeload.github.com/chmln/asciimath-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chmln%2Fasciimath-rs/sbom","scorecard":{"id":278433,"data":{"date":"2025-08-11","repo":{"name":"github.com/chmln/asciimath-rs","commit":"223724918cd33234d3488c82b51fa34c9a2f3624"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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":"Code-Review","score":0,"reason":"Found 1/30 approved changesets -- score normalized to 0","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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":["Info: Possibly incomplete results: error parsing shell code: not a valid arithmetic operator: test: .run_tests.sh:0"],"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":"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":"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":"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":"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":"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":"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":"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":"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 1 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-17T15:06:17.351Z","repository_id":57495539,"created_at":"2025-08-17T15:06:17.351Z","updated_at":"2025-08-17T15:06:17.351Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000774,"owners_count":26082911,"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-10-09T02:00:07.460Z","response_time":59,"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":["math","rust"],"created_at":"2024-10-13T13:50:54.351Z","updated_at":"2025-10-09T03:08:22.456Z","avatar_url":"https://github.com/chmln.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n[![Crates.io](https://img.shields.io/crates/v/asciimath.svg)](https://crates.io/crates/asciimath)\n[![](https://docs.rs/asciimath/badge.svg)](https://docs.rs/asciimath)\n[![CI](https://circleci.com/gh/chmln/asciimath-rs.svg?style=svg)](https://circleci.com/gh/chmln/asciimath-rs)\n\n# asciimath-rs\n\nSample use:\n```rust\nuse asciimath::{eval, scope, CustomFn};\n\nlet my_sum: CustomFn = |args| Ok(args.iter().sum());\nlet scope = scope!{\n  \"x\" =\u003e -1,\n  \"my_sum\" =\u003e my_sum,\n};\n\nassert_eq!(Ok(260.0), eval(\"my_sum(1, ((1 - x) ^ 2 ^ 3), 3)\", \u0026scope));\n```\n## Features\n\n- evaluation\n- implicit multiplication\n- support for variables, both single-letter and word variables\n- easily-defined custom functions\n- compiling expressions and evaluating with different sets of variables\n- f64 output\n- Baked-in essential functions and constants\n\n## High-Level Goals\n\n**Ease of use**\n\nThis means that e.g. passing in variables to expressions and defining custom functions must be possible with minimum knowledge of this library's internals and abstractions. Errors must be helpful and relevant.\n\n**Minimalism**\n\nFocusing just on mathematical expressions will make it easy for this library to remain slim and deliver superior ergonomics.\n\n**Accuracy**\n\nExtensive testing and maximum precision must be a part of all the modules to prevent bugs and ensure consistency.\n\n## Future\n\nThe items below will be considered after stabilization:\n\n- Non-mathematical expressions, like strings\n- More operators (e.g. ternary ? : )\n- Ability to simplify expressions\n- Derivatives, incl. second-order and third-order\n- Integration\n- Partial differentiation\n- Vector calculus\n- Matrices and vector spaces\n\n## Motivation\n\nWhile some great libraries aiming for similar goals do exist, they wouldn't reward me with such a fruitful Rust learning experience and imo sorely lack ergonomics.\n\n## Implementation\n\nThe parser is loosely based on Dijkstra's \"shunting yard\" algorithm for converting infix expressions into postfix expressions. However, instead of going from infix to postfix strings, we parse the expression straight into an Abstract Syntax Tree.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchmln%2Fasciimath-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchmln%2Fasciimath-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchmln%2Fasciimath-rs/lists"}