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
IntroductionWhat is wgpu?Wgpu is a Rust implementation of the WebGPU API spec. WebGPU is a specification published by the GPU for the Web Community Group. It aims to allow web code access to GPU functions in a safe and reliable manner. It does this by mimicking the Vulkan API, and translating that down to whatever API the host hardware is using (ie. DirectX, Metal, Vulkan). Wgpu is still in develo
GhostCell Separating Permissions from Data in Rust Joshua Yanovski, Hoang-Hai Dang, Ralf Jung, Derek Dreyer. ICFP 2021. Paper Rust & Coq Sources Benchmark Results Podcast @ Building with Rust The Rust language offers a promising approach to safe systems programming based on the principle of aliasing XOR mutability: a value may be either aliased or mutable, but not both at the same time. However, t
Rust developers have repeatedly raised concerned about an unaddressed privacy issue over the last few years. Rust has rapidly gained momentum among developers, for its focus on performance, safety, safe concurrency, and for having a similar syntax to C++. StackOverflow's 2020 developer survey ranked Rust first among the "most loved programming languages." However, for the longest time developers h
The windows and windows-sys crates let you call any Windows API past, present, and future using code generated on the fly directly from the metadata describing the API and right into your Rust package where you can call them as if they were just another Rust module. The Rust language projection follows in the tradition established by C++/WinRT of building language projections for Windows using sta
Note (2024, ezrosent@) While the policy on bugs and feature requests remains unchanged I've had much less time over the last 1-2 years to devote to bug fixes and feature requests for frawk. Other awks are more actively maintained, and CSV support is now a much more common feature in awk compared to when this project started; I'll update this notice if frawk's status changes. frawk is a small progr
このエントリは,Rust 3 Advent Calendar 2020の8日目の記事です. はじめに エラー処理の基本 Result<T, E> Errorトレイト ?オペレータ ベストプラクティスを支えるクレート anyhow thiserror failureクレートについて まとめ 追記 はじめに Rustを書いている時にアプリケーション固有のエラー型を定義したい場合があります.この辺のベストプラクティスは今まで何度か変化*1しており,今年の9月にエラーハンドリングのプロジェクトグループが発足*2したことからも分かるとおり,今後も変化していく可能性が濃厚です. この記事では,エラー処理まわりに関する基本的な内容と,現時点でのベストプラクティスとされているanyhowとthiserrorを用いたエラー処理について紹介します. エラー処理の基本 Result<T, E> Rustには例外
Rust Language Cheat Sheet 4. January 2026 Contains clickable links to The Book,BK Rust by Example,EX Std Docs,STD Nomicon,NOM and Reference.REF Clickable symbols BK The Book. EX Rust by Example. STD Standard Library (API). NOM Nomicon. REF Reference. RFC Official RFC documents. 🔗 The internet. ↑ On this page, above. ↓ On this page, below. Other symbols 🗑️ Largely deprecated. '18 Has minimum edit
Cell と RefCell はどちらも「内側のミュータビリティ」を実現するものだが、実現方法が違う。 RefCell については、ランタイムでボローチェックしていることはよく知られている(と思う)。 let ref_cell = RefCell::new(20i32); println!("ref_cell (1): {}", ref_cell.borrow()); println!("ref_cell (2): {}", ref_cell.borrow()); *ref_cell.borrow_mut() = 200; println!("ref_cell (3): {}", ref_cell.borrow()); ref_cell (1): 20 ref_cell (2): 20 ref_cell (3): 200 ランタイムでとは、文字通りコンパイラではなくランタイムで、つまりプロ
Imagine the countless mornings I’ve spent tinkering with spreadsheets, or the quiet moments spent choosing the perfect jacket that balances… Read More
WebAssembly memory Passing arrays to Rust WebAssembly modules dealloc or free, and a basic way of checking for memory leaks Passing arrays to AssemblyScript modules Passing arrays to modules using Wasmtime Exchanging strings between modules and runtimes Memory in WebAssembly is one of the topics that creates confusion for newcomers, particularly for those with experience in languages with memory m
Rust で WASI 対応の WebAssembly を作って、スタンドアロン実行や Web ブラウザ上での実行を試してみました。 WASI(WebAssembly System Interface) は WebAssembly のコードを様々なプラットフォームで実行するためのインターフェースで、これに対応した WebAssembly であれば Web ブラウザ外で実行できます。 Rust で WASI 対応の WebAssembly を作るのは簡単で、ビルドターゲットに wasm32-wasi を追加しておいて、rustc や cargo build によるビルド時に --target wasm32-wasi を指定するだけでした。 wasm32-wasi の追加 > rustup target add wasm32-wasi 標準出力へ文字列を出力するだけの下記サンプルコードを --
2 年前に書いた記事 Command Line Tool を作ってみる in Rust が今でも参照されることがあるようなので、2020 年版にアップデートした内容を書いていきます。 概要 この記事では Rust で Command Line Tool を作るときに、便利なライブラリ、ツール、そしてサービスを紹介します。主に CLI working group が取り組んでいる Command Line Applications in Rust(以後 Book と呼称)のアップデート内容が中心です。その他にプラスアルファして個人的に便利だと思うツールやサービスを紹介していきます。 こちらに完全なサンプルコードを公開しています。 見やすさの都合上、説明と直接関係のないコードや設定は省略して表示します。手元でビルドして確認したい場合はこちらのソースコードをダウンロードしてご確認ください。 エラ
Component毎にローカルな状態を持つことはなく、基本的にグローバル変数一つで状態を管理します。 不安に思われるかもしれませんが、結構これでうまくいくんです。 また、更新処理が必ずUpdate内に集められているので、処理の一覧性が高くてメンテしやすいです。 個人的には、複雑なことを複雑にやってしまうことを戒めるアーキテクチャだと思っています。 Component毎に状態変数持ってたら、どれがどの値を持っているのかデバッグする時大変じゃないですか? 状態は全部同じ変数に格納しちゃえば見やすいですよ、的な 他にもさまざまなメリットがあるのですが、元ネタのElmの記事を検索すると色々出てくると思います Why Elmで検索すると、このアーキテクチャの利点がたくさん出てきます。 Yewとの比較 日本では、Rustのフロントエンドフレームワークと言えば、Yewが有名です。 どちらもフロントエンド
このブログ記事は、Advent Calender 2020, Rust 3、23日目の記事となります。自分は現在大学で教員をしていまして、セキュリティ系の研究室に所属しています。現在はセキュリティの講義を担当しており、そこでRust言語を教えているため、その内容を紹介しようと思います。 はじめに 皆さんご存知のようにソフトウェアの脆弱性は今でも大きな問題となっていますが、それを完全ではないにしろ根本から解決するための技術的手法として型システムが注目されています。型システムの考え自体は古くからありますが、最近ではRust言語が登場し、OSなどいわゆる低レイヤーなソフトウェアも型システムの恩恵を預かることができるようになってきました。SMTソルバや定理証明などと言った難しい(かつ面白い)手法でC言語やC++言語で書かれたソフトウェアを解析する方法もありますが、セキュアソフトウェアを語る上では、
この記事は Rust Advent Calendar 2020 ならびに CyberAgent Developers Advent Calendar 25日目の記事です。 今年のはじめの頃になりますが、『CPUの創り方』という本に載っている TD4 という CPU を実装してみました。TD4 は「とりあえず動作するだけの4bit CPU」の略です。この本に載っている CPU エミュレータを実際に実装してみました。ただし、本書には GUI が載っていましたが、それは省略しました。 CPUの創りかた 作者:渡波 郁発売日: 2003/10/01メディア: 単行本(ソフトカバー) 「最近話題の RISC-V などの CPU エミュレータを作ってみたいものの、いきなり作るにはハードルが高い。何か簡単なもので素振りをして CPU の動作の仕組みをまずは知りたい」という方にはかなりオススメできる教材だ
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く