{"id":34075446,"url":"https://github.com/emakryo/rustdef","last_synced_at":"2025-12-14T09:44:51.334Z","repository":{"id":36984124,"uuid":"236265118","full_name":"emakryo/rustdef","owner":"emakryo","description":"Jupyter extension for Rust.","archived":false,"fork":false,"pushed_at":"2023-03-13T02:57:27.000Z","size":169,"stargazers_count":29,"open_issues_count":7,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-25T09:22:33.672Z","etag":null,"topics":["jupyter-extension","jupyter-notebook","python","rust"],"latest_commit_sha":null,"homepage":"","language":"Python","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/emakryo.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-26T04:08:22.000Z","updated_at":"2025-07-03T15:13:50.000Z","dependencies_parsed_at":"2024-11-15T12:16:34.522Z","dependency_job_id":null,"html_url":"https://github.com/emakryo/rustdef","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/emakryo/rustdef","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emakryo%2Frustdef","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emakryo%2Frustdef/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emakryo%2Frustdef/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emakryo%2Frustdef/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emakryo","download_url":"https://codeload.github.com/emakryo/rustdef/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emakryo%2Frustdef/sbom","scorecard":{"id":374453,"data":{"date":"2025-08-11","repo":{"name":"github.com/emakryo/rustdef","commit":"f135aa8ded7d95d0dcdfef12a40264267bab150d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/13 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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/emakryo/rustdef/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/emakryo/rustdef/publish.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/emakryo/rustdef/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:55: update your workflow using https://app.stepsecurity.io/secureworkflow/emakryo/rustdef/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:70: update your workflow using https://app.stepsecurity.io/secureworkflow/emakryo/rustdef/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:79: update your workflow using https://app.stepsecurity.io/secureworkflow/emakryo/rustdef/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:97: update your workflow using https://app.stepsecurity.io/secureworkflow/emakryo/rustdef/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/emakryo/rustdef/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/emakryo/rustdef/test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/emakryo/rustdef/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:50: update your workflow using https://app.stepsecurity.io/secureworkflow/emakryo/rustdef/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:68: update your workflow using https://app.stepsecurity.io/secureworkflow/emakryo/rustdef/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:102: update your workflow using https://app.stepsecurity.io/secureworkflow/emakryo/rustdef/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:107: update your workflow using https://app.stepsecurity.io/secureworkflow/emakryo/rustdef/test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:114: update your workflow using https://app.stepsecurity.io/secureworkflow/emakryo/rustdef/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:127: update your workflow using https://app.stepsecurity.io/secureworkflow/emakryo/rustdef/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:137: update your workflow using https://app.stepsecurity.io/secureworkflow/emakryo/rustdef/test.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/publish.yml:48","Warn: pipCommand not pinned by hash: .github/workflows/publish.yml:78","Warn: pipCommand not pinned by hash: .github/workflows/test.yml:49","Warn: pipCommand not pinned by hash: .github/workflows/test.yml:75","Warn: pipCommand not pinned by hash: .github/workflows/test.yml:124","Warn: pipCommand not pinned by hash: .github/workflows/test.yml:126","Info:   0 out of  14 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 third-party GitHubAction dependencies pinned","Info:   0 out of   6 pipCommand dependencies pinned"],"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":"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":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.4.0 not signed: https://api.github.com/repos/emakryo/rustdef/releases/86097138","Warn: release artifact v0.3.1 not signed: https://api.github.com/repos/emakryo/rustdef/releases/54091536","Warn: release artifact v0.3.0 not signed: https://api.github.com/repos/emakryo/rustdef/releases/54002966","Warn: release artifact v0.4.0 does not have provenance: https://api.github.com/repos/emakryo/rustdef/releases/86097138","Warn: release artifact v0.3.1 does not have provenance: https://api.github.com/repos/emakryo/rustdef/releases/54091536","Warn: release artifact v0.3.0 does not have provenance: https://api.github.com/repos/emakryo/rustdef/releases/54002966"],"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":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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":"Vulnerabilities","score":5,"reason":"5 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: RUSTSEC-2023-0004 / GHSA-96jv-r488-c2rj","Warn: Project is vulnerable to: RUSTSEC-2024-0384","Warn: Project is vulnerable to: GHSA-pph8-gcv7-4qj5","Warn: Project is vulnerable to: RUSTSEC-2025-0020","Warn: Project is vulnerable to: RUSTSEC-2020-0071 / GHSA-wcg3-cvx6-7396"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 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-18T13:53:30.630Z","repository_id":36984124,"created_at":"2025-08-18T13:53:30.631Z","updated_at":"2025-08-18T13:53:30.631Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27725099,"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-12-14T02:00:11.348Z","response_time":56,"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":["jupyter-extension","jupyter-notebook","python","rust"],"created_at":"2025-12-14T09:44:48.149Z","updated_at":"2025-12-14T09:44:51.323Z","avatar_url":"https://github.com/emakryo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rustdef\n\n[![Test](https://github.com/emakryo/rustdef/workflows/Test/badge.svg?branch=master)](https://github.com/emakryo/rustdef/actions?query=branch%3Amaster)\n[![PyPI version](https://badge.fury.io/py/rustdef.svg)](https://badge.fury.io/py/rustdef)\n\nJupyter extension for jupyter notebooks and rust users.\n\nYou can define functions in rust and run them as python functions.\nThis extension is built on [PyO3](https://github.com/PyO3/pyo3) and\n[maturin](https://github.com/PyO3/maturin).\n\n## Examples\n\n- [Get Started](examples/Get%20started.ipynb)\n- [Type conversion](examples/types.ipynb)\n- [Numpy example](examples/numpy.ipynb)\n\n## Prerequisite\n\n- Python \u003e= 3.7 and pip \u003e= 19.3\n- [Jupyter notebook](https://jupyter.org/install.html)\n- [Rust](https://www.rust-lang.org/tools/install)\n- [cargo-edit](https://crates.io/crates/cargo-edit)\n\n## Install\n\n```shell script\n$ pip install rustdef\n```\n\n## Usage\n\nDefine rust functions,\n```rust\n%%rustdef\n#[pyfunction]\nfn my_func(x: i64, y: \u0026str) -\u003e i64 {\n    println!(\"{}\", y);\n    x + y.len() as i64\n}\n```\n\nAdd dependencies, (e.g. `num` crate)\n```\n%rustdef deps add num@0.4.0\n```\n\nDefined dependencies are valid only in the current notebook.\n\nShow dependencies,\n```\n%rustdef deps show\n```\n\n```\nnum = \"0.4.0\"\n\n[pyo3]\nversion = \"0.13.2\"\nfeatures = [ \"extension-module\",]\n```\n\n`pyo3` is included by default.\n\n## Develop\n\n### How does it work?\n\nRoughly, definitions in rustdef are available in python after the following steps.\n\n1. Each rustdef magic cell is populated with the module definition of pyo3\n2. A new crate is generated for the rustdef cell\n3. The crate is compiled into a python wheel by `maturin`\n4. Install the wheel with `pip`\n5. Functions with `#[pyfunction]` attributes are exported into the interpreter namespace in notebooks\n6. Ready to call the function in notebooks!\n\n### Build\n\n`maturin` is required.\n\n```shell script\n$ pip install maturin\n$ maturin build\n$ pip install target/wheels/rustdef-{version}-{python}-{platform}.whl\n```\n\n### ToDo\n\n- [ ] execute within rustdef cell\n- [ ] class/module supports\n- [ ] customizable module name\n- [ ] use functions defined in another cell\n- [ ] verbose flag\n- [ ] serde support\n- [ ] windows support\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femakryo%2Frustdef","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femakryo%2Frustdef","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femakryo%2Frustdef/lists"}