{"id":19740351,"url":"https://github.com/distributive-network/pythonmonkey-rust-wasm-example","last_synced_at":"2026-05-03T17:31:41.194Z","repository":{"id":182834908,"uuid":"669152474","full_name":"Distributive-Network/pythonmonkey-rust-wasm-example","owner":"Distributive-Network","description":"🐍 Executing Rust from Python using WASM 🦀","archived":false,"fork":false,"pushed_at":"2023-07-21T13:44:57.000Z","size":2,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-02-28T06:18:50.910Z","etag":null,"topics":["example","python","rust"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Distributive-Network.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-07-21T13:21:09.000Z","updated_at":"2023-08-03T02:18:01.000Z","dependencies_parsed_at":"2023-07-21T17:44:44.723Z","dependency_job_id":null,"html_url":"https://github.com/Distributive-Network/pythonmonkey-rust-wasm-example","commit_stats":null,"previous_names":["distributive-network/pythonmonkey-rust-wasm-example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Distributive-Network/pythonmonkey-rust-wasm-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Distributive-Network%2Fpythonmonkey-rust-wasm-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Distributive-Network%2Fpythonmonkey-rust-wasm-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Distributive-Network%2Fpythonmonkey-rust-wasm-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Distributive-Network%2Fpythonmonkey-rust-wasm-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Distributive-Network","download_url":"https://codeload.github.com/Distributive-Network/pythonmonkey-rust-wasm-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Distributive-Network%2Fpythonmonkey-rust-wasm-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32578578,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: 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":["example","python","rust"],"created_at":"2024-11-12T01:20:41.636Z","updated_at":"2026-05-03T17:31:41.178Z","avatar_url":"https://github.com/Distributive-Network.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PythonMonkey Rust WebAssembly Example\n\nThis example demonstrates compiling a Rust library to WebAssembly, \ncreating a JavaScript package api for it, and calling it from Python.\n\nThis is accomplished using [PythonMonkey](https://pythonmonkey.io/), a Python library for executing \nJavaScript and WebAssembly from Python. [Check it out on GitHub](https://github.com/Distributive-Network/PythonMonkey)!\n\n## Required Software Installation\n\nInstall Rust + Cargo: https://doc.rust-lang.org/cargo/getting-started/installation.html\n\nInstall `wasm-pack` using Cargo: `$ cargo install wasm-pack`\n\nInstall Python with a minimum version of 3.8.\n\nInstall PythonMonkey using pip: `$ pip install pythonmonkey`\n\n## Compile and Run\nCompile:\n```sh\n$ ./build.sh\n```\n\nRun:\n```sh\n$ python3 main.py\n```\n\n## Note: Temporary Shim\nSupport for Node.js libraries with PythonMonkey is currently a work in \nprogress so the `build.sh` script is required to convert Node.js specific \ncode to PythonMonkey friendly code. This is performed by replacing \n`readFileSync` with Python's `open` and writing a simple pure JS version \nof `join` from the `path` library.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdistributive-network%2Fpythonmonkey-rust-wasm-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdistributive-network%2Fpythonmonkey-rust-wasm-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdistributive-network%2Fpythonmonkey-rust-wasm-example/lists"}