並び順

ブックマーク数

期間指定

  • から
  • まで

361 - 400 件 / 417件

新着順 人気順

rustの検索結果361 - 400 件 / 417件

  • Existential types in Rust [LWN.net]

    Please consider subscribing to LWNSubscriptions are the lifeblood of LWN.net. If you appreciate this content and would like to see more of it, your subscription will help to ensure that LWN continues to thrive. Please visit this page to join up and keep LWN on the net. For several years, contributors to the Rust project have been working to improve support for asynchronous code. The benefits of th

    • Benchmark TypeScript Parsers: Demystify Rust Tooling Performance

      Benchmark TypeScript Parsers: Demystify Rust Tooling Performance TL;DR: Native parsers used in JavaScript are not always faster due to extra work across languages. Avoiding these overhead and using multi-core are crucial for performance. Rust is rapidly becoming a language of choice within the JavaScript ecosystem for its performance and safety features. However, integrating Rust into JavaScript t

        Benchmark TypeScript Parsers: Demystify Rust Tooling Performance
      • Making Rust supply chain attacks harder with Cackle | David Lattimore

        Making Rust supply chain attacks harder with Cackle If you want a slightly shorter read, skip to Introducing Cackle. A hypothetical story about Alex Alex is a software engineer who has built a tool which she licences to her customers. She only has a small number of clients, but they like her tool. She built her tool using Rust, with about 20 direct dependencies from crates.io. When you count indir

        • Mackerel REST APIのRustクライアントで取り入れた設計 - プログラムモグモグ

          この記事はMackerel Advent Calendar 2023の15日目です。 昨日はkmutoさんでした。 MackerelのREST APIクライアントをRustで書き始めたのは2017年の春のことでした。もう六年半も前のことになります。 2017年ごろの日記を見返してみるとRustにかなりハマっていた時期で、色々なツールを作っていたのを思い出しました。 mackerel-client-rsはそれ以来放置してしまっていたのですが、最近また急にRustのやる気スイッチが入ったので、色々と実装し直しています。 github.com 久しぶりにMackerelのAPI一覧のドキュメントを見ると、ダウンタイムやアラートグループ設定といった個人的に思い入れのある機能のAPIや複数のホストを一括で操作するAPIなどが追加されていて、進化を感じました。 死活監視のステータスや外形監視のリダイレ

            Mackerel REST APIのRustクライアントで取り入れた設計 - プログラムモグモグ
          • Rustの世界に飛び込んでみた。 - Qiita

            こんにちは、システム開発部門の山本です。 Rustって面白いですね! 概要 新しい技術の習得を積極的に後押ししてくれる、そんな弊社。 Rust未経験の私がRustで構築された業務システムのバックエンド開発を担当した話。 Rust Webブラウザソフトウェア「Firefox」を開発しているMozillaが支援するオープンソースのプログラミング言語。 ネイティブコンパイラ言語であり、メモリ安全性と高パフォーマンスが売り。 今後、Webシステム開発の主流になる可能性もある。 担当する業務システム とある企業の業務システムのリプレイス。 パッケージツールから自社開発Webシステムへの切り替えを目指すなか、 弊社が全面的に開発サポートをさせて頂いております。 Rustの仕様に戸惑う1ヶ月目 まずバックエンド開発担当となって最初の作業がバグの改修でした。 そこで必要となるのがRustのコード解析。 こ

              Rustの世界に飛び込んでみた。 - Qiita
            • 【Rust】✨CLIアプリ向けクレート4選✨ ~ clap, dialoguer, indicatif, console ~ - Qiita

              4つのクレートを全て活用すると次のデモのようなCLIアプリケーションも簡単(※当社比)に作れます! asciinema リポジトリ: https://github.com/anotherhollow1125/lang_monster Gif中の次のシーンにて本記事で紹介するクレートが使われています。 ./lang_monster --help clapクレートによりヘルプオプションが追加されています アセットダウンロードプログレスバー indicatifクレートを使って表示しています 左上始点でセリフ表示・色付き文字 consoleクレートにてANSIエスケープを出力することで実現しています 主人公名ライバル名の選択・入力 dialoguerクレートを使って実現しています オプション入力 (./lang_monster -t auto -s fast -u Rust -r Go) clap

                【Rust】✨CLIアプリ向けクレート4選✨ ~ clap, dialoguer, indicatif, console ~ - Qiita
              • Rust and dynamically-sized thin pointers

                One of Rust's notable differences from C is its requirement that all values have a defined size, which enables runtime bounds-checking and advanced static analysis tooling such as MIRI. For dynamically-sized types (DSTs) this requirement is implemented using thick pointers, such that each pointer to a dynamically-sized value is an (address, size) tuple. Thick pointers are more convenient and easie

                • プログラミング言語「Rust 1.72.1」がリリース

                  CodeZine編集部では、現場で活躍するデベロッパーをスターにするためのカンファレンス「Developers Summit」や、エンジニアの生きざまをブーストするためのイベント「Developers Boost」など、さまざまなカンファレンスを企画・運営しています。

                    プログラミング言語「Rust 1.72.1」がリリース
                  • 「TAURI」をはじめる前に -「Rust」の基礎と開発環境の構築

                    本連載では、オープンソースのデスクトップRustアプリフレームワーク「TAURI」について解説していきます。第1回の今回は「Rust」の概要やインストール方法、ビルドと実行方法を紹介します。 はじめに 今回から、プログラミング言語「Rust(ラスト)」でデスクトップアプリを開発する記事を連載していきます。デスクトップアプリの開発には「TAURI(タウリ)」という「Electron(エレクトロン)」に似たフレームワークを使います。 デスクトップアプリなので、GUIを備えることができます。GUIはWebページをデザインすることで作るのでメイン言語はRustですが、Webページを作るのに「HTML5+CSS+JavaScript」の知識も必須になります。本連載ではRustの文法とHTML5+CSS+JavaScriptのコードについては解説しますが、HTML5+CSS+JavaScriptの文法

                      「TAURI」をはじめる前に -「Rust」の基礎と開発環境の構築
                    • Rustと機械学習ライブラリcandleで自作言語の言語モデルを自作してみた話

                      こんにちは、毛利です。 最近はChatGPTやLLMが盛り上がっていますね。趣味の一つに自作プログラミング言語・コンパイラがあるのですが、LLMと組み合わせてなんかできないかなぁと妄想しています。この記事ではcandleというライブラリを使って自作言語の言語モデルを自作(学習)してみた話について書きます。 TL;DR 1. candleというHuggingFaceが作っているRust言語で書けるライブラリについて一通り書いています 2. 学習させるのは自然言語ではなく、LLM向きに設計した言語を学習させることにしました。手始めに、数字の順番を逆に記述した2進数の加算の式を言語としてみました。例えば、111 + 1 = 0001. のようなものです 3. candleを使った言語モデルの実装を行いました。実装はすべて記事中に記載しています 4. 結果として、今回の実験の設定では数字の順番を逆

                        Rustと機械学習ライブラリcandleで自作言語の言語モデルを自作してみた話
                      • Rust through the ages

                        How has Rust changed over the years? It's been nine years since 1.0 was released (well, next week, technically). In that time, there have been 78 major releases and two editions, with a third due later this year. Quite a lot has changed! Those changes have been fairly incremental, so if you've been using Rust all that time, it probably doesn't feel like a lot. But comparing the 1.0 flavour of Rust

                        • GitHub - danog/php-tokio: Use any async Rust library from PHP!

                          You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                            GitHub - danog/php-tokio: Use any async Rust library from PHP!
                          • Rust はコストのかかるコードを書くのが苦痛になるようにデザインされている(?) - 無駄と文化

                            Rust は「コストのかかるコードは書くのが苦痛であるべき」という思想のもとデザインされている気がする。 というのも Rust を書いていると「意図的にショートカットが用意されていない」と思える場面があるからだ。 いくつか例を挙げてみようと思う。 文字列の連結 String 型の変数 s を所有しているときに、s の 後ろに 文字列リテラルを連結するのは簡単だ。+ 演算子で文字列の連結ができる。 let mut s = String::from("hello"); s = s + ", world"; println!("{}", s); // => hello, world 一方で s の 前に 連結するには一手間必要になる。 let mut s = String::from("world"); s = "hello, ".to_string() + &s; println!("{}",

                              Rust はコストのかかるコードを書くのが苦痛になるようにデザインされている(?) - 無駄と文化
                            • rust-analyzer/docs/dev/syntax.md at master · rust-lang/rust-analyzer

                              You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                rust-analyzer/docs/dev/syntax.md at master · rust-lang/rust-analyzer
                              • GitHub - chaosprint/asak: A cross-platform audio recording/playback CLI tool with TUI, written in Rust.

                                You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                  GitHub - chaosprint/asak: A cross-platform audio recording/playback CLI tool with TUI, written in Rust.
                                • CでもC++でもなく「Go」「Rust」を使いたくなる理由

                                  ダウンロードはこちら 「Go」と「Rust」は、どちらもさまざまな用途に適したオープンソースのプログラミング言語だ。企業のシステム開発で中心的存在だった「C」「C++」などの“老舗言語”に代わる汎用(はんよう)言語として、開発者から支持を受けている。 本資料は、GoとRustの機能や利点、欠点を紹介する。それぞれの特徴を知っておくことは、これから新しくプログラミング言語を学習しようとする際や、プロジェクトで用いるプログラミングを選択する際の参考になる。 中身を読むには、「中身を読む」ボタンを押して無料ブックレットをダウンロードしてください。 連載:GoとRustを比較する

                                    CでもC++でもなく「Go」「Rust」を使いたくなる理由
                                  • Rust developers at Google twice as productive as C++ teams

                                    Code shines up nicely in production, says Chocolate Factory's Bergstrom Echoing the past two years of Rust evangelism and C/C++ ennui, Google reports that Rust shines in production, to the point that its developers are twice as productive using the language compared to C++. Speaking at the Rust Nation UK Conference in London this week, Lars Bergstrom, director of engineering at Google, who works o

                                      Rust developers at Google twice as productive as C++ teams
                                    • Rustで自作OSに挑戦した話(敗走)

                                      この記事について Writing an OS in 1000 LinesをRustで途中まで頑張った記録を残したものです。もと記事はとても素晴らしいので、みなさんやりましょう! RustでOS書きたいと思った時、小さな踏み台になれればと思います。もし間違っている部分があれば、教えていただけると嬉しいです。 また、Scrapboxに日記があります。人に見せるようなものではないかもですが、詳しめに書いているので置いておきます。動かない原因を調査するため、もがいている姿が見れます。 つくったものはこちら 参考 以下の記事&コードを沢山参考にしました。ありがとうございました! 環境 Ubuntu 20.04 rustc version rustc 1.73.0 (cc66ad468 2023-10-03) プロセスを実装するところからnightlyに変わります(後述) qemu version Q

                                        Rustで自作OSに挑戦した話(敗走)
                                      • RustでもGCを使いたい

                                        はじめに Rustには優れた所有権システムおよびRc<T>/Arc<T>があるので通常はGCを必要としないのですが、どうしても循環参照(それもrc::Weak<T>では解決できないタイプの)が必要となるケースというのが多数存在します。具体的には言語処理系および…… いや言語処理系くらいしかないな。しかしながら、言語処理系を実装するにあたってRustを選択するのは一般的な選択肢なので、これはゆゆしき問題です。 gcクレートによるGC導入 GC機能を提供するクレートはいくつかありますが、何も考えずシングルスレッドでGCしたいだけならgcクレートが手軽です。 Rc<T>/RefCell<T>の代わりにgc::Gc<T>/gc::GcCell<T>を使用するだけでOK。管理したい型にはgc::Traceおよびgc::Finalize traitを実装する必要があります。 // Gc<T>で管理した

                                          RustでもGCを使いたい
                                        • Verifying Rust Zeroize with Assembly...including portable SIMD

                                            Verifying Rust Zeroize with Assembly...including portable SIMD
                                          • Rust is for the Engine, Not the Game - Barrett's Club

                                            Last updated on June 6, 2024. Rust is for the Engine, Not the Game Macros are cool! But, if we're going to create another language anyways... LogLog Games recently posted Leaving Rust gamedev after 3 years, a must-read article for folks who're doing game development in Rust. It focuses on a small indie developer organization and their experiences with Rust development. If you haven't given it a re

                                              Rust is for the Engine, Not the Game - Barrett's Club
                                            • 【Rust製構成管理ツール】JetPorch とは【次世代Ansible?】 - Qiita

                                              開発言語: Rust まず個人的に一番うれしい点は Rust によって実装されていることです. Rust は強力な型システムや所有権を持つため安全性の高い並列性・並行性のあるプログラミングを可能にしており, 実行速度の向上をもたらします. 最近の Python プロジェクトでは広く型ヒントが導入されつつありますが Ansible にはまだ無く, ソースコードを読む際には労力がかかります. その点においても Rust の型システムは開発者の理解を助けてくれます. 所有権による強力なコンパイラチェックも高い安全性を保証してくれます. マネージドノードへの要件 Ansible ではマネージドノードに Python を必要としますが JetPorch にはそのような要件はありません. そのため Python がインストールされていない環境であっても JetPorch であれば利用することができます

                                                【Rust製構成管理ツール】JetPorch とは【次世代Ansible?】 - Qiita
                                              • Iggy.rs - building message streaming in Rust

                                                Origins Over half a year ago (in April, to be exact), I eventually decided to learn Rust for good. My previous attempt during the 2022 AoC had failed rather quickly, after a few days of completing the exercises - I finally realized that I needed a real project to work on. For the last few years, I've been dealing with the different kinds of distributed systems (mostly using C#), including the typi

                                                • LINE botを題材に学ぶRust Webアプリケーション開発:PharmaX株式会社

                                                  この本はLINE Bot を題材として、Rust での Web ア プリケーション開発の重要ポイントが網羅的に学べるようになっています。 Rust は、メモリ安全性・並行処理、および高性能を目指して設計されたシステムプロ グラミング言語です。所有権やライフタイムなどの独特の概念を持ち、難しいと言われる ことも多い言語です。Web アプリケーション開発にはまだ向かないと言った印象を持た れている方も多いようです。 しかし、実際に使ってみると、むしろ高級言語に近い特色を多数兼ね備えていることに 気がつくでしょう。また、ここ数年で Web アプリケーション開発のためのエコシステム も十分に発展してきており、開発に困ることはあまりありません。勘所さえ押さえること ができれば、Web アプリケーション開発においても Rust のメリットを十分に享受するこ とが可能です。 出版社から出版されている書籍

                                                    LINE botを題材に学ぶRust Webアプリケーション開発:PharmaX株式会社
                                                  • Rust for Linux

                                                    • Google Geminiでゲーム移植?ブラウザゲームの"Rust+WASM版"をAIに作らせる | Agar.io 2024 - Qiita

                                                      Google Geminiでゲーム移植?ブラウザゲームの"Rust+WASM版"をAIに作らせる | Agar.io 2024JavaScriptgameRustAIWebAssembly 皆さんは Google AI Studio を使っていますか? このサービスは、テキストや画像だけでなく、動画やコードなどの様々なデータを理解し、Gemini に質問したり指示したりできる強力なツールです。 ただ、注目すべきは かなり長いプログラムのコードを食わせてそれを解析できる ということです。 以下は slither.io というブラウザゲームのjsファイルを丸ごと食わせて解説してもらった例 コードを全部読まなくても、Gemini に解析してもらってどういう処理があるとか、サーバーとどんな通信を行っているのかを聞くとかなり精度良く回答が帰ってきます。 つまり、コードの中身をほとんど読まなくてもだい

                                                        Google Geminiでゲーム移植?ブラウザゲームの"Rust+WASM版"をAIに作らせる | Agar.io 2024 - Qiita
                                                      • Rust の Stream の基本的な取り回しを理解する - Activ8 Tech Blog

                                                        こんにちは、エンジニアの渡辺(@mochi_neko_7)です。 今回は Rust における Stream の基本的な取り回しを紹介します。 Anthropic の Claude API の Rust Client を書いていた際に Streaming API の対応をしていたところ、自身が Rust の Stream をちゃんと理解していなかったことに気づき勉強し直していました。 ところが日本語で解説している記事をあまり見かけなかったため、本記事で自分の理解している範囲で基礎的な内容を整理して紹介したいと思います。 もし間違った記述等ありましたらご指摘いただけますと幸いです。 環境 Rust の Stream 1. 非同期版 Iterator としての Stream 2. Poll の扱い Stream の周辺 crate 1. futures_core 2. async_stream

                                                          Rust の Stream の基本的な取り回しを理解する - Activ8 Tech Blog
                                                        • The Real C++ Killers (Not You, Rust)

                                                          This is Words and Buttons Online — a collection of interactive #tutorials, #demos, and #quizzes about #mathematics, #algorithms and #programming. Hello! I’m Oleksandr Kaleniuk and I’m a C++holic. I have been writing in C++ for 17 years and for all those 17 years I’ve been struggling to get rid of this devastating addiction. It all started in late 2005 with a 3D space simulator engine. The engine h

                                                          • Rust's iterators optimize nicely—and contain a footgun | nicole@web

                                                            I saw a claim recently that in functional programming using "map/filter iterates over the list twice, while the foreach loop iterates only once." The author continued that "Haskell can fuse maps together as an optimization but I don't think you safely fuse arbitrary map/filters? I dunno." There are really two claims here: in functional programming, map/filter will do two iterations there is an opt

                                                            • GitHub - ratatui-org/ratatui: Rust library that's all about cooking up terminal user interfaces (TUIs)

                                                              You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                                GitHub - ratatui-org/ratatui: Rust library that's all about cooking up terminal user interfaces (TUIs)
                                                              • Rust 🦀 and WebAssemblyのチュートリアルを読む

                                                                Rust 🦀 と Wasm の "Hello, World!" 本記事は、筆者がRustとWasmを学ぶために以下のドキュメントを読み進めた過程を記すものです。 最終的にライフゲームの完成を目指しますが、とりあえず今回はHello,World!までです。 RustとWasm Rust 2022年現在とても人気のある言語。あらゆるLinuxコマンドのオルタナティヴの多くがRustで書かれている印象を受けます。いろいろ良い点があるが本筋ではないので省略、というより詳しくは知りません。 Wasm WebAssembly。ウェブブラウザを含むあらゆる環境内で実行できるプログラミング言語。とても注目されています。よく見るサンプルがRustで書かれたプログラムをWasmにコンパイルしてブラウザで実行する。この記事でもそれをします。 セットアップ 用意するもの Rustの基本的なツールチェイン rus

                                                                  Rust 🦀 and WebAssemblyのチュートリアルを読む
                                                                • Rustでリバーブを実装する

                                                                  Parakeet株式会社でResearcherをしている金子(nadare)です。CPUで動く軽量AIボイスチェンジャーParavoにおいて、リバーブやイコライザといったエフェクターをかける機能をRustで実装しました。本記事ではRustで実装した理由や用いたライブラリについて説明します。 リバーブについて リバーブは音に残響音や反射音を加える空間的エフェクトで、通常の音をホールで演奏した音や狭い空間で鳴らした音のように加工します。リバーブの実装にはハードウェア・ソフトウェア等様々な手法がありますが、今回は畳み込み演算を用いたリバーブの実装を行いました。 畳み込み演算で実装するリバーブには、Room Impulse Response(RIR)という音の信号を用います。これは再現したい空間で拍手をしたときに得られるような音で、様々な環境で収録したRIRを集めたデータセットや、pyroomac

                                                                    Rustでリバーブを実装する
                                                                  • Rust Foundation

                                                                    DOVER, DELAWARE, USA, June 12, 2024 – The Rust Foundation, AdaCore, Arm, Ferrous Systems, HighTec EDV-Systeme GmbH, Lynx Software Technologies, OxidOS, TECHFUND, TrustInSoft, Veecle, and Woven by Toyota are thrilled to jointly announce the Safety-Critical Rust Consortium. The primary objective of this group will be to support the responsible use of the Rust programming language in safety-critical

                                                                      Rust Foundation
                                                                    • GitHub - clarkmcc/cel-rust: Common Expression Language interpreter written in Rust

                                                                      You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                                        GitHub - clarkmcc/cel-rust: Common Expression Language interpreter written in Rust
                                                                      • RustのWASMをAngularのサービスとして使う方法 - Qiita

                                                                        ハイサイ!オースティンやいびーん! 概要 Rustとwasm_bindgenを使って、Angularのサービスとして使えるWASMを作る方法をサクサクと紹介します。 なぜWASMをAngularに? そもそもなぜWASMをAngularで使いたいのかというところを疑問に思う読者もいるかもしれませんが、その思いはおそらくパフォーマンスを追求するならAngularを使うのはどうかという前提だと仮定してお話しします。 Angularはパフォーマンスが悪いのはその通りです。特にFirst Paint(DOMに最初にレンダーされる)までの時間が悲惨です。読み込んだ後のパフォーマンスはReactよりはいいが素晴らしいわけでもないのです。 しかし、Angularが向いているのは、業務アプリであり、その業務アプリではサクサクと動作することが非常に大事です。以前勤めていた会社では、Angularを使ったアプ

                                                                          RustのWASMをAngularのサービスとして使う方法 - Qiita
                                                                        • Enter paradis — A new chapter in Rust's parallelism story | Andreas Longva

                                                                          Rust is a great language for data-parallel problems with relatively simple parallel access patterns. It particularly excels when the data can be split up into contiguous chunks. On the other hand, things can get messy for parallel access patterns that are non-contiguous or less structured. In this post, I will show you an uglier side of parallelism in Rust. Thankfully, it is not a fundamental flaw

                                                                          • libbpf-rs: eBPF for the Rust ecosystem

                                                                            Summary libbpf-rs provides safe Rust bindings to libbpf as well as a cargo plugin to help you develop “Compile Once - Run Everywhere” eBPF applications. Use libbpf-rs over BCC to produce smaller, more efficient, and more predictable applications. Background eBPF (BPF) programs have traditionally been written using BPF compiler collection (BCC). The application would then call into BCC using the C+

                                                                            • Rust vs. Go: Effective Unit Testing - Qiita

                                                                              Retail AI Adventurers Advent Calendar 2023 の投稿です。 Retail AI は、トライアルカンパニー を軸とした小売におけるお客様の買い物体験の向上を目指す企業です。 この投稿では、本業(SRE)のかたわらで取り組む Backend Tech Stack について書きます。 題材は、「Rust 初心者として、Standard な Test Code の実装方法」についてです。 Rust における Test Code の書き方と Go で一般的な Table Driven Tests1 を使った Test Code について書きます。 tl;dr Rust でも Go と同じような Table Driven Tests1 を実装できます。 Rust では、compile 時に型チェックを行うため、Test Case の設計もより厳密になります。 R

                                                                                Rust vs. Go: Effective Unit Testing - Qiita
                                                                              • [Rust] cargo workspace で使える tips

                                                                                はじめに cargo workspace とは、複数のパッケージを一つのプロジェクトとして扱う機能です。 パッケージを分割しワークスペースで管理することで、保守性や再利用性が上がるなどのメリットがある一方で、 Cargo.toml の管理が多少面倒に感じることもあります。 この記事では、そういった面倒さを少しでも解消する方法を紹介します。 [workspace.package] でパッケージの情報をまとめる パッケージは必ず Cargo.toml を持ち、そこにビルドの依存関係や、crates.io に公開する際に使われる情報などを記述する必要があります。これは、ワークスペースを使う場合も例外ではありません。 その一方で、ライセンスやリポジトリの情報など、ワークスペース内で全てに共通するものもあります。 こういったときに使えるのが、 Rust 1.64 で導入されたワークスペース内の継承で

                                                                                  [Rust] cargo workspace で使える tips
                                                                                • GitHub - yorickpeterse/pattern-matching-in-rust: Pattern matching and exhaustiveness checking algorithms implemented in Rust

                                                                                  You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                                                    GitHub - yorickpeterse/pattern-matching-in-rust: Pattern matching and exhaustiveness checking algorithms implemented in Rust