{"id":13495033,"url":"https://github.com/jsoverson/node-to-rust","last_synced_at":"2025-05-16T02:07:43.638Z","repository":{"id":38200404,"uuid":"434697502","full_name":"jsoverson/node-to-rust","owner":"jsoverson","description":null,"archived":false,"fork":false,"pushed_at":"2023-10-18T18:19:46.000Z","size":55989,"stargazers_count":1382,"open_issues_count":6,"forks_count":71,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-04-08T12:11:09.588Z","etag":null,"topics":["ebook","nodejs","rust","tutorial"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jsoverson.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}},"created_at":"2021-12-03T18:35:04.000Z","updated_at":"2025-04-06T06:56:40.000Z","dependencies_parsed_at":"2023-01-16T17:30:20.612Z","dependency_job_id":"28e6c93d-21a3-4dcf-becf-32f4a00df0c4","html_url":"https://github.com/jsoverson/node-to-rust","commit_stats":null,"previous_names":["jsoverson/node-to-rust","wasmflow/node-to-rust"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsoverson%2Fnode-to-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsoverson%2Fnode-to-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsoverson%2Fnode-to-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsoverson%2Fnode-to-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsoverson","download_url":"https://codeload.github.com/jsoverson/node-to-rust/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254453652,"owners_count":22073617,"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":["ebook","nodejs","rust","tutorial"],"created_at":"2024-07-31T19:01:30.554Z","updated_at":"2025-05-16T02:07:38.623Z","avatar_url":"https://github.com/jsoverson.png","language":"Rust","readme":"# From JavaScript to Rust ebook\n\nThis repository houses an ebook-ified version of the 24+ post series started on [vino.dev](https://vino.dev/blog/node-to-rust-day-1-rustup/).\n\n## How to build\n\nThe ebook is built using [asciidoctor](https://docs.asciidoctor.org/) and requires ruby \u003e2.3.\n\nInstall the ruby dependencies via `make deps`\n\n```console\n$ make deps\n```\n\nBuild a PDF via the command `make book`\n\n```console\n$ make book\n```\n\n## Running code and projects\n\nAll code are housed in the `src/` directory.\n\n### Day 4\n\n- `cargo run -p day-4-hello-world`\n- `cargo run -p day-4-strings-wtf-1` - intentionally does not compile.\n- `cargo run -p day-4-strings-wtf-2` - intentionally does not compile.\n\n### Day 5\n\n#### Reassigning\n\n- JS: `node javascript/day-5/let-vs-const/reassigning.js`\n- Rust: `cargo run -p day-5-let-vs-const --bin reassigning`\n- `cargo run -p day-5-let-vs-const --bin reassigning-wrong-type` - intentionally does not compile\n\n#### Borrowing\n\n- `cargo run -p day-5-borrowing --bin borrow`\n- `cargo run -p day-5-borrowing --bin mutable-borrow` - intentionally does not compile\n\n### Day 6\n\n- `cargo run -p day-6-loads-of-strs --bin 200-unique-prints`\n- `cargo run -p day-6-loads-of-strs --bin 200-prints`\n- `cargo run -p day-6-loads-of-strs --bin 200-empty-prints`\n- `cargo run -p day-6-loads-of-strs --bin one-print`\n\n### Day 7\n\n#### Syntax\n\n- `cargo run -p day-7-syntax`\n\n### Day 8\n\n#### Maps\n\n- `ts-node javascript/day-8/src/maps.ts`\n- `cargo run -p day-8-maps`\n\n#### Structs\n\n- `ts-node javascript/day-8/src/structs.ts`\n- `cargo run -p day-8-structs`\n\n### Day 9\n\n### Day 10\n\n### Day 11\n\n#### Modules\n\n- `cargo run -p day-11-modules --bin nested-submodules`\n- `cargo run -p day-11-traffic-light`\n\n### Day 12\n\n- `cargo run -p day-12-impl-tostring`\n- `cargo run -p day-12-impl-asref-str`\n\n### Day 13\n\n- `cargo run -p day-13-option`\n- `cargo run -p day-13-result`\n- `cargo run -p day-13-question-mark`\n\n### Day 14\n\n#### From/Into\n\n- `cargo run -p day-14-from-into`\n\n#### Errors\n\nThese examples require setting an environment variable. How to do that in your environment might look different.\n\n- `MARKDOWN=README.md cargo run -p day-14-boxed-errors`\n- `MARKDOWN=README.md cargo run -p day-14-custom-error-type`\n- `MARKDOWN=README.md cargo run -p day-14-thiserror`\n- `MARKDOWN=README.md cargo run -p day-14-error-chain`\n- `MARKDOWN=README.md cargo run -p day-14-snafu`\n\n### Day 16\n\n#### Closures\n\n- `cargo run -p day-15-closures`\n\n### Day 16\n\n#### Type differences\n\n- `cargo run -p day-16-type-differences --bin impl-owned`\n- `cargo run -p day-16-type-differences --bin impl-borrowed`\n\n#### `'static`\n\n- `cargo run -p day-16-static` - intentionally does not compile\n- `cargo run -p day-16-static-bounds` - intentionally does not compile\n\n#### Lifetime elision\n\n- `cargo run -p day-16-elision`\n\n#### Unsafe pointers\n\n- `cargo run -p day-16-unsafe-pointers`\n\n### Day 17\n\n#### Arrays\n\n- `cargo run -p day-17-arrays`\n- `ts-node javascript/day-17/src/arrays.ts`\n\n#### Iterators\n\n- `cargo run -p day-17-iterators`\n- `ts-node javascript/day-17/src/iterators.ts`\n\n#### Names example\n\n- `cargo run -p day-17-names`\n\n### Day 18\n\n- `cargo run -p day-18-async --bin send-sync`\n- `cargo run -p day-18-async --bin simple`\n- `cargo run -p day-18-async --bin lazy`\n- `cargo run -p day-18-async --bin fs`\n- `cargo run -p day-18-async --bin async-blocks`\n\n### Day 19\n\nFirst you must cd into `crates/day-19/project`\n\n- `cargo test`\n- `cargo run -p cli`\n\n### Day 20\n\nFirst you must cd into `crates/day-20/project`\n\n- `RUST_LOG=cli=debug cargo run -p cli`\n\n### Day 21\n\n#### waPC runner\n\nFirst you must cd into `crates/day-21/project`\n\n- `cargo run -p cli -- crates/my-lib/tests/test.wasm hello \"Potter\"`\n\n#### waPC guest (hello)\n\nFirst you must cd into `crates/day-21/wapc-guest`\n\n- Build with `make`\n\n### Day 22\n\n#### Serde\n\n- `cargo run -p day-22-serde`\n\n#### waPC runner\n\nFirst you must cd into `crates/day-22/project`\n\n- `cargo run -p cli -- crates/my-lib/tests/test.wasm hello hello.json`\n- `cargo run -p cli -- ./blog.wasm render ./blog.json`\n\n#### waPC guest (blog)\n\nFirst you must cd into `crates/day-22/wapc-guest`\n\n- Build with `make`\n\n### Day 23\n\n- `cargo run -p day-23-rc-arc --bin references`\n- `cargo run -p day-23-rc-arc --bin rc`\n- `cargo run -p day-23-rc-arc --bin arc`\n- `cargo run -p day-23-rc-arc --bin rwlock`\n- `cargo run -p day-23-rc-arc --bin async` - intentionally does not compile\n\n## License\n\nBook: Creative Commons BY-NC 4.0\nCode: Creative Commons BY 4.0\n","funding_links":[],"categories":["Rust"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsoverson%2Fnode-to-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsoverson%2Fnode-to-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsoverson%2Fnode-to-rust/lists"}