{ "version": "https://jsonfeed.org/version/1.1", "user_comment": "This feed allows you to read the posts from this site in any feed reader that supports the JSON Feed format. To add this feed to your reader, copy the following URL -- https://matoken.org/blog/tag/rust/feed/json/ -- and add it your reader.", "home_page_url": "https://matoken.org/blog/tag/rust/", "feed_url": "https://matoken.org/blog/tag/rust/feed/json/", "language": "ja", "title": "Rust – matoken's blog", "description": "Is there no plan B?", "icon": "https://matoken.org/blog/wp-content/uploads/2025/03/cropped-1865f695c4eecc844385acef2f078255036adccd42c254580ea3844543ab56d9.jpeg", "items": [ { "id": "https://matoken.org/blog/?p=4703", "url": "https://matoken.org/blog/2025/09/23/building-in-asciinema-3-0-and-raspberry-pi-armhf-environments/", "title": "asciinema 3.0\u3068Raspberry Pi armhf\u74b0\u5883\u3067\u306e\u30d3\u30eb\u30c9", "content_html": "
\u30bf\u30fc\u30df\u30ca\u30eb\u306e\u9332\u753b\u518d\u751f\u5171\u6709\u306a\u3069\u304c\u3067\u304d\u308b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306easciinema\u306e3.0\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u307e\u3057\u305f\uff0e
\n\u4eca\u56de\u306e\u30ea\u30ea\u30fc\u30b9\u306frust\u3067\u66f8\u304d\u76f4\u3055\u308c\uff0c\u30d5\u30a1\u30a4\u30eb\u5f62\u5f0f\u3082\u65b0\u3057\u304f\u306a\u3063\u305f\u3088\u3046\u3067\u3059\uff0e(asciicast v3 file format)\u307e\u305f\uff0c\u30bf\u30fc\u30df\u30ca\u30eb\u306e\u30a6\u30a7\u30d6\u306b\u3088\u308b\u30e9\u30a4\u30d6\u30b9\u30c8\u30ea\u30fc\u30df\u30f3\u30b0\u6a5f\u80fd\u3082\u4ed8\u304d\u307e\u3057\u305f\uff0e
\n
\u81ea\u5206\u306eDebian\u74b0\u5883\u3067\u306f\u30d1\u30c3\u30b1\u30fc\u30b8\u5ea6\u5c0e\u5165\u3057\u3066\u3044\u308b\u306e\u3067\u3059\u304c\uff0c\u51fa\u305f\u3070\u304b\u308a\u306a\u306e\u3067unstable\u3067\u30822.4.0\u3067\u3059\uff0e
\n$ rmadison asciinema\nasciinema | 2.0.2-2 | oldoldstable | source, all\nasciinema | 2.2.0-1 | oldstable | source, all\nasciinema | 2.4.0-1 | stable | source, all\nasciinema | 2.4.0-1 | testing | source, all\nasciinema | 2.4.0-1 | unstable | source, all\n
Linux\u3067\u306fReleases\u30da\u30fc\u30b8\u306bx86_64, aarch64\u306e\u30d0\u30a4\u30ca\u30ea\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\uff0e
\nRaspberry Pi OS bookworm armhf\u74b0\u5883\u3067\u30d3\u30eb\u30c9\u3092\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e
\n\u30d1\u30c3\u30b1\u30fc\u30b8\u3067\u5c0e\u5165\u3057\u305fRust\u304c\u53e4\u3044\u3088\u3046\u3067\u3059\uff0crust 1.66\u4ee5\u964d\u304c\u5fc5\u8981\u305d\u3046\u3067\u3059\uff0e
\n$ git clone https://github.com/asciinema/asciinema\n$ cd asciinema\n$ cargo build --release\n :\nerror: package `toml v0.8.23` cannot be built because it requires rustc 1.66 or newer, while the currently active rustc version is 1.63.0\nEither upgrade to rustc 1.66 or newer, or use\ncargo update -p toml@0.8.23 --precise ver\nwhere `ver` is the latest version of `toml` supporting rustc 1.63.0\n
\u4ee5\u4e0b\u306eManual installation\u304b\u3089armv7-unknown-linux-gnueabihf\u7248\u306erustup-init\u3092\u5165\u624b\u3057\u307e\u3059\uff0e
\n$ wget https://static.rust-lang.org/rustup/dist/armv7-unknown-linux-gnueabihf/rustup-init\n https://static.rust-lang.org/rustup/dist/armv7-unknown-linux-gnueabihf/rustup-init.sha256\n$ sha256sum --check rustup-init.sha256\n./rustup-init: OK\n$ chmod u+x ./rustup-init\n
rustup-init\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u65b0\u3057\u3044rust\u3092\u5c0e\u5165\u3057\u307e\u3059\uff0e
\n$ ./rustup-init\n :\nContinue? (y/N) y\n1) Proceed with standard installation (default - just press enter)\n2) Customize installation\n3) Cancel installation\n>1\n :\ninfo: installing component 'rustfmt'\ninfo: default toolchain set to 'stable-armv7-unknown-linux-gnueabihf'\n\n stable-armv7-unknown-linux-gnueabihf installed - rustc 1.90.0 (1159e78c4 2025-09-14)\n\n\nRust is installed now. Great!\n\nTo get started you may need to restart your current shell.\nThis would reload your PATH environment variable to include\nCargo's bin directory ($HOME/.cargo/bin).\n\nTo configure your current shell, you need to source\nthe corresponding env file under $HOME/.cargo.\n\nThis is usually done by running one of the following (note the leading DOT):\n. \"$HOME/.cargo/env\" # For sh/bash/zsh/ash/dash/pdksh\nsource \"$HOME/.cargo/env.fish\" # For fish\nsource $\"($nu.home-path)/.cargo/env.nu\" # For nushell\n
\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\u3057\u307e\u3059\uff0e\u6700\u8fd1\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u305f1.90.0\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\uff0e
\n$ which cargo\n/usr/bin/cargo\n$ /usr/bin/cargo -V\ncargo 1.65.0\n$ ~/.cargo/bin/cargo -V\nwarning: `/home/matoken/.cargo/config` is deprecated in favor of `config.toml`\nnote: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`\ncargo 1.90.0 (840b83a10 2025-07-30)\n
rust 1.90.0\u3092\u4f7f\u3063\u3066\u518d\u5ea6asciinema\u3092build\u3057\u307e\u3059\uff0e\u4eca\u5ea6\u306f\u6210\u529f\uff0e
\n$ PATH=~/.cargo/bin:$PATH cargo build --release\n\n Finished `release` profile [optimized] target(s) in 39m 49s\n
asciinema\u306eusage\u3068version\u3092\u78ba\u8a8d\uff0e3.0.0\u306b\u306a\u3063\u3066\u3044\u307e\u3059\uff0e
\n$ target/release/asciinema\nTerminal session recorder, streamer, and player\n\nUsage: asciinema [OPTIONS] <COMMAND>\n\nCommands:\n record Record a terminal session [aliases: rec]\n stream Stream a terminal session\n session Record and stream a terminal session\n play Play back a terminal session\n upload Upload a recording to an asciinema server\n auth Authenticate this CLI with an asciinema server account\n cat Concatenate multiple recordings\n convert Convert a recording to another format\n help Print this message or the help of the given subcommand(s)\n\nOptions:\n -q, --quiet Quiet mode - suppress diagnostic messages\n -h, --help Print help (see more with '--help')\n -V, --version Print version\n\n$ target/release/asciinema --version\nasciinema 3.0.0\n
\u65b0\u6a5f\u80fd\u306e\u30e9\u30a4\u30d6\u30b9\u30c8\u30ea\u30fc\u30df\u30f3\u30b0\u6a5f\u80fd\u3092\u8a66\u3057\u307e\u3059\uff0e
\n\u30ed\u30fc\u30ab\u30eb\u3068\u30ea\u30e2\u30fc\u30c8\u304c\u9078\u3079\u307e\u3059\uff0e
$ target/release/asciinema stream\nerror: the following required arguments were not provided:\n <--local [<IP:PORT>]|--remote [<STREAM-ID|WS-URL>]>\n\nUsage: asciinema stream <--local [<IP:PORT>]|--remote [<STREAM-ID|WS-URL>]>\n\nFor more information, try '--help'.\n$ target/release/asciinema stream -h\nStream a terminal session\n\nUsage: asciinema stream [OPTIONS] <--local [<IP:PORT>]|--remote [<STREAM-ID|WS-URL>]>\n\nOptions:\n -l, --local [<IP:PORT>] Stream via the local HTTP server\n -r, --remote [<STREAM-ID|WS-URL>] Stream via remote asciinema server\n -c, --command <COMMAND> Command to start in the session [default: $SHELL]\n -I, --capture-input Enable input (keyboard) capture\n --capture-env <VARS> Comma-separated list of environment variables to capture\n [default: SHELL]\n -t, --title <TITLE> Title of the session\n --headless Headless mode - don't use the terminal for I/O\n --window-size <COLSxROWS> Override session's terminal window size\n --return Return the session's exit status\n --log-file <PATH> Log file path\n --server-url <URL> asciinema server URL\n -q, --quiet Quiet mode - suppress diagnostic messages\n -h, --help Print help (see more with '--help')\n\nExamples:\n\n asciinema stream --local\n Streams a shell session via the local HTTP server listening on an ephemeral port on 127.0.0.1\n\n asciinema stream --local 0.0.0.0:8080\n Streams via the local HTTP server listening on port 8080 on all network interfaces\n\n asciinema stream --remote\n Streams via an asciinema server for public viewing\n\n asciinema stream -l -r\n Streams both locally and remotely simultaneously\n\n asciinema stream -r --command \"ping asciinema.org\"\n Streams execution of the ping command\n\n asciinema stream -r <ID> -t \"Live coding\"\n Streams via a remote server, reusing the existing stream ID and setting the stream title\n
\u307e\u305a\u306f\u30ed\u30fc\u30ab\u30eb\u3092\u8a66\u3057\u307e\u3059\uff0e\u65e2\u5b9a\u5024\u3067\u306flocalhost\u3057\u304b\u4f7f\u3048\u306a\u3044\u3088\u3046\u306a\u306e\u3067lan\u5185\u3067\u4f7f\u3048\u308b\u3088\u3046\u306bip\u30a2\u30c9\u30ec\u30b9\u3068\u9069\u5f53\u306aport\u3092\u6307\u5b9a\u3057\u3066\u8d77\u52d5\u3057\u307e\u3059\uff0e
\n$ target/release/asciinema stream --local 10.42.0.253:9999\n::: asciinema session started\n::: Live streaming at http://10.42.0.253:9999\n::: Press <ctrl+d> or type 'exit' to end\n$ ^d\nexit\n::: asciinema session ended\n
\u3053\u306e\u72b6\u614b\u3067\u30a6\u30a7\u30d6\u30d6\u30e9\u30a6\u30b6\u3067 Live streaming at \u306e\u5f8c\u308d\u306e\u30a2\u30c9\u30ec\u30b9\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068asciinema\u7aef\u672b\u306e\u30b9\u30c8\u30ea\u30fc\u30df\u30f3\u30b0\u304c\u8868\u793a\u3055\u308c\u307e\u3059\uff0e

\u6b21\u306f\u30ea\u30e2\u30fc\u30c8\uff0e
\n\u521d\u56de\u306f\u8a8d\u8a3c\u304c\u5fc5\u8981\u3067\u3059\uff0eauth\u30b5\u30d6\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u305f\u3068\u304d\u306b\u8868\u793a\u3055\u308c\u308burl\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u8a8d\u8a3c\u3057\u307e\u3059\uff0e
$ target/release/asciinema auth\nOpen the following URL in a web browser to authenticate this CLI with your asciinema.org user account:\n\nhttps://asciinema.org/connect/abc123de-f345-7890-1234-abc123def456\n\nThis will associate all recordings uploaded from this machine with your account (including past uploads), and enable public live streaming via asciinema.org.\n
\u30ea\u30e2\u30fc\u30c8\u30b5\u30fc\u30d0\u306f\u672a\u6307\u5b9a\u6642\u306e\u65e2\u5b9a\u5024\u3067\u306fasciinema.org\u304c\u5229\u7528\u3055\u308c\u307e\u3059\uff0e
\n$ target/release/asciinema stream --remote\n::: asciinema session started\n::: Live streaming at https://asciinema.org/s/aBcDeFgHiJkLmNoP\n::: Press <ctrl+d> or type 'exit' to end\n
\u3053\u306e\u72b6\u614b\u3067\u30a6\u30a7\u30d6\u30d6\u30e9\u30a6\u30b6\u3067 Live streaming at \u306e\u5f8c\u308d\u306e\u30a2\u30c9\u30ec\u30b9\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068asciinema.org\u3067\u7aef\u672b\u306e\u30b9\u30c8\u30ea\u30fc\u30df\u30f3\u30b0\u304c\u8868\u793a\u3055\u308c\u307e\u3059\uff0e
\u95b2\u89a7\u306e\u307f\u3067\u3059\u304c\u30c7\u30e2\u306b\u3044\u3044\u611f\u3058\u305d\u3046\u3067\u3059\uff0e
\n\u4ee5\u524d\u306f\u9332\u753b\u6642\u306b\u30ea\u30e2\u30fc\u30c8\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u3068\u9332\u753b\u30d5\u30a1\u30a4\u30eb\u306f\u6d88\u3048\u3066\u3044\u307e\u3057\u305f\u304c\uff0casciinema 3.0\u3067\u306f\u30ed\u30fc\u30ab\u30eb\u306b\u30d5\u30a1\u30a4\u30eb\u304c\u6b8b\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\uff0e
\n\u307e\u305f\uff0c\u9332\u753b\u5f62\u5f0f\u3082asciicast v2, asciicast v3(default), raw, txt\u304b\u3089\u9078\u3079\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\uff0e\u57fa\u672c\u7684\u306b\u898f\u5b9a\u5024\u306easciicast v3\u5f62\u5f0f\u3067\u3044\u3044\u3067\u3057\u3087\u3046\u304c\uff0c\u30bb\u30eb\u30d5\u30db\u30b9\u30c8\u74b0\u5883\u306a\u3069\u3067v3\u975e\u5bfe\u5fdc\u306e\u5834\u5408\u306a\u3069\u306fv2\u5f62\u5f0f\u306b\u3059\u308b\u611f\u3058\u3067\u3057\u3087\u3046\u304b\uff0e\u3082\u3057v3\u3067\u9332\u753b\u3057\u305f\u3042\u3068v2\u304c\u5fc5\u8981\u3060\u3063\u305f(\u3082\u3057\u304f\u306f\u305d\u306e\u9006)\u306e\u5834\u5408\u3067\u3082\u5f8c\u8ff0\u306e\u5909\u63db\u30b3\u30de\u30f3\u30c9\u3067\u76f8\u4e92\u5909\u63db\u304c\u53ef\u80fd\u3067\u3059\uff0e
$ target/release/asciinema rec -h [4/1462]\nRecord a terminal session\n\nUsage: asciinema record [OPTIONS] <FILE>\n\nArguments:\n <FILE> Output file path\n\nOptions:\n -f, --output-format <FORMAT> Output file format [default: asciicast-v3] [possible values:\n asciicast-v3, asciicast-v2, raw, txt]\n -c, --command <COMMAND> Command to start in the session [default: $SHELL]\n -I, --capture-input Enable input (keyboard) capture\n --capture-env <VARS> Comma-separated list of environment variables to capture [default:\n SHELL]\n -a, --append Append to an existing recording file\n --overwrite Overwrite the output file if it already exists\n -t, --title <TITLE> Title of the recording\n -i, --idle-time-limit <SECS> Limit idle time to a given number of seconds\n --headless Headless mode - don't use the terminal for I/O\n --window-size <COLSxROWS> Override session's terminal window size\n --return Return the session's exit status\n --log-file <PATH> Log file path\n -q, --quiet Quiet mode - suppress diagnostic messages\n -h, --help Print help (see more with '--help')\n\nExamples:\n\n asciinema rec demo.cast\n Records a shell session to a file\n\n asciinema rec --command \"python script.py\" demo.cast\n Records execution of a Python script\n\n asciinema rec --idle-time-limit 2 demo.cast\n Records with idle time capped at 2 seconds\n\n asciinema rec --capture-input --title \"API Demo\" demo.cast\n Records with keyboard input and sets a title\n\n asciinema rec --append demo.cast\n Continues recording to an existing file\n\n asciinema rec demo.txt\n Records as a plain-text log - output format inferred from the .txt extension\n
\u9332\u753b\u3057\u3066\u307f\u308b\uff0e
\n$ target/release/asciinema rec hello-asciinema3.0.cast\n::: asciinema session started\n::: Recording to hello-asciinema3.0.cast\n::: Press <ctrl+d> or type 'exit' to end\n$\n$ ^d\nexit\n::: asciinema session ended\n::: Recorded to hello-asciinema3.0.cast\n
\u9332\u753b\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u518d\u751f\uff0e
\n$ target/release/asciinema play hello-asciinema3.0.cast\n::: Replaying session from hello-asciinema3.0.cast\n$\nexit\n::: Playback ended\n
asciicast v1, v2, v3\u5f62\u5f0f\u306e\u30d5\u30a1\u30a4\u30eb\u3092asciinema\u30b5\u30fc\u30d0\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u307e\u3059\uff0e\u4eca\u56de\u306f\u65e2\u5b9a\u5024\u306easciinema.org\u3078\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u307e\u3059\uff0e
\n$ target/release/asciinema upload -h\nUpload a recording to an asciinema server\n\nUsage: asciinema upload [OPTIONS] <FILE>\n\nArguments:\n <FILE> The path to the asciicast recording file to upload, in a supported asciicast format (v1,\n v2, or v3)\n\nOptions:\n --server-url <URL> asciinema server URL\n -q, --quiet Quiet mode - suppress diagnostic messages\n -h, --help Print help (see more with '--help')\n
\u9332\u753b\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3057\u3066\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u307e\u3059\uff0e\u6210\u529f\u3057\u305f\u3089\u5171\u6709url\u304c\u8868\u793a\u3055\u308c\u307e\u3059\uff0e
\n$ target/release/asciinema upload hello-asciinema3.0.cast\nView the recording at:\n\n https://asciinema.org/a/OyMKojer2JRgnQbICxZ14mmKC\n
| \n Tip \n | \n\n \n \n\u5927\u304d\u306a\u30d5\u30a1\u30a4\u30eb\u306f\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u306b\u5931\u6557\u3057\u307e\u3059\uff0easciinema server\u3092\u30bb\u30eb\u30d5\u30db\u30b9\u30c8\u3057\u305f\u308a\uff0casciinema player\u3092\u30bb\u30eb\u30d5\u30db\u30b9\u30c8\u3059\u308b\u3053\u3068\u3067\u5927\u304d\u306a\u30d5\u30a1\u30a4\u30eb\u3092\u5171\u6709\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\uff0e \n | \n
asciinema 3.0\u3067\u30d5\u30a1\u30a4\u30eb\u5f62\u5f0f\u304casciicast v3\u306b\u306a\u308a\u307e\u3057\u305f\uff0e
\nconvert\u30b3\u30de\u30f3\u30c9\u3067asciicast v1, v2, v3\u3092\u76f8\u4e92\u306b\u5909\u63db\u53ef\u80fd\u306b\u306a\u3063\u3066\u3044\u307e\u3059\uff0e\u307e\u305f\uff0craw\u304b\u3089\u306easciicast\u5f62\u5f0f\u3078\u306e\u5909\u63db\u3082\u3067\u304d\u308b\u3088\u3046\u3067\u3059\uff0e\u4ee5\u524d\u306f\u5225\u306e\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u30c4\u30fc\u30eb\u3092\u4f7f\u3063\u3066\u3044\u307e\u3057\u305f\u304casciinema\u30b3\u30de\u30f3\u30c9\u3060\u3051\u3067\u5b8c\u7d50\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3088\u3046\u3067\u3059\uff0e
$ target/release/asciinema convert -h\nConvert a recording to another format\n\nUsage: asciinema convert [OPTIONS] <INPUT> <OUTPUT>\n\nArguments:\n <INPUT> The source recording to convert. Can be a local file path, HTTP(S) URL for remote files,\n or '-' to read from standard input. Remote URLs allow converting recordings directly\n from the web without need for manual downloading. Supported input formats include\n asciicast v1, v2 and v3\n <OUTPUT> The output path for the converted recording. Can be a file path or '-' to write to\n standard output\n\nOptions:\n -f, --output-format <FORMAT> Output file format [default: asciicast-v3] [possible values:\n asciicast-v3, asciicast-v2, raw, txt]\n --overwrite Overwrite the output file if it already exists\n -q, --quiet Quiet mode - suppress diagnostic messages\n -h, --help Print help (see more with '--help')\n\nExamples:\n\n asciinema convert old.cast new.cast\n Converts a recording to the latest asciicast format (v3)\n\n asciinema convert demo.cast demo.txt\n Exports a recording as a plain-text log - output format inferred from the .txt extension\n\n asciinema convert --output-format raw demo.cast demo.txt\n Exports as raw terminal output\n\n asciinema convert -f txt demo.cast -\n Exports as plain text to stdout\n\n asciinema convert https://asciinema.org/a/569727 starwars.cast\n Downloads a remote recording and converts it to the latest asciicast format (v3)\n
\u5909\u63db\u3057\u3066\u307f\u307e\u3059\uff0e
\n$ target/release/asciinema convert --output-format asciicast-v2 hello-asciinema3.0.cast hello-asciinema3.0.v2.cast\n
$ target/release/asciinema convert --output-format asciicast-v3 hello-asciinema3.0.v2.cast hello-asciinema3.0.v3.cast\n
\u5909\u63db\u5f8c\u306e\u30d5\u30a1\u30a4\u30eb\u3092play\u30b3\u30de\u30f3\u30c9\u3067\u518d\u751f\u3057\u3066\u307f\u308b\u3068\u554f\u984c\u306a\u304f\u518d\u751f\u3067\u304d\u307e\u3057\u305f\uff0e
\nasciinema 3.0\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u307e\u3057\u305f\uff0e\u6a19\u6e96\u3067\u30ed\u30fc\u30ab\u30eb\u306b\u9332\u753b\u30d5\u30a1\u30a4\u30eb\u304c\u6b8b\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u308a\uff0c\u30b9\u30c8\u30ea\u30fc\u30df\u30f3\u30b0\u6a5f\u80fd\uff0c\u30d5\u30a1\u30a4\u30eb\u5f62\u5f0f\u5909\u63db\u6a5f\u80fd\u304c\u4fbf\u5229\u305d\u3046\u3067\u3059\uff0e
\n\u305d\u306e\u4ed6asciicast v3\u5f62\u5f0f\u306b\u5bfe\u5fdc\u3057\u305fplayer\u3082\u8a66\u3057\u3066\u307f\u305f\u3044\u3068\u3053\u308d\u3067\u3059\uff0e
cargo install \u3067\u5c0e\u5165\u3057\u305f\u3082\u306e\u3092\u4e00\u62ec\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3057\u305f\u3044\u306a\u3068\u601d\u3044 cargo-update \u3092\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e
\n
$ cargo install cargo-update\n
$ cargo install-update --help\ncargo-install-update 15.0.0\n\u043d\u0430\u0431 <nabijaczleweli@nabijaczleweli.xyz>\nYann Simon <yann.simon.fr@gmail.com>\nven <vendethiel@hotmail.fr>\nCat Plus Plus <piotrlegnica@piotrl.pl>\nLiigo <liigo@qq.com>\nazyobuzin <azyobuzin@users.sourceforge.jp>\nTatsuyuki Ishi <ishitatsuyuki@gmail.com>\nTom Prince <tom.prince@twistedmatrix.com>\nMateusz Miku\u0142a <mati865@gmail.com>\nsinkuu <sinkuupump@gmail.com>\nAlex Burka <aburka@seas.upenn.edu>\nMatthias Kr\u00fcger <matthias.krueger@famsik.de>\nDaniel Holbert <dholbert@cs.stanford.edu>\nJonas Bushart <jonas@bushart.org>\nHarrison Metzger <harrisonmetz@gmail.com>\nBenjamin Bannier <bbannier@gmail.com>\nDimitris Apostolou <dimitris.apostolou@icloud.com>\nCorbin Uselton <corbinu@decimal.io>\nQuarticCat <QuarticCat@protonmail.com>\nArtur Sinila <freesoftware@logarithmus.dev>\nqthree <qthree3@gmail.com>\nMarcin Puc <tranzystorek.io@protonmail.com>\nPaul Barker <paul@pbarker.dev>\nBeno\u00eet CORTIER <bcortier@proton.me>\nBiswapriyo Nath <nathbappai@gmail.com>\nShiraz <smcclennon@protonmail.com>\nVictor Song <vms2@rice.edu>\nchrisalcantara <chris@chrisalcantara.com>\nUtkarsh Gupta <utkarshgupta137@gmail.com>\nnevsal\nA cargo subcommand for checking and applying updates to installed executables\n\nUSAGE:\n cargo install-update [OPTIONS] [--] [PACKAGE]...\n\nARGS:\n <PACKAGE>... Packages to update\n\nOPTIONS:\n -a, --all Update all packages\n -c, --cargo-dir <CARGO_DIR> The cargo home directory. Default: $CARGO_HOME or $HOME/.cargo [aliases: root]\n -d, --downdate Downdate packages to match latest unyanked registry version\n -f, --force Update all packages regardless if they need updating\n -g, --git Also update git packages\n -h, --help Print help information\n -i, --allow-no-update Allow for fresh-installing packages\n -j, --jobs <JOBS> Limit number of parallel jobs.\n -l, --list Don't update packages, only list and check if they need an update (all packages by default)\n --locked Enforce packages' embedded Cargo.lock\n -q, --quiet No output printed to stdout\n -r, --install-cargo <EXECUTABLE> Specify an alternative cargo to run for installations\n -s, --filter <PACKAGE_FILTER> Specify a filter a package must match to be considered\n -t, --temp-dir <TEMP_DIR> The temporary directory. Default: $TEMP/cargo-update\n -V, --version Print version information\n\n
-l / --list \u3067\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u306e\u78ba\u8a8d\u304c\u3067\u304d\u307e\u3059\uff0e
$ cargo install-update --list\n Polling registry 'https://index.crates.io/'.........\n\nPackage Installed Latest Needs update\nimpala v0.2.1 v0.2.3 Yes\npik v0.7.0 v0.9.0 Yes\nsniffnet v1.0.1 v1.3.1 Yes\ntuisky v0.0.5 v0.1.2 Yes\nzeitfetch v0.1.12 v0.1.13 Yes\ncargo-update v15.0.0 v15.0.0 No\nmonolith v2.8.3 v2.8.3 No\ntui-journal v0.12.0 v0.12.0 No\nzellij v0.40.1 v0.40.1 No\n
-a / --all \u3067\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3067\u304d\u308b\u3088\u3046\u3067\u3059\uff0e
\nindex \u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\uff0c\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\uff0c\u30b3\u30f3\u30d1\u30a4\u30eb\u304c\u5b9f\u884c\u3055\u308c\u307e\u3059\uff0e
$ cargo install-update --all\n Polling registry 'https://index.crates.io/'.........\n :\n\n
\u518d\u5ea6 -l / --list \u3067\u78ba\u8a8d\u3059\u308b\u3068 Installed \u3068 Latest \u304c\u540c\u3058\u306b\u306a\u308a\uff0cNeeds update \u304c\u5168\u3066 No \u306b\u306a\u3063\u3066\u3044\u307e\u3059\uff0e\u6700\u65b0\u306b\u306a\u3063\u305f\u3088\u3046\u3067\u3059\uff0e
$ cargo install-update --list\n Polling registry 'https://index.crates.io/'.........\n\nPackage Installed Latest Needs update\ncargo-update v15.0.0 v15.0.0 No\nimpala v0.2.3 v0.2.3 No\nmonolith v2.8.3 v2.8.3 No\npik v0.9.0 v0.9.0 No\nsniffnet v1.3.1 v1.3.1 No\ntui-journal v0.12.0 v0.12.0 No\ntuisky v0.1.2 v0.1.2 No\nzeitfetch v0.1.13 v0.1.13 No\nzellij v0.40.1 v0.40.1 No\n
\u5927\u5206\u697d\u306b\u306a\u308a\u307e\u3057\u305f\uff0e
\n$ dpkg-query -W cargo\ncargo 1.81.0+dfsg1-2\n$ lsb_release -dr\nDescription: Debian GNU/Linux trixie/sid\nRelease: n/a\n$ arch\nx86_64\n
Rust\u88fd\u306e\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3067\u52d5\u4f5c\u3059\u308b\u30ef\u30f3\u30bf\u30a4\u30e0\u30d1\u30b9\u30ef\u30fc\u30c9\u30de\u30cd\u30fc\u30b8\u30e3\u3067\u3059\uff0eTOTP/HOTP \u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\uff0e
\n$ sudo apt install cargo\n
$ cargo install cloak\n
~/.cargo/ \u4ee5\u4e0b\u306b\u5c0e\u5165\u3055\u308c\u308b
$ ~/.cargo/bin/cloak --help\r\ncloak 0.1.0\r\nEvans Murithi <murithievans80@gmail.com>\r\nA Command Line OTP Authenticator application.\r\n\r\nUSAGE:\r\n\tcloak [SUBCOMMAND]\r\n\r\nFLAGS:\r\n\t-h, --help Prints help information\r\n\t-V, --version Prints version information\r\n\r\nSUBCOMMANDS:\r\n\tadd Add a new account\r\n\tdelete Delete an account\r\n\thelp Prints this message or the help of the given subcommand(s)\r\n\tlist List OTP for all accounts\r\n\trecovery_codes View recovery codes for an account\r\n\tview View the OTP for an account\n
add \u30b5\u30d6\u30b3\u30de\u30f3\u30c9\u3067\u767b\u9332\u3059\u308b$ ~/.cargo/bin/cloak add --help\r\ncloak-add\r\nAdd a new account\r\n\r\nUSAGE:\r\n\tcloak add [FLAGS] [OPTIONS] <account> <key>\r\n\r\nFLAGS:\r\n\t-h, --help Prints help information\r\n\t\t--hotp Counter based account\r\n\t\t--totp Time based account (default)\r\n\t-V, --version Prints version information\r\n\r\nOPTIONS:\r\n\t-a, --algorithm <ALGORITHM> Algorithm to use to generate the OTP code [possible values: SHA1, SHA256, SHA384,\r\n\t\t\t\t\t\t\t\t SHA512, SHA512_256]\r\n\r\nARGS:\r\n\t<account> Name of the account\r\n\t<key> Secret key of the OTP\r\n$ ~/.cargo/bin/cloak add matoken@home.nextcloud M0KMYFVOZY7AGX47\r\nAccount successfully created\n
$ ~/.cargo/bin/cloak list\r\nAccount: matoken@home.nextcloud\r\nTOTP: 538273\n
$ ~/.cargo/bin/cloak view matoken@home.nextcloud\r\n370696\n
$ cat ~/.cloak/accounts\r\n[\"matoken@home.nextcloud\"]\r\nkey = \"M0KMYFVOZY7AGX47\"\r\ntotp = true\r\nhash_function = \"SHA1\"\n
$ ls -l ~/.cloak/accounts\r\n-rw-r--r-- 1 matoken matoken 87 9\u6708 22 06:19 /home/matoken/.cloak/accounts\r\n$ chmod -R go-rx ~/.cloak\r\n$ chattr +s ~/.cloak/accounts\r\n$ ls -la ~/.cloak\r\n\u5408\u8a08 12\r\ndrwx------ 2 matoken matoken 4096 9\u6708 22 06:19 .\r\ndrwxr-xr-x 62 matoken matoken 4096 9\u6708 23 19:58 ..\r\n-rw------- 1 matoken matoken 87 9\u6708 22 06:19 accounts\n
\u79d8\u5bc6\u9375\u304c\u5e73\u6587\u3067\u305d\u306e\u307e\u307e\u30d5\u30a1\u30a4\u30eb\u306b\u683c\u7d0d\u3055\u308c\u308b\u306e\u3067\u6700\u4f4e\u3067\u3082ecryptfs\u306f\u8a2d\u5b9a\u3057\u3066\u304a\u304b\u306a\u3044\u3068\u304b\u306a\u306a\u611f\u3058?
\n\u79c1\u306f\u73fe\u5728\u306foathtool\u3092\u4f7f\u3063\u305fscript\u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\uff0e\u79d8\u5bc6\u9375\u306f\u30d5\u30a1\u30a4\u30eb\u306b\u624b\u3067\u66f8\u3044\u3066\u6697\u53f7\u5316\u3057\u3066\u304a\u304dscript\u5b9f\u884c\u6642\u306b\u5fa9\u53f7\u3057\u3066oathtool\u306b\u6e21\u3057\u3066TOTP\u8868\u793a\u3068\u3044\u3046\u611f\u3058\uff0e\u82e5\u3057\u304f\u306fKeePassCX\uff0e
\n$ ~/.cargo/bin/cloak -V\r\ncloak 0.1.0\r\n$ dpkg-query -W cargo\r\ncargo 0.29.0-1\r\n$ lsb_release -d\r\nDescription: Debian GNU/Linux unstable (sid)\r\n$ uname -m\r\nx86_64\n