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 標準出力へ文字列を出力するだけの下記サンプルコードを --
Component毎にローカルな状態を持つことはなく、基本的にグローバル変数一つで状態を管理します。 不安に思われるかもしれませんが、結構これでうまくいくんです。 また、更新処理が必ずUpdate内に集められているので、処理の一覧性が高くてメンテしやすいです。 個人的には、複雑なことを複雑にやってしまうことを戒めるアーキテクチャだと思っています。 Component毎に状態変数持ってたら、どれがどの値を持っているのかデバッグする時大変じゃないですか? 状態は全部同じ変数に格納しちゃえば見やすいですよ、的な 他にもさまざまなメリットがあるのですが、元ネタのElmの記事を検索すると色々出てくると思います Why Elmで検索すると、このアーキテクチャの利点がたくさん出てきます。 Yewとの比較 日本では、Rustのフロントエンドフレームワークと言えば、Yewが有名です。 どちらもフロントエンド
1. Rust Christmas, I gave you my heart はじめに 折角クリスマスなので、楽しい近未来感のある技術を検証してみようと思います。お仕事で使っているRust、Kubernetes、そして個人的に興味のあるWebAssemblyをガッチャンコ出来ないか考えてみた。技術者としては常に勉強をする事が重要だと思っているので勉強兼ねて 「highly experimental」 と注意書きのある技術の紹介をしたいと思います。 本日は会社のアドベントカレンダーということもあり仕事しているふりをする必要があるため、ポエムも混ぜながらKubernetes上でWebAssemblyのモジュールを実行するKrustletを使ってみたお話をします。 Krustletとは? GitHubのページ曰く: Krustlet is a tool to run WebAssembly wo
TypeScript でフロントエンドな皆さん、今日も型パズルしていますか? 型が好きなら Rust ですよね。ということで、いまいち使い所が思いつかない WebAssembly と Rust でなにか面白いことできないかな、と爆速(JS比2倍)の Markdown Editor を作ってみました(面倒な人は直接 GitHub みてください) この記事は iCARE Advent Calendar 2020 の 8日目の記事になります。昨日は アオキタカユキ さんの 【adobe XD】線型、円型のグラデーションを引く方法 という記事でした Webアプリケーションを作る まず、利用する側の Web アプリケーションを作成します どんな構成でもいいんですが、タイミング的にもちょうど良い Vue3 + TypeScript で環境を作りました $ npm install -g @vue/cli
このエントリは言語実装 Advent Calendar 2020の1日目の記事です。 次はsisshiki1969さんで「RustでつくるRuby、その後の進捗」です。 κeenです。 昔からちまちま作ってるSML処理系をブラウザ上で動かすことができたのでその進捗報告です。 ちまちま作ってるSML処理系とはこれのことです。 KeenS/webml: A Standard ML Compiler for the Web 今回実装したオンラインコンパイラは以下で試すことができます: WebML Online Compiler まあ、ブラウザで動くのでここに貼ることもできるんですけどね。 こういうのどうやって作ったの?っていうのを話していけたらなと思います。 設計 そもそもの話、WebMLはブラウザで動かすために設計、実装されています。 スタートから違うじゃんと思うかもしれませんが、スタートから
wain is a WebAssembly INterpreter written in Safe Rust from scratch with zero dependencies. An implementation of WebAssembly. Features: No unsafe code. Memory safety and no undefined behavior are guaranteed No external runtime dependency. It means no unsafe dependency and less binary size Efficiency. Avoid unnecessary allocations and run instructions as fast as possible without unsafe code Modular
Made to run natively on all modern operating systems and browsers, Ruffle brings Flash content back to life with no extra fuss. Safe to use— Using the guarantees of Rust and WASM, we avoid the security pitfalls Flash was known for. Easy to install— Whether you’re a user or a website owner, we’ve made it as easy as possible to get up and running.
⚠️ This project is currently not actively maintained. Most of the other maintainers have moved on to other WebAssembly related projects. This project could definitely still be useful to anyone who wants to write a custom Kubelet and its sister project Krator is a state machine-based solution for writing Kubernetes controllers/operators in Rust. If anyone is interested in maintaining these projects
Hey everyone. I’m a bit obsessed with web assembly, so I thought i’d tried to write some semi-higher quality information about what I’ve learned. Some months ago I just started reading the web assembly spec and poking around at bytes. It all started as just a fundamental question “what’s even in here?” What makes the magic of all this “faster than JavaScript” stuff work? It ended up being pretty f
Fuzzing or fuzz testing is an automated testing technique that involves providing invalid, unexpected, or random data as inputs to a program to find bugs that would be otherwise hard to find with manual generated input. — Wikipedia In the last months I’ve been working developing fuzzing targets to find bugs and create patches for the Wasmer WebAssembly runtime. In this post we will learn what is f
はじめに これはWebAssembly Advent Calendar 2019の8日目のエントリです。 (空いていたので飛び入り参加です) 12月28日にコードを書き始めて、大晦日に記事公開となりました。 この記事ではRust製アプリにwasm形式のプラグインを動的にリンクして実行する方法を紹介します。 WebAssemblyのランタイム環境にはFastlyが開発したLucetを用います。 これによりWebブラウザを通さず、Rustアプリ上で直接WebAssemblyコードが実行できます。 WebAssemblyコードはLucetのコンパイラで事前にネイティブコードにコンパイルしますので、Rustで書かれたコードに近い速度で実行できます1。 プラグインにwasm形式を採用すると、特定の言語に縛られずにプラグインを開発できるというメリットがあります。 またファイルアクセスなどの制限のかかっ
はじめに この記事は Rustその2 Advent Calendar 2019の18日目の記事です。 自己紹介などについては、以前に書いた記事を読んでみてください 今回のゴール 本来、jsで実装されているaddEventListenerをwasmで登録して使えるようにするところまでを簡単に説明できればと思います。 web_sys の ライブラリを見ていく rustのwasm crateである wasm-bindgen には web_sysというものがある。これはRustからDOM APIを触るためのラッパー(ライブラリ)を担っている This is a procedurally generated crate from browser WebIDL which provides a binding to all APIs that browser provide on the web. w
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く