{"id":21884070,"url":"https://github.com/mongoexpuser/debian-based-napi-rust-addons-wasm","last_synced_at":"2026-04-05T21:35:06.876Z","repository":{"id":44679946,"uuid":"512930889","full_name":"MongoExpUser/Debian-Based-NAPI-Rust-Addons-Wasm","owner":"MongoExpUser","description":"Debian-Based NAPI-Rust Image and Container for Writing and Testing Rust Addon Modules for Node.js Applications.","archived":false,"fork":false,"pushed_at":"2026-02-22T02:49:03.000Z","size":557,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-22T06:02:37.401Z","etag":null,"topics":["addons","cargo","container","crate","docker","napi","napi-rust","nodejs","npm","rust","wasm"],"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/MongoExpUser.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-07-11T22:55:54.000Z","updated_at":"2026-02-22T02:49:06.000Z","dependencies_parsed_at":"2023-02-16T02:00:28.288Z","dependency_job_id":null,"html_url":"https://github.com/MongoExpUser/Debian-Based-NAPI-Rust-Addons-Wasm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MongoExpUser/Debian-Based-NAPI-Rust-Addons-Wasm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MongoExpUser%2FDebian-Based-NAPI-Rust-Addons-Wasm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MongoExpUser%2FDebian-Based-NAPI-Rust-Addons-Wasm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MongoExpUser%2FDebian-Based-NAPI-Rust-Addons-Wasm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MongoExpUser%2FDebian-Based-NAPI-Rust-Addons-Wasm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MongoExpUser","download_url":"https://codeload.github.com/MongoExpUser/Debian-Based-NAPI-Rust-Addons-Wasm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MongoExpUser%2FDebian-Based-NAPI-Rust-Addons-Wasm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31451444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"ssl_error","status_checked_at":"2026-04-05T21:22:51.943Z","response_time":75,"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":["addons","cargo","container","crate","docker","napi","napi-rust","nodejs","npm","rust","wasm"],"created_at":"2024-11-28T10:12:08.378Z","updated_at":"2026-04-05T21:35:06.823Z","avatar_url":"https://github.com/MongoExpUser.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Debian-Based-NAPI-Rust-Addons-Wasm\n\n\u003cbr\u003e\n\u003cstrong\u003e\nCreate a Debian-Based NAPI-Rust Image and Container for Writing and Testing NAPI-Rust Addon Modules for Node.js Applications.\n\u003c/strong\u003e\n\u003cbr\u003e\u003cbr\u003e\n\nNAPI-Rust is similar but different from  NAPI C/C++ (https://nodejs.org/api/n-api.html) \n\nNAPI-Rust is based on Rust toolchain and does not use node-gyp. \u003cbr\u003e \n\nSee NAPI C/C++ example: https://github.com/MongoExpUser/Shale-Reservoir-DNN-and-Drilling-Rare-Events-Graph/blob/master/test_addon.cc\n\n\n## DEPLOYING IMAGE\n\n### To deploy the image, follow these steps:\n\n1) #### Clone repo\n    Clone the repo. \n    The Repo contains the following files: \u003cbr\u003e\n    (1)  Dockerfile \u003cbr\u003e\n    (2)  Cargo.toml \u003cbr\u003e\n    (3)  package.json \u003cbr\u003e\n    (4)  index.js \u003cbr\u003e\n    (5)  ./src/build.rs \u003cbr\u003e\n    (6)  ./src/lib.rs \u003cbr\u003e\n    (7)  ./src/main.rs \u003cbr\u003e\n    (8)  ./src/utilities.rs \u003cbr\u003e\n    \n\n    \u003cstrong\u003e Modify \u003c/strong\u003e the  above files as needed, or can keep the original contents to test.\n    \n2) #### BUILD docker image: \n   sudo docker build -t  mongoexpuser/napi-rust-app:latest .\n   \n3) #### RUN docker container and map local CWD to docker working directory: \"/home/myapp\" : \n   sudo docker run -itd --name running-napi-rust-app -v \"$PWD\":/home/myapp --workdir=/home/myapp --privileged --restart unless-stopped mongoexpuser/napi-rust-app:latest\n\n4) #### INTERACT with container: start/restart, stop, shell into, and exit container instance, respectively: \n   sudo docker start running-napi-rust-app \u003cbr\u003e\n   sudo docker stop running-napi-rust-app \u003cbr\u003e\n   sudo docker exec -it running-napi-rust-app bash \u003cbr\u003e\n   exit\n   \n5) #### RUN commands inside the Docker instance, to compile, re-compile, run node.js app and clean code artifacts, respectively:\n   sudo docker exec -it running-napi-rust-app npm run build \u003cbr\u003e\n   sudo docker exec -it running-napi-rust-app npm rebuild \u003cbr\u003e\n   sudo docker exec -it running-napi-rust-app node index.js \u003cbr\u003e\n   sudo docker exec -it running-napi-rust-app cargo clean \u003cbr\u003e\n\n6) ####  TEST Node.js code inside the container in the CWD:\n   sudo docker exec -it running-napi-rust-app node index.js \n   \n   \n\n## MISCELLANEOUS\n\n### Wasm:\n\n1) In addition, the repo contains miscellaneous sample Rust codes and steps on how to compile the codes to \u003cstrong\u003eWASM (Web Assembly) \u003c/strong\u003e file. \u003cbr\u003e\n   See the link below. \u003cbr\u003e\n   https://github.com/MongoExpUser/Debian-Based-NAPI-Rust-Addons/blob/main/wasm/sample.rs\n\n2) The repo also contains HTML file that uses the compiled \u003cstrong\u003eWASM\u003c/strong\u003e file on the Front-End (Browser). \u003cbr\u003e\n   See the link below. \u003cbr\u003e\n   https://github.com/MongoExpUser/Debian-Based-NAPI-Rust-Addons/blob/main/wasm/index.html\n    \n\n# References\n1 - https://github.com/napi-rs/napi-rs \u003cbr\u003e\n2 - https://www.npmjs.com/package/@napi-rs/cli \u003cbr\u003e\n\n\n\n# License\n\nCopyright © 2015 - present. MongoExpUser\n\nLicensed under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongoexpuser%2Fdebian-based-napi-rust-addons-wasm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmongoexpuser%2Fdebian-based-napi-rust-addons-wasm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongoexpuser%2Fdebian-based-napi-rust-addons-wasm/lists"}