並び順

ブックマーク数

期間指定

  • から
  • まで

481 - 520 件 / 741件

新着順 人気順

wasmの検索結果481 - 520 件 / 741件

  • CRubyはどうやってWebAssemblyに移植するか? 例外処理・Fiber実装・保守的GC…足りないパーツを埋めるAsyncifyの活用

    プログラミング言語Rubyの国内最大級のカンファレンス「RubyKaigi」。「RubyKaigi 2022」のKeynoteで登壇したのは、齋藤優太氏。「Ruby meets WebAssembly」のテーマで、WebAssembly上でRubyが動くようになった経緯、テクニック、ユースケースについて発表しました。全2回。後半は、WebAssemblyのユースケースについて。前回はこちら。 WASIでCRubyをWebAssemblyにポートする方法 齋藤優太氏:ここまでが前半戦で、ここからどうやってCRubyをWebAssemblyにポートしたかを紹介します。 CRubyはCで書かれたプログラムなので、すでにいろいろな環境にポートされています。このCRubyのソースコードは、かなりポータブルに書かれているので、CからWasmにコンパイルするコンパイラもあるしポーティングは簡単だなと。

      CRubyはどうやってWebAssemblyに移植するか? 例外処理・Fiber実装・保守的GC…足りないパーツを埋めるAsyncifyの活用
    • wasmを使ってRust製JVMをブラウザで動かしてみた - Qiita

      誰? 名前: r-chaser53 GitHub: https://github.com/rchaser53 Twitter: https://twitter.com/rChaser53 所属: LINE株式会社 言語開発とか好きな人(歴は1.5年くらい) rustfmtのお手伝いを今年はしてます 概要 Rustで作成したJVMをwasm-packを使ってブラウザで動かした 何も使わないで動かすよりはるかに楽だった ついでに見つけた便利なmoduleの紹介 JVM作成については別スライドをどうぞ 今回の成果物 Rust製JVM。wasmとしてブラウザで動かすこともできる https://github.com/rchaser53/rust-jvm wasm-packとは wasm-bindgenを使って生成したwasmファイルにRustとJavaScriptのFFIのランタイムを追加するビル

        wasmを使ってRust製JVMをブラウザで動かしてみた - Qiita
      • 高速で Markdown を HTML に変換してくれる『markdown-wasm』を使ってみた

        はじめに 今回は, MOONGIFT さんで紹介されていた『markdown-wasm』について紹介します. その名の通り WebAssembly を使っているとのことでかなり高速で動くみたいです. まだ細かい検証はできていないんですが, 備忘録として概要と導入方法について紹介します. 『markdown-wasm』とは? 『markdown-wasm』は, C のコードを WebAssembly に移植した超高速な Markdown パーサーです. 主な特徴は以下です. 依存関係なし(31 kB gzipped) どこでも実行ができ, かつ安全(WebAssembly なので分離されたメモリで実行できる) シンプルな API とても速い md4c(C で作られた Markdown parser) をベースに作られている - (CommonMark の仕様に準拠) 速度面では, 公式ページ

          高速で Markdown を HTML に変換してくれる『markdown-wasm』を使ってみた
        • Unityからブラウザまで! ロジックの切り出しに WASI を使ってみる

          本記事はAkatsuki Games Advent Calendar 2022における16日目の記事です。 15日目の記事はぐんそうさんの『新卒2年目 リーダーへの挑戦』でした。胸が熱くなるほどエモい記事でしたので、ご一読いただけますと幸いです。 記事の概要 要約 本記事の要約を以下に示します。 ゲーム本体からロジックを切り出して利用する場合、Luaがしばしば用いられている 組み込みがしやすい、取り回しがよい(ロジックの保守性が向上する)などのメリットがある スクリプト部分の差し替えが容易 ただし、Luaは速度面、記法面でデメリットがある LuaJITかつJIT有効の環境でない限り、基本的に速度は遅い fib(42) の計算時間を例に 記法もやや独特であり、言語としての書きやすさには疑問符がつく 本記事では、代替としてWASI (WebAssembly)を利用することを提案する 高速で、単

            Unityからブラウザまで! ロジックの切り出しに WASI を使ってみる
          • Go playground WASM

            package main import "fmt" func fibonacci(c, quit chan int) { x, y := 0, 1 for { select { case c <- x: x, y = y, x+y case <-quit: fmt.Println("quit") return } } } func main() { c := make(chan int) quit := make(chan int) go func() { for i := 0; i < 12; i++ { fmt.Println(<-c) } quit <- 0 }() fibonacci(c, quit) } package main import "fmt" func fibonacci(c, quit chan int) { x, y := 0, 1 for { select {

            • Scale | Write Once, Run Everywhere

              The Scale Plugin Framework drastically reduces the need to rewrite middleware in different languages by giving developers the ability to chain together functions written across any language. Functions can optionally call and return the response of the next function in their chain, or they can respond directly. This powerful pattern makes it possible to combine Scale Functions with native HTTP hand

                Scale | Write Once, Run Everywhere
              • GitHub - teamortix/golang-wasm: Golang-WASM provides a simple idiomatic, and comprehensive API and bindings for working with WebAssembly for Go and JavaScript developers

                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 - teamortix/golang-wasm: Golang-WASM provides a simple idiomatic, and comprehensive API and bindings for working with WebAssembly for Go and JavaScript developers
                • Proxy-Wasm: Wasmを利用したPlugin機構の開発

                  WebAssembly night #10 https://emsn.connpass.com/event/192221

                    Proxy-Wasm: Wasmを利用したPlugin機構の開発
                  • 標準化に向けて進んでいる Web Neural Network API について調べてみた

                    今月、W3C に提出されていた Web Neural Network API (WebNN) が、Chromium で Intent to Prototype[1]になりました。この記事では、WebNN が標準化されている目的、追加される API の詳細や今後の動向について調査してみました。 この記事の3行まとめ Neural Network の数値計算の最適化は、ハードウェア単位で盛んに行われており、API も提供されている WebNN は、各ハードウェア (OS) で提供されている Neural Network の API をブラウザからも利用できるようにし、推論のさらなる最適化を実現する Web 開発者は、WebNN より高レベルな API として提案されている Model loader API の動向を追うと良さそう WebNN が提案された目的 Neural Network モデ

                      標準化に向けて進んでいる Web Neural Network API について調べてみた
                    • go-readabilityをwasmにしてCloudflare Workersで本文抽出する - *iroi*

                      先日Cloudflare Workersでウェブページの本文を抽出したくなったことがありました。本文抽出といえば、@mozilla/readabilityが使えそうです。しかし依存に含まれるnwsapiにはFunctionコンストラクタが多用されており*1、Cloudflare Workersでは動作しません。これを修正するのも大変そうです。 そこで、TinyGoを使用してgo-readabilityをwasmにコンパイルしてみることにしました。 TinyGo のドキュメントUsing WASM | TinyGo のままではCloudflare Workersでは動かなかったので、TinyGoに含まれるwasm_exec.jsを少し修正したり*2、 import側もwasmファイルをfetchしているのを変更したり*3すると無事動きました。 動作するコードは https://github.

                        go-readabilityをwasmにしてCloudflare Workersで本文抽出する - *iroi*
                      • Postgres WASMを支える技術

                        Intro 10月3日にWebAssemblyを用いてWebブラウザにx86の仮想マシンを構成することで、PostgreSQLをWebブラウザ上で実行可能にした「Postgres WASM」がオープンソースで公開されました。 以前から気になっていたSupabaseが公開していたこと、最初にSnapletという企業がOSSで公開しておりそれをフォークして完成させたこと、色々気になることばかりでしたので自分なりに調べて深掘りしてみました。

                          Postgres WASMを支える技術
                        • proxy-wasm-rust-sdkとその周辺技術

                          proxy-wasm-rust-sdk?proxy-wasm-sdk-rushはWebAssembly for ProxiesというApplication Binary Interface(以降ABIと表記)に従って実装されているライブラリです。 予め提供されているtraitに実装を追加していくことで簡単にwasm-filterを作成できます。 proxy-wasm-rust-sdkの使い方早速、wasm-filterを作っていきましょう。 作り方は大まかに以下の3つのstepになります。 cargo.tomlのdependenciesに proxy-wasm を追加lib.rsに_start()を作成任意のcontextの実装を作成それぞれの手順について少しだけ丁寧に見ていきます。 cargo.tomlのdependenciesに proxy-wasm を追加 [dependencies

                            proxy-wasm-rust-sdkとその周辺技術
                          • GitHub - fiberplane/fp-bindgen: Bindings generator for full-stack WASM plugins

                            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 - fiberplane/fp-bindgen: Bindings generator for full-stack WASM plugins
                            • Internal Design - The `wasm-bindgen` Guide

                              Design of wasm-bindgen This section is intended to be a deep-dive into how wasm-bindgen internally works today, specifically for Rust. If you're reading this far in the future it may no longer be up to date, but feel free to open an issue and we can try to answer questions and/or update this! Foundation: ES Modules The first thing to know about wasm-bindgen is that it's fundamentally built on the

                              • WasmBoxC: Simple, Easy, and Fast VM-less Sandboxing

                                The software ecosystem has a lot of useful but unsafe code, and the easier it is to sandbox that code, the more often that’ll happen. If it were as simple as passing the compiler a --sandbox flag that makes an unsafe library unable to see or affect anything outside of it, that would be incredible! We can’t get it quite that easy, but this post describes WasmBoxC, a sandboxing approach that is very

                                • ブラウザで動かすPythonの出来ること出来ないこと

                                  はじめに 最近はPythonがブラウザで動くようになってきています。 この前はscriptタグにPythonを書くPyScriptが話題になっていましたね。 ただ、現状まだ発展途上で出来ることと出来ないことが混在しています。 そこで、2022/06時点での状況をまとめたいと思います ちなみに、この記事の内容は個人開発でブラウザ上で動くPythonのPlayground を作っていて得た知見をもとに作成しています ブラウザで動くPythonのアーキテクチャーとコア技術 PyScriptのアーキテクチャーは上図のように3層になっています。 下から WASM:ブラウザ[1]で動くバイナリコード。JavaScript以外の言語でも、WASMにコンパイルすることでブラウザで実行可能になる Pyodide: CPython[2]をEmscripten(C/C++のWASMコンパイラ)でWASMにコンパ

                                    ブラウザで動かすPythonの出来ること出来ないこと
                                  • Blazorのカレンダー | Advent Calendar 2019 - Qiita

                                    The Qiita Advent Calendar 2019 is supported by the following companies, organizations, and services.

                                      Blazorのカレンダー | Advent Calendar 2019 - Qiita
                                    • Fast, parallel applications with WebAssembly SIMD · V8

                                      Show navigation SIMD stands for Single Instruction, Multiple Data. SIMD instructions are a special class of instructions that exploit data parallelism in applications by simultaneously performing the same operation on multiple data elements. Compute intensive applications like audio/video codecs, image processors, are all examples of applications that take advantage of SIMD instructions to acceler

                                      • サーバサイドWebAssemblyランタイム「Wasmer 1.0」がリリース

                                        「Wasmer 1.0」では、すべてのコンパイラが関数を並列にコンパイルするようになり、バージョン0.17.1と比較してコンパイルにかかる時間を最大9倍高速化している。 用途に応じて最適なコンパイラをプラグインする機能では、ブロックチェーンなどに適したコンパイルが超高速な「Singlepass」、最小限の最適化での開発に適した「Cranelift」、最適化されたマシンコードによって最高のパフォーマンスを実現する「LLVM」をサポートする。また、コンパイラエンジンは生成されたコードをメモリに直接プッシュするJITエンジンと、共有オブジェクトとしてロード可能なネイティブコードを生成するネイティブエンジンに対応している。 そのほか、AOT(Ahead Of Time)コンパイルのサポートによる、プリコンパイルされたWasmバイナリを任意のデバイスで実行できるヘッドレスバージョンや、クロスコンパイ

                                          サーバサイドWebAssemblyランタイム「Wasmer 1.0」がリリース
                                        • A primer on WebAssembly

                                          As detailed in this LinkedIn post, 2022 is going to be my year of diving into the world of WebAssembly and Rust. With an overwhelming amount of people opting for blog content over other media, here’s the first one in, what I hope will be, a series of posts covering the aforementioned topics. Although this has been covered in various formats across the internet, I believe any content about a new te

                                            A primer on WebAssembly
                                          • Rust meets Lucet:ネイティブアプリでwasm形式の動的リンクプラグインを実行する

                                            はじめに これはWebAssembly Advent Calendar 2019の8日目のエントリです。 (空いていたので飛び入り参加です) 12月28日にコードを書き始めて、大晦日に記事公開となりました。 この記事ではRust製アプリにwasm形式のプラグインを動的にリンクして実行する方法を紹介します。 WebAssemblyのランタイム環境にはFastlyが開発したLucetを用います。 これによりWebブラウザを通さず、Rustアプリ上で直接WebAssemblyコードが実行できます。 WebAssemblyコードはLucetのコンパイラで事前にネイティブコードにコンパイルしますので、Rustで書かれたコードに近い速度で実行できます1。 プラグインにwasm形式を採用すると、特定の言語に縛られずにプラグインを開発できるというメリットがあります。 またファイルアクセスなどの制限のかかっ

                                            • RustでWebAssembly――「Rust and WebAssembly」を体験する

                                              RustとWebAssembly 今回は、前回紹介したC/C++と並んでWebAssembly開発の本命の一翼とされる、プログラミング言語Rustによる開発を紹介します。これには、Rust and WebAssemblyワーキンググループが開発するツールやライブラリを利用します。Rust and WebAssemblyによる開発では、標準ライブラリを含めたRustの言語仕様を十分に生かしたWebAssemblyプログラムが作成可能です。 Rustは、C/C++と同様にネイティブコードをターゲットにしたプログラミング言語であるので、その高い効率と高速性を生かした使い方が、真価を発揮しやすいと言えます。また、Rustはメモリ安全が考慮されているので、ダングリングポインタやメモリリークの危険性を極力排除した開発も可能です。連載第1回でも紹介したように、まずは速度が重視される部分をRustが受け持

                                                RustでWebAssembly――「Rust and WebAssembly」を体験する
                                              • Debugging WebAssembly with modern tools  |  Blog  |  Chrome for Developers

                                                The road so far A year ago, Chrome announced initial support for native WebAssembly debugging in Chrome DevTools. We demonstrated basic stepping support and talked about opportunities usage of DWARF information instead of source maps opens for us in the future: Resolving variable names Pretty-printing types Evaluating expressions in source languages …and much more! Today, we're excited to showcase

                                                • Introducing GetEnvoy Extension Toolkit for WebAssembly-Based Envoy Extensions

                                                  Tetrate Enterprise Gateway for Envoy—the cloud-native service gateway—has reached 1.0! Learn more › close

                                                    Introducing GetEnvoy Extension Toolkit for WebAssembly-Based Envoy Extensions
                                                  • PythonでWebAssemblyを実装してみる #Python #WebAssembly #WASM #フロント開発 - クリエーションライン株式会社

                                                      PythonでWebAssemblyを実装してみる #Python #WebAssembly #WASM #フロント開発 - クリエーションライン株式会社
                                                    • WebAssemblyランタイム「Wasmer 4.0」公開 コマンド強化でパッケージ管理やアプリケーション公開が容易に

                                                      Wasmerは2023年6月22日(米国時間)、オープンソースのWebAssemblyランタイムの最新版「Wasmer 4.0」をリリースしたと発表した。 WebAssembly(「Wasm」と略される場合もある)は、Webブラウザなどモダンな実行環境での効率的なコード実行とコンパクトなコード表現を実現する安全でポータブルな低レベルフォーマット。World Wide Web Consortium(W3C)がコア仕様をW3C勧告として公開している。Wasmerは、WebAssemblyをネイティブで実行できるようにするオープンソースのランタイムだ。 Wasmer 4.0をインストールするには以下のコマンドを実行する。

                                                        WebAssemblyランタイム「Wasmer 4.0」公開 コマンド強化でパッケージ管理やアプリケーション公開が容易に
                                                      • WebAssemblyでコンテナレスの未来を築く - WebAssemblyサミットでのKevin Hoffman氏の講演

                                                        Spring BootによるAPIバックエンド構築実践ガイド 第2版 何千人もの開発者が、InfoQのミニブック「Practical Guide to Building an API Back End with Spring Boot」から、Spring Bootを使ったREST API構築の基礎を学んだ。この本では、出版時に新しくリリースされたバージョンである Spring Boot 2 を使用している。しかし、Spring Boot3が最近リリースされ、重要な変...

                                                          WebAssemblyでコンテナレスの未来を築く - WebAssemblyサミットでのKevin Hoffman氏の講演
                                                        • GitHub - ethanhs/python-wasm: Build scripts and configuration for building CPython for Emscripten

                                                          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 - ethanhs/python-wasm: Build scripts and configuration for building CPython for Emscripten
                                                          • rustc/wasm-bindgenの生成するWebAssemblyを観察する

                                                            WebAssemblyの言語としての仕様を理解するため、Rustのコードがrustc/wasm-bindgenによってWebAssemblyにどのようにコンパイルされるかを延々と試したメモ。Mapping High Level Constructs to LLVM IRを意識している。 yubrot/wasm-sandbox - GitHub WebAssembly Specification WebAssembly Interface Types Proposal WebAssembly Interface Types: Interoperate with All the Things! rustwasm/wasm-bindgen ビルドにはwasm-packを用いているため、出力はnpmパッケージの形になる。また .wasm ファイルはwasm-optによる最適化がかかった形となる。

                                                            • Distributing WebAssembly modules using OCI registries

                                                              WebAssembly (WASM) is a binary instruction format for a stack-based virtual machine. In familiar terms, WASM is used as a compilation target for various programming languages (C, C++, Rust, or Golang, for example), generating a compact binary with a known format. Mozilla Developer Network describes WebAssembly as having huge implications for the web platform — it provides a way to run code written

                                                                Distributing WebAssembly modules using OCI registries
                                                              • irb.wasm: IRB on browser powered by wasm

                                                                irb.wasm: IRB on browser powered by wasm

                                                                • DockerでYew開発環境(RustのWebAssemblyフレームワーク)を構築 - Qiita

                                                                  概要 最近、Rustの勉強を始めました。 基本的な文法や言語機能を簡単に読んでみて、そろそろ自分で色々試してみようと、DockerでのYew(RustのWebAssemblyフレームワーク)環境を構築をしました。 公式イメージで簡単にできるかと思いきや、こちらのページにあるようにDockerなしで環境構築するのと同じ方法では妙なところで詰まるので、そのあたりを備忘録として残しておきます 目次 前提 成果物(Dockerfileとcompose.yaml) Rust? Yew? Dockerを用いたYew環境構築 準備 Dockerなしで環境構築準備する場合(参考) Yew環境構築 前提 この記事作成時の開発環境 OS:macOS Venture 13.1 CPU:Apple Silicon M1 (chromebook上のcrostini(bullseye)でも動作確認済み) ツール群 イ

                                                                    DockerでYew開発環境(RustのWebAssemblyフレームワーク)を構築 - Qiita
                                                                  • lambda@edge上でwasmを使用した画像リサイズにおける速度

                                                                    はじめに 最近、lambdaでwasmを利用できることを知ったので、画像のリサイズ処理をwasm(Rust)で行った場合の速度を計測してみました。 環境構築 環境構築には下記を使用しました。 Terraform Docker Git AWSリソースの用意 AWSリソースの作成にはTerraformで行います。 今回使用したtfファイルはこちらになります。 AWS 構成 作成する手順は下記の通り。 git clone https://github.com/takenoko-gohan/terraform-image-resizing-on-cloudfront.git cd terraform-image-resizing-on-cloudfront terraform init # 問題がないか確認 # 変数 prefix は任意の値を指定してください terraform plan -va

                                                                      lambda@edge上でwasmを使用した画像リサイズにおける速度
                                                                    • Understanding Every Byte in a WASM Module

                                                                      In my last post, we explored how to build WASM modules, both with and without WASI support, using Clang. In a comment on Reddit, it was mentioned that much of the setup I walked through in that post could be avoided by just leveraging Zig’s WASI supprt. This is a great point, and I would recommend doing the same. The following command is inarguably simpler than what I described. However, there are

                                                                        Understanding Every Byte in a WASM Module
                                                                      • GitHub - streamdal/streamdal: Client-side observability using Wasm

                                                                        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.

                                                                          GitHub - streamdal/streamdal: Client-side observability using Wasm
                                                                        • Pure Wasm Life 2: Optimizing Webassembly and Canvas

                                                                          Note: This post is part 2 of my Webassembly Game of Life series, if you haven't already you can read part 1 here. So when I posted my last Webassembly Game of Life post I had a few improvements I wanted to make to it. Some that I mentioned in that post (like bitpacking the board so it took less memory), and some that I mentioned to friends who read it (like switching from Canvas2D to WebGL or WebG

                                                                          • カーネル空間ですべてのプロセスを動かすには -TAL, SFI, Wasmとか -

                                                                            2019/7/20 カーネル/VM探検隊15回の @nullpo_head (https://twitter.com/nullpo_head) の発表資料です。 高レベル言語ランタイム、型付きアセンブリ、Software Fault Isolationなどの手法を紹介しつつ、任意のプログラムを安全にカーネル空間で動かそうという野望に答えるクールな挑戦達を紹介します。

                                                                              カーネル空間ですべてのプロセスを動かすには -TAL, SFI, Wasmとか -
                                                                            • モダンブラウザで動作するWebAssemblyベースのJVM「CheerpJ 3.0」が登場

                                                                              Leaning Technologiesは2024年2月1日(米国時間)、モダンブラウザで動作するWebAssemblyベースのJava仮想マシン(JVM)である「CheerpJ 3.0」の提供を開始したと発表した。 CheerpJ 3.0は、Java 8との幅広い互換性を持ち、Javaアプリケーション、アプレット、ライブラリ、Java Web Start/JNLPアプリケーションを、プラグインなしでブラウザで実行するためのランタイム環境を提供する。 JavaバイトコードをJavaScriptに変換するJIT(Just-In-Time)コンパイラと、OpenJDKに基づくJava SE 8(Java Platform, Standard Edition 8)ランタイムという2つのコンポーネントの組み合わせで、いずれもC++で書かれており、Cheerpを使ってWebAssemblyとJava

                                                                                モダンブラウザで動作するWebAssemblyベースのJVM「CheerpJ 3.0」が登場
                                                                              • Wasmで少しだけ手軽にRubyとRubyスクリプトを持ち運ぶ

                                                                                やりたいことRuby の環境を作らずに基本的なスクリプトを動作させたい 非エンジニアの環境で 1 ファイルでコマンドを動作させたいというほどの環境の縛りはない簡単に Docker 環境で基本的なコードが動けばよい、程度今回できたことWasm 版 Ruby を Wasm Runtime 上で動かす基本的な Ruby コードと Wasm 版 Ruby を一つの Wasm module にパッケージし、それを Wasm Runtime 上で動かす さらに Wasm module を compile しておいて起動を速くする(Rubyについてはまだまだ課題は多いが)Wasm を使うことで直接実行バイナリを生成できない言語でも JVM + .war 程度の使い勝手である程度のことができることが分かった実験に使ったのは macOS 13.6.7 ( arm64 darwin 22 )Ruby 3.2.

                                                                                • web-sys: requestAnimationFrame - The `wasm-bindgen` Guide

                                                                                  web-sys: A requestAnimationFrame Loop View full source code or view the compiled example online This is an example of a requestAnimationFrame loop using the web-sys crate! It renders a count of how many times a requestAnimationFrame callback has been invoked and then it breaks out of the requestAnimationFrame loop after 300 iterations. Cargo.toml You can see here how we depend on web-sys and activ