{"id":22920059,"url":"https://github.com/xgqfrms/rust-in-action","last_synced_at":"2026-05-04T21:39:14.631Z","repository":{"id":157042230,"uuid":"255671328","full_name":"xgqfrms/rust-in-action","owner":"xgqfrms","description":"Rust In Action","archived":false,"fork":false,"pushed_at":"2022-09-28T16:13:12.000Z","size":762,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-07T08:33:01.421Z","etag":null,"topics":["cargo","js","libarary","package","rust","shell","wapm","wasm-bindgen","wasm-pack","webasssembly"],"latest_commit_sha":null,"homepage":"https://rust-in-action.xgqfrms.xyz","language":"JavaScript","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/xgqfrms.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":"2020-04-14T17:01:44.000Z","updated_at":"2023-04-27T05:08:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"69590d07-9d9e-4ea8-ae7f-468b39602ff9","html_url":"https://github.com/xgqfrms/rust-in-action","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xgqfrms%2Frust-in-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xgqfrms%2Frust-in-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xgqfrms%2Frust-in-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xgqfrms%2Frust-in-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xgqfrms","download_url":"https://codeload.github.com/xgqfrms/rust-in-action/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246646390,"owners_count":20811129,"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":["cargo","js","libarary","package","rust","shell","wapm","wasm-bindgen","wasm-pack","webasssembly"],"created_at":"2024-12-14T07:14:20.306Z","updated_at":"2026-05-04T21:39:14.524Z","avatar_url":"https://github.com/xgqfrms.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rust-in-action\n\n\u003e Rust in Action\n\nhttps://www.cnblogs.com/xgqfrms/p/12702549.html\n\n```sh\n$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n\n$ source $HOME/.cargo/env\n\n$ rustc -h\n\n$ rustc -V\n# rustc 1.42.0 (b8cedc004 2020-03-09)\n\n```\n\n```sh\n$ rustup update\n$ rustup --version\n\n$ rustup -V\n# rustup 1.25.1 (bb60b1e89 2022-07-12)\n# info: This is the version for the rustup toolchain manager, not the rustc compiler.\n# info: The currently active `rustc` version is `rustc 1.63.0 (4b91a6ea7 2022-08-08)`\n\n$ rustc -V\n# rustc 1.63.0 (4b91a6ea7 2022-08-08)\n\n```\n\nhttps://www.rust-lang.org/tools/install\n\nhttps://sh.rustup.rs\n\n\n## rust docs\n\n```sh\n# local rust docs\n$ rustup doc\n\n```\n\nRust Documentation\n\n`file:///Users/xgqfrms-mbp/.rustup/toolchains/stable-x86_64-apple-darwin/share/doc/rust/html/index.html`\n\nThe Rust Programming Language\n\n`file:///Users/xgqfrms-mbp/.rustup/toolchains/stable-x86_64-apple-darwin/share/doc/rust/html/book/index.html`\n\n\n\n## version\n\n```sh\n$ rustc -V\nrustc 1.42.0 (b8cedc004 2020-03-09)\n\n$ rustc --version \nrustc 1.42.0 (b8cedc004 2020-03-09)\n\n```\n\n```sh\n$ rustc -h\nUsage: rustc [OPTIONS] INPUT\n\nOptions:\n    -h, --help          Display this message\n        --cfg SPEC      Configure the compilation environment\n    -L [KIND=]PATH      Add a directory to the library search path. The\n                        optional KIND can be one of dependency, crate, native,\n                        framework, or all (the default).\n    -l [KIND=]NAME      Link the generated crate(s) to the specified native\n                        library NAME. The optional KIND can be one of\n                        static, framework, or dylib (the default).\n        --crate-type [bin|lib|rlib|dylib|cdylib|staticlib|proc-macro]\n                        Comma separated list of types of crates\n                        for the compiler to emit\n        --crate-name NAME\n                        Specify the name of the crate being built\n        --edition 2015|2018\n                        Specify which edition of the compiler to use when\n                        compiling code.\n        --emit [asm|llvm-bc|llvm-ir|obj|metadata|link|dep-info|mir]\n                        Comma separated list of types of output for the\n                        compiler to emit\n        --print [crate-name|file-names|sysroot|cfg|target-list|target-cpus|target-features|relocation-models|code-models|tls-models|target-spec-json|native-static-libs]\n                        Compiler information to print on stdout\n    -g                  Equivalent to -C debuginfo=2\n    -O                  Equivalent to -C opt-level=2\n    -o FILENAME         Write output to \u003cfilename\u003e\n        --out-dir DIR   Write output to compiler-chosen filename in \u003cdir\u003e\n        --explain OPT   Provide a detailed explanation of an error message\n        --test          Build a test harness\n        --target TARGET Target triple for which the code is compiled\n    -W, --warn OPT      Set lint warnings\n    -A, --allow OPT     Set lint allowed\n    -D, --deny OPT      Set lint denied\n    -F, --forbid OPT    Set lint forbidden\n        --cap-lints LEVEL\n                        Set the most restrictive lint level. More restrictive\n                        lints are capped at this level\n    -C, --codegen OPT[=VALUE]\n                        Set a codegen option\n    -V, --version       Print version info and exit\n    -v, --verbose       Use verbose output\n\nAdditional help:\n    -C help             Print codegen options\n    -W help             Print 'lint' options and default settings\n    --help -v           Print the full set of options rustc accepts\n\n```\n\n## demos\n\n```rs\n// main.rs\n\nfn main() {\n  println!(\"Hello, world!\");\n}\n\n```\n\n```sh\n$ cd src/hello_world/\n\n# rust compiler\n$ rustc main.rs\n# -o === output\n$ rustc main.rs -o demo\n# 可执行文件，跨平台\n$ ./main\n\n```\n\n## Rust Playground\n\nhttps://play.rust-lang.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxgqfrms%2Frust-in-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxgqfrms%2Frust-in-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxgqfrms%2Frust-in-action/lists"}