概要
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$
以上