Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Contributing to Deno is fun!
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
petamoriken / 森建
October 20, 2023
Programming
480
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Contributing to Deno is fun!
Deno Fest ディノフェス - presented by toranoana.deno
https://deno-fest-2023.deno.dev/
petamoriken / 森建
October 20, 2023
More Decks by petamoriken / 森建
See All by petamoriken / 森建
Security issues being discussed on Web Platforms
petamoriken
0
1.2k
2年かけて Deno に DOMMatrix を実装した話 / How I implemented DOMMatrix in Deno over two years
petamoriken
0
250
WebAssembly を読み込むベストプラクティス 2026年春版 / Best Practices for Loading WebAssembly (Spring 2026)
petamoriken
5
1.3k
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
290
Module Harmony
petamoriken
3
1.2k
Denoでフロントエンド開発 2025年春版 / Frontend Development with Deno (Spring 2025)
petamoriken
1
1.6k
非ブラウザランタイムとWeb標準 / Non-Browser Runtimes and Web Standards
petamoriken
0
690
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
350
フロントエンドの標準仕様をどう追っているか / How I follow the frontend standards specs
petamoriken
4
2.8k
Other Decks in Programming
See All in Programming
JRuby: Past, Present, and Future
headius
0
190
Building an Out-of-Order CPU
latte72
1
800
AI × TiDD / 2026.09.05 Redmine 大阪
tokudiro
1
180
Family mrubyの進捗
kishima
1
130
Jetpack Compose メカニズム
skydoves
0
470
LoopHub - ローカルで動く GitHub で、AI と共同開発
jugyo
1
570
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
4
3.5k
Snowflakeで業務アプリを作ろう。 Snowflakeのアプリ機能解説&実践ガイド
ayumu_yamaguchi
2
300
AgentCore CLI で進化した AWS での AI エージェントの作り方 : 必要な機能を必要な時に
icoxfog417
PRO
3
370
モジュールの視点からSwiftを読み解く #iosdc
s_shimotori
0
190
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
460
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
300
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
The Curious Case for Waylosing
cassininazir
1
520
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.9k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
280
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
280
Six Lessons from altMBA
skipperchong
29
4.5k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
2k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Building AI with AI
inesmontani
PRO
1
1.2k
Transcript
Contributing to Deno is fun! pixiv Inc. 森内建太 petamoriken 2023.10.20
2 自己紹介 • Web エンジニア • ECMAScript や WHATWG を追うのが好き • よく仕様についての記事を書いています petamoriken プロダクト支援本部
課題解決部(福岡)
3
4 目次 • Deno の構成 • Deno 内部の JavaScript • primordials.js について • コントリビュート手順
• プルリクエストの具体例
5 Deno の構成 • Cargo (Rust) ワークスペースで管理されている • https://github.com/denoland/deno ◦ cli コマンドライン
◦ runtime 実行部分 ◦ ext Web 標準 API、FFI、Node.js 互換レイヤーなど • https://github.com/denoland/deno_core ◦ core V8、JS と Rust を仲介する部分 (ops) など
6 Deno 内部の JavaScript • Deno API のインターフェースは JavaScript で実装されている ◦ Web 標準 API、Node.js 互換レイヤーなど ◦ ファイルシステム、ネットワークなど外界とのやり取りは Rust
• 実行時に都度テキストとして読み込むと時間がかかる 👉 V8 スナップショット機能で JavaScript と ops の初期化処理を高速化
pub fn create_runtime_snapshot(snapshot_path: PathBuf) { let fs = std::sync::Arc::new(deno_fs::RealFs); let
mut extensions: Vec<Extension> = vec![ deno_webidl::deno_webidl::init_ops_and_esm(), deno_console::deno_console::init_ops_and_esm(), deno_url::deno_url::init_ops_and_esm(), deno_web::deno_web::init_ops_and_esm::<Permissions>( Default::default(), Default::default(), ), // ... ]; 7 deno/runtime/build.rs
function quoteString(string, ctx) { const quote = ArrayPrototypeFind( ctx.quotes, (c)
=> !StringPrototypeIncludes(string, c), ) ?? ctx.quotes[0]; const escapePattern = new SafeRegExp(`(?=[${quote}\\\\])`, "g"); string = StringPrototypeReplace(string, escapePattern, "\\"); if (ctx.escapeSequences) { string = replaceEscapeSequences(string); } return `${quote}${string}${quote}`; } 8 deno/ext/console/01_console.js
9 primordials.js について • プロトタイプ汚染されても問題なく内部コードが実行できるようするためのもの ◦ deno_core/core/00_primordials.js で提供される • CI で dlint prefer-primordials ルールでチェックされる // NG
["foo", "bar"].include("foo"); // OK const { ArrayPrototypeInclude } = window.__bootstrap.primordials; ArrayPrototypeInclude(["foo", "bar"], "foo");
10 コントリビュート手順 1. イシューを見つける • good first issue ラベルが付いているものが取っつきやすいです 2. 取り組むことを宣言する
3. プルリクエストを作成する • わからない箇所は Discord や日本コミュニティ Slack などで気軽に聞いて👌 • 見てもらう前に cargo test ./ tools/format.js ./tools/lint.js を 実行して CI を通す くわしくはコントリビュートガイドへ https://docs.deno.com/runtime/manual/references/contributing/
11 プルリクエストの具体例 • feat(console): Display cause errors in console #12462