1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

wsl1でrust その3

Last updated at Posted at 2024-10-28

概要

wsl1でrustやってみた。
systemに正規表現エンジンが、無いらしい。
regexクレートを呼びつけて、使ってみた。
電卓やってみた。

参考にしたページ

操作手順


~$ cd rust

~/rust$ ls
hello  hello.rs  hello0  openmind  zundoko

~/rust$ cargo new dentaku
     Created binary (application) `dentaku` package

~/rust$ cd dentaku

~/rust/dentaku$ cargo add regex
    Updating crates.io index
      Adding regex v1.11.1 to dependencies.
             Features:
             + perf
             + perf-backtrack
             + perf-cache
             + perf-dfa
             + perf-inline
             + perf-literal
             + perf-onepass
             + std
             + unicode
             + unicode-age
             + unicode-bool
             + unicode-case
             + unicode-gencat
             + unicode-perl
             + unicode-script
             + unicode-segment
             - logging
             - pattern
             - perf-dfa-full
             - unstable
             - use_std
    Updating crates.io index

~/rust/dentaku$ explorer.exe .

~/rust/dentaku$ cargo build
  Downloaded regex v1.11.1
  Downloaded regex-syntax v0.8.5
  Downloaded regex-automata v0.4.8
  Downloaded 3 crates (1.2 MB) in 0.74s
   Compiling memchr v2.7.4
   Compiling regex-syntax v0.8.5
   Compiling aho-corasick v1.1.3
   Compiling regex-automata v0.4.8
   Compiling regex v1.11.1
   Compiling dentaku v0.1.0 (/home/ore/rust/dentaku)
    Finished dev [unoptimized + debuginfo] target(s) in 26.50s

~/rust/dentaku$ cargo run
    Finished dev [unoptimized + debuginfo] target(s) in 0.09s
     Running `target/debug/dentaku`
3 4 + 2 *
["3", "4", "+", "2", "*"]
14

~/rust/dentaku$

以上

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?