{"id":30267127,"url":"https://github.com/xxshady/altv-esbuild-rust-wasm","last_synced_at":"2025-08-15T23:28:11.213Z","repository":{"id":57749695,"uuid":"524797826","full_name":"xxshady/altv-esbuild-rust-wasm","owner":"xxshady","description":"esbuild plugin for using Rust via JS WASM on alt:V","archived":false,"fork":false,"pushed_at":"2024-09-18T00:49:51.000Z","size":2411,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-09-18T04:40:25.410Z","etag":null,"topics":["altv","esbuild","esbuild-plugin","fivem","gta5","gtav","ragemp","rust-lang","wasm"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/xxshady.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-14T22:57:00.000Z","updated_at":"2024-08-30T16:20:40.000Z","dependencies_parsed_at":"2024-04-09T16:43:40.755Z","dependency_job_id":"267b496c-3442-4859-b454-219c1173eae2","html_url":"https://github.com/xxshady/altv-esbuild-rust-wasm","commit_stats":{"total_commits":9,"total_committers":2,"mean_commits":4.5,"dds":"0.33333333333333337","last_synced_commit":"7657494e726006eb2a4309cfa4665583ae73dc39"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xxshady/altv-esbuild-rust-wasm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxshady%2Faltv-esbuild-rust-wasm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxshady%2Faltv-esbuild-rust-wasm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxshady%2Faltv-esbuild-rust-wasm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxshady%2Faltv-esbuild-rust-wasm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xxshady","download_url":"https://codeload.github.com/xxshady/altv-esbuild-rust-wasm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxshady%2Faltv-esbuild-rust-wasm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270644764,"owners_count":24621332,"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-15T02:00:12.559Z","response_time":110,"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":["altv","esbuild","esbuild-plugin","fivem","gta5","gtav","ragemp","rust-lang","wasm"],"created_at":"2025-08-15T23:27:12.073Z","updated_at":"2025-08-15T23:28:11.191Z","avatar_url":"https://github.com/xxshady.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# altv-esbuild-rust-wasm\n\nesbuild plugin that helps you to use rust with wasm in alt:V on serverside and clientside.\n\nRequirement for building rust to wasm is installed [wasm-pack](https://rustwasm.github.io/docs/wasm-pack).\n\n## How to use?\n\nReady-to-use [examples](./examples).\n\n### Install package via npm\n\n```cmd\nnpm i altv-esbuild-rust-wasm\n```\n\n### Add to plugins\n\n```js\nimport esbuild from \"esbuild\"\n\nesbuild.build({\n  // ...\n  plugins: [\n    altvEsbuildRustWasm({\n      // or \"server\", depending on where you need to load WASM binary\n      target: \"client\"\n\n      // absolute path of .wasm file for `alt.File.read`\n      // only needed for clientside\n      wasmPathForClientRead: \"/client/rust_wasm_bg.wasm\"\n    }),\n  ],\n})\n```\n\n### Usage in JS code\n\n```js\nimport loadWasm from \"./pkg/example.wasm\"\n\nconst {\n  // these values are exported from rust\n  // (see examples)\n  ...wasmExports\n} = loadWasm({\n  // these values are imported to rust using:\n  // #[wasm_bindgen(js_namespace = altv_imports)]\n  ...wasmImports, \n})\n```\n\nSee `wasm-bingen` documentation: [exports](https://rustwasm.github.io/docs/wasm-bindgen/reference/attributes/on-rust-exports/index.html) and [imports](https://rustwasm.github.io/docs/wasm-bindgen/reference/attributes/on-js-imports/index.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxxshady%2Faltv-esbuild-rust-wasm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxxshady%2Faltv-esbuild-rust-wasm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxxshady%2Faltv-esbuild-rust-wasm/lists"}