{"id":13500663,"url":"https://github.com/browserify/rustify","last_synced_at":"2025-05-15T10:02:37.314Z","repository":{"id":65990967,"uuid":"112096519","full_name":"browserify/rustify","owner":"browserify","description":"Rust WebAssembly transform for Browserify","archived":false,"fork":false,"pushed_at":"2024-12-21T10:12:46.000Z","size":40,"stargazers_count":494,"open_issues_count":5,"forks_count":25,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-14T16:53:43.343Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/browserify.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":"2017-11-26T16:04:00.000Z","updated_at":"2025-03-13T03:21:07.000Z","dependencies_parsed_at":"2024-12-28T17:11:41.429Z","dependency_job_id":"946f9613-6b45-4b92-aec5-2e5f19301206","html_url":"https://github.com/browserify/rustify","commit_stats":{"total_commits":22,"total_committers":4,"mean_commits":5.5,"dds":0.2272727272727273,"last_synced_commit":"69455296796302b93b1b56fc606e8da7171bbe2a"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserify%2Frustify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserify%2Frustify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserify%2Frustify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserify%2Frustify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/browserify","download_url":"https://codeload.github.com/browserify/rustify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254319716,"owners_count":22051072,"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","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":[],"created_at":"2024-07-31T22:01:09.120Z","updated_at":"2025-05-15T10:02:35.129Z","avatar_url":"https://github.com/browserify.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Projects"],"sub_categories":["Browserify"],"readme":"# rustify\n[![npm version][2]][3] [![build status][4]][5]\n[![downloads][8]][9] [![js-standard-style][10]][11]\n\nRust WebAssembly transform for\n[Browserify](https://github.com/browserify/browserify). Because this is an\nunstable rust feature, at the time of writing it relies on\n[wasm-gc](https://github.com/alexcrichton/wasm-gc) to be available from the\ncommand line. See [Installation](#installation) for instructions on how to\ninstall. Probably also doesn't work on Windows.\n\nBecause this feature is experimental in Rust, this module should be considered\nsimilarly.\n\n## Usage\n```sh\n$ browserify -t rustify index.js \u003e bundle.js\n```\n```js\n// index.js\nvar rust = require('rustify')\n\nvar wasm = rust`\n  #[no_mangle]\n  pub fn add_one(x: i32) -\u003e i32 {\n    x + 1\n  }\n`\n\nWebAssembly.instantiate(wasm, {})\n  .then(function (res) {\n    var addOne = res.instance.exports.add_one\n    console.log(addOne(41))\n    console.log(addOne(68))\n  }).catch(function (e) {\n    console.error('Creating WASM module failed', e)\n  })\n```\n\n## External\n```js\nvar rust = require('rustify')\n\nvar wasm = rust('./add-one.rs')\n\nWebAssembly.instantiate(wasm, {})\n  .then(function (res) {\n    var addOne = res.instance.exports.add_one\n    console.log(addOne(41))\n    console.log(addOne(68))\n  }).catch(function (e) {\n    console.error('Creating WASM module failed', e)\n  })\n```\n\n## API\n### `uint8Array = rust(filename)`\nCreate a valid `.rs` file to a `Uint8Array`, ready to be passed to the WASM\nconstructor.\n\n### `uint8Array = rust#string`\nCreate an inline rust template string to a `Uint8Array`, ready to be passed to\nthe WASM constructor.\n\n## Installation\nWith [rustup](https://www.rust-lang.org/install.html) installed:\n```sh\n$ rustup update nightly\n$ rustup target add wasm32-unknown-unknown --toolchain nightly\n$ cargo install --git https://github.com/alexcrichton/wasm-gc\n```\n```sh\n$ npm install rustify\n```\n\n## License\n[Apache-2.0](./LICENSE)\n\n[0]: https://img.shields.io/badge/stability-experimental-orange.svg?style=flat-square\n[1]: https://nodejs.org/api/documentation.html#documentation_stability_index\n[2]: https://img.shields.io/npm/v/rustify.svg?style=flat-square\n[3]: https://npmjs.org/package/rustify\n[4]: https://img.shields.io/travis/browserify/rustify/master.svg?style=flat-square\n[5]: https://travis-ci.org/browserify/rustify\n[6]: https://img.shields.io/codecov/c/github/browserify/rustify/master.svg?style=flat-square\n[7]: https://codecov.io/github/browserify/rustify\n[8]: http://img.shields.io/npm/dm/rustify.svg?style=flat-square\n[9]: https://npmjs.org/package/rustify\n[10]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\n[11]: https://github.com/feross/standard\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrowserify%2Frustify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrowserify%2Frustify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrowserify%2Frustify/lists"}