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
ライブラリを公開してメンテナンスした一年
Search
asuka
December 20, 2025
Technology
120
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ライブラリを公開してメンテナンスした一年
https://shinjukugyoen.connpass.com/event/377580/
asuka
December 20, 2025
More Decks by asuka
See All by asuka
GoとSIMDとWasmの今。
askua
3
640
2025年ふりかえり
askua
1
250
Wasmの気になる最新情報
askua
1
420
Wasmのエコシステムを使った ツール作成方法
askua
0
470
Pure Goで体験するWasmの未来
askua
1
1.1k
Wasmで社内ツールを作って配布しよう
askua
0
340
Wasm元年
askua
0
420
wstdなんだか良さそう
askua
0
160
Dartでウェブ開発 (やりたい)
askua
0
120
Other Decks in Technology
See All in Technology
Classmethod Company Deck
satoshi7
1
780
Let's Change Our World—Again
snoozer05
PRO
2
210
AI導入は済んだ。次は統制を作り替える番だ_AI×開発組織 Summit 2026
techtekt
PRO
0
470
Gemini Intelligence 入門 ― AppFunctions と Gemini Nano
takuroabe
0
330
古い指輪から広がった JAVA コミュニティ とのつながり
yamad
0
130
Active Record Connection Adaptersにおける長年の課題に再び取り組む
yahonda
0
380
Kiro Crewで「みのるん式」仕事術やってみた
minorun365
PRO
3
960
M5Stackで作る BLEマウス GPSログの世界
tomokusaba
PRO
0
450
CloudWatch Logsのコスト最適化:どこまでAIに任せてどこから人間が承認すべきか
yama3133
0
140
Optunaの最新リリースv5.0について
pfn
PRO
0
130
初海外で注意すべきこと12選!!!安全快適なre:invent生活にするために
yuuuuuuu168
1
190
局所最適は悪ではない。壊れているのは指標です。量と質を同時に見る先行指標の設計
recruitengineers
PRO
2
100
Featured
See All Featured
The World Runs on Bad Software
bkeepers
PRO
72
12k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
46k
Designing for Performance
lara
612
70k
A designer walks into a library…
pauljervisheath
211
25k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
710
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
630
Why Our Code Smells
bkeepers
PRO
340
58k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
580
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
440
Rebuilding a faster, lazier Slack
samanthasiow
85
9.7k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
570
Transcript
ライブラリを公開して メンテナンスした一年 新宿御苑.dev #2025.12.20
WHOAMI asuka • 株式会社モニクル/SWE ◦ Monicle Techbook vol.2 技術書典19 •
Wasm関連の同人誌・商業誌の執筆 ◦ 実践入門WebAssembly ◦ WebAssembly System Interface入門 ◦ Wasm Cookbook vol.2 技術書典17 ◦ Wasm Cookbook vol.3 技術書典18 ◦ Wasm Cookbook vol.4 技術書典19 ◦ Wasm Cookbook vol.5 技術書典20 • 新宿御苑.dev ◦ 新宿御苑.wasm #2025.6.25 LTイベント ◦ 新宿御苑.wasm #2025.10.19LTイベント ◦ 新宿御苑.dev #2025.12.20 LTイベント 2 商業誌 Cookbookシリーズ ごちWASI
ライブラリを公開してメンテナンスした一年 3
@askua/core https://jsr.io/@askua/core • 今年2月にv1.0.0を公開 • 業務で利用することを目的に実装 (Deno) • 現在v1.4.0を準備中 (年明けリリース)
4
@askua/core Denoを使うと嬉しいこと • CLIがGo言語ライク ◦ deno fmt : フォーマッター (JSONやMarkdownにも効く)
◦ deno lint : リンター ◦ deno doc : TSDocを元にドキュメントの生成 ▪ deno doc --output=docs --html mod.ts ▪ deno run -NR=./docs jsr:@std/http/file-server ./docs ◦ deno test : `*_test.ts`のテストを実行 ▪ --docオプションで,TSDocのコードブロックのテストも実行できる ◦ deno bench : `*_bench.ts`のベンチマークテストを実行 → パッケージを作るにあたって必要なものが初めから揃っている 5
Denoを使うと嬉しいこと • Denoでパッケージを作りJSRに公開する - Speaker Deck @askua/core 6
解決したかった課題 • Brand型,Result型,Option型など個人的によく使う型をまとめておきたい → effect-tsとかあるからそれを使えば良いのに🤖 ↓ Class instanceベースの型ではなく,Objectベースの型が欲しかった • type
Option<T> = { some: true; value: T } | { some: false }; @askua/core 7
Class instanceベースの型ではなく,Objectベースの型が欲しかった • type Option<T> = { some: true; value:
T } | { some: false }; → ObjectならJSONにエンコード/デコードしても情報が欠落しない でも `if (o.some) { foo(o.value); }` と書くよりは `o.map(foo)`と書けた方が嬉しい → Option<T>を拡張したOptionInstance<T>を用意 declare const o: Option<number>; const p = Option(o).map((n) => n + 1).map(foo); @askua/core 8
Option<T>を拡張したOptionInstance<T>を用意 • v1.0.0時点では,RustのOption型のAPIを参考に作成 declare const o: Option<number>; const a =
Option(o).unwrap(); const b = Option(o).unwrapOr(new Error("foo")); const c = Option(o).unwrapOrElse(() => new Error("foo")); → Rustは言語都合で`unwrap`, `unwrapOr`, `unwrapOrElse`に別れている → JSで分ける必要なくないか?? (あとunwrapOrやunwrapOrElseは長い) @askua/core 9
Rustは`unwrap`, `unwrapOr`, `unwrapOrElse`の3パターンある → JSでは `unwrap`だけにする declare const o: Option<number>;
const a = Option(o).unwrap(); const b = Option(o).unwrap(() => new Error("foo")); → `unwrap(new Error("foo"))`はサポートしない • `() => V`の時に,`() => V`を返したいのか`V`を返したいのか区別できない • `new Error("foo")`と`() => new Error("foo")`だとパフォーマンスに差がある @askua/core 10
実用してみて • `unwrapOr`, `unwrapOrElse`などRust由来で追加したけどJSだと冗長に感じる APIを非推奨に • filter,Option.fromNullable,Result.tryなど頻出パターンを追加実装 @askua/core 11
メンテナンスしてみてどうだった? • v1にするタイミング,もっと後でも良かったかも ◦ v0なら気持ち的に壊しやすい ◦ v1〜は後方互換に気を遣う ◦ 実運用してみてから直したいと思う箇所が思ったよりもあった •
`deno bench`めっちゃ良かった ◦ リファクタ時にパフォーマンスよくなっていればそれは正義 • `deno test`でTSDocのテストをできたので,修正漏れに気がつけた → 動いているものを修正するのは大変 @askua/core 12
来年の抱負 生活習慣の改善と健康で文化的な生活 13