Skip to content

Commit 3212b27

Browse files
committed
more edits
1 parent 03e115f commit 3212b27

3 files changed

Lines changed: 116 additions & 76 deletions

File tree

sql/2025/webassembly/counts.sql

Lines changed: 42 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,60 @@
1-
# Query for wasm requests' count with distinct wasm origin name
1+
# Query for wasm requests and sites counts
22

33
WITH wasmRequests AS (
44
SELECT
5+
date,
56
client,
67
page,
7-
CASE
8-
WHEN REGEXP_CONTAINS(url, r'/(hyphenopoly|patterns).*/[a-z-]{2,5}\.wasm')
9-
THEN '(hyphenopoly dictionary)'
10-
WHEN ENDS_WITH(url, '.unityweb')
11-
THEN '(unityweb app)'
12-
ELSE
13-
REGEXP_REPLACE(
14-
REGEXP_EXTRACT(LOWER(url), r'./([^./?])'), -- lowercase & extract filename between last `/` and `.` or `?`
15-
r'-[0-9a-f]{20,32}$', -- trim trailing hashes to transform `name-0abc43234[...]` to `name`
16-
''
17-
)
18-
END AS name
8+
root_page,
9+
url,
10+
REGEXP_EXTRACT(url, r'([^/]+)$') AS filename -- lowercase & extract filename between last `/` and `.` or `?`
1911
FROM
2012
`httparchive.crawl.requests`
2113
WHERE
22-
date = '2025-07-01' AND
23-
type = 'wasm'
14+
date IN ('2021-07-01', '2022-06-01', '2024-06-01', '2025-07-01') AND
15+
(
16+
(date IN ('2024-06-01', '2025-07-01') AND type = 'wasm') -- wasm type was added in Jan 2024
17+
OR
18+
(date IN ('2021-07-01', '2022-06-01') AND (JSON_VALUE(summary.mimeType) = 'application/wasm' OR JSON_VALUE(summary.ext) = 'wasm'))
19+
)
20+
),
21+
22+
totals AS (
23+
SELECT
24+
date,
25+
client,
26+
COUNT(DISTINCT root_page) AS total_sites,
27+
COUNT(DISTINCT NET.REG_DOMAIN(page)) AS total_reg_domains
28+
FROM
29+
`httparchive.crawl.requests`
30+
WHERE
31+
date IN ('2021-07-01', '2022-06-01', '2024-06-01', '2025-07-01')
32+
GROUP BY
33+
date,
34+
client
2435
)
2536

2637
SELECT
38+
date,
2739
client,
2840
COUNT(0) AS total_wasm,
29-
COUNT(DISTINCT NET.REG_DOMAIN(page)) AS distinct_origin
41+
COUNT(DISTINCT filename) AS unique_wasm,
42+
COUNT(DISTINCT root_page) AS sites,
43+
total_sites,
44+
COUNT(DISTINCT root_page) / total_sites AS pct_sites,
45+
COUNT(DISTINCT NET.REG_DOMAIN(page)) AS reg_domains,
46+
total_reg_domains,
47+
COUNT(DISTINCT NET.REG_DOMAIN(page)) / total_reg_domains AS pct_reg_domains
3048
FROM
3149
wasmRequests
50+
INNER JOIN
51+
totals
52+
USING (date, client)
3253
GROUP BY
33-
client
54+
date,
55+
client,
56+
total_sites,
57+
total_reg_domains
3458
ORDER BY
59+
date DESC,
3560
client

src/content/en/2025/webassembly.md

Lines changed: 74 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: WebAssembly
44
description: WebAssembly chapter of the 2025 Web Almanac covering usage, languages, and post-MVP features.
55
hero_alt: Hero image of Web Almanac characters performing scientific experiments on various code symbols resulting in 1's and 0's coming out the other end.
66
authors: [nrllh, nimeshgit]
7-
reviewers: []
7+
reviewers: [tunetheweb]
88
analysts: [nimeshgit]
99
editors: [cjihrig]
1010
translators: []
@@ -22,7 +22,7 @@ featured_stat_label_3: TODO
2222

2323
## Introduction
2424

25-
WebAssembly is no longer just a "web" technology; it has evolved into a high-performance, universal bytecode format. Officially a W3C standard since 2019, the ecosystem reached a major milestone with the release of Wasm Version 3.0 in December 2025, marking significant growth in both browser-based and standalone environments.
25+
WebAssembly is no longer just a "web" technology; it has evolved into a high-performance, universal bytecode format. Officially <a hreflang="en" href="https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/">a W3C standard since 2019</a>, the ecosystem reached a major milestone with the release of <a hreflang="en" href="https://webassembly.github.io/spec/core/">Wasm Version 3.0 in December 2025</a>, marking significant growth in both browser-based and standalone environments.
2626

2727
### The Mission
2828

@@ -43,9 +43,72 @@ In essence, Wasm is moving beyond the browser to provide a secure, high-performa
4343

4444
We follow [the same methodology from the 2021 Web Almanac](../2021/webassembly#methodology), which is the first edition that included WebAssembly. WebAssembly is compiled into bytecode and distributed as binary format. The findings here infer the source language used in the modules. The accuracy of that analysis is covered in more detail in the respective sections.
4545

46-
## How widely is WebAssembly being used?
46+
### Limitations
4747

48-
We found 303,496 confirmed WebAssembly requests on desktop and 308,971 on mobile. There are 275,191 unique wasm file requests on desktop and 280,125 on mobile. These correspond to 33,459 domains on desktop and 34,687 domains on mobile, representing 0.35% and 0.28% of all domains on desktop and mobile, respectively.
48+
- **Data Acquisition & Retrieval** Our analysis relies on the almanac-wasm tool to fetch WASM binaries using parameters from the initial HTTP Archive crawl. However, retrieval depends on third-party server availability; 404/403 errors or resource updates since the initial crawl may occur. We assume the retrieved file is identical to the one present during the original recording.
49+
50+
- **Source Language Identification** To identify source languages, we utilize the WebAssembly Binary Toolkit (`wasm2wat`) and Rust-based parsers to analyze imports, exports, and custom sections for compiler metadata and language fingerprints.
51+
52+
- **Limitations**: This is not a definitive approach. "Stripped" binaries (using tools like *wasm-strip*) or obfuscated code remove the debug info and metadata required for identification.
53+
- **Example**: Compilers like TinyGo generate unique structures and WASI imports that often diverge from standard *go_exec.js* patterns, resulting in these binaries being classified as "Unknown".
54+
55+
### Feature Detection Constraints
56+
57+
- **No Runtime Check:** WebAssembly lacks a built-in instruction for modules to detect host features from within the sandbox; detection is handled by the host environment (e.g., JavaScript or Wasmtime).
58+
- **Compile-time Dependency:** Advanced features like SIMD or Threads are enabled via compiler flags. If the host environment does not support these specific features at instantiation, the binary will fail to load.
59+
60+
## WebAssembly usage
61+
62+
{{ figure_markup(
63+
caption="Desktop sites using WebAssembly.",
64+
content="0.35%",
65+
classes="big-number",
66+
sheets_gid="540023407",
67+
sql_file="counts.sql"
68+
)
69+
}}
70+
71+
We see that 0.35% of desktop sites and 0.28% of mobile sites are using WebAssembly. This is approximately 43,000 sites in our dataset for both, but with a larger dataset for mobile the relative percentage is lower.
72+
73+
### Year-on-year trend
74+
75+
{{ figure_markup(
76+
image="usage-trends.png",
77+
caption="WebAssembly usage trend",
78+
description="Bar chart showing WebAssembly usage after several years of rapid growth. Between 2024 and 2025, the percentage of desktop sites using WebAssembly saw a slight decrease from 0.36% to 0.35%, while mobile usage remained flat at 0.28%.",
79+
chart_url="https://docs.google.com/spreadsheets/d/e/2PACX-1vSXX1UpspK3gNeMVyApXrSYk42_Wmeh9RVpGarOFbs9EVbuU8wDyQh72Mu9PckmNat2wRqfP4kVAOki/pubchart?oid=729417371&format=interactive",
80+
sql_file="counts.sql",
81+
sheets_gid="540023407"
82+
)
83+
}}
84+
85+
Interestingly, looking over previous Web Almanac years, WebAssembly requests have increased drastically from ~0.05% in 2021 to 0.28%/0.35% this year. There was also a slight dip from 2024.
86+
87+
### WebAssembly by rank
88+
89+
{{ figure_markup(
90+
image="webassembly-by-rank.png",
91+
caption="Page Ranking (Group) for Web Assembly 2025",
92+
description="Bar chart showing distribution of page ranking groups from 1000, 10,000, 100000, 1000000, 10000000 and all on client requests for desktop and mobile",
93+
chart_url="https://docs.google.com/spreadsheets/d/e/2PACX-1vSXX1UpspK3gNeMVyApXrSYk42_Wmeh9RVpGarOFbs9EVbuU8wDyQh72Mu9PckmNat2wRqfP4kVAOki/pubchart?oid=1476075550&format=interactive",
94+
sql_file="ranking.sql",
95+
sheets_gid="TODO"
96+
)
97+
}}
98+
99+
We see a clear "Power Law" in WebAssembly adoption: more popular sites are more likely it is to use Wasm.
100+
101+
Key Insights from the Page Ranking Data:
102+
103+
- **Top-Tier Dominance**: Wasm is most prevalent among the top 1,000 sites mobile. These are typically "heavy" applications like Figma, Adobe, or Google Meet that require high performance for complex tasks.
104+
105+
- **The "Long Tail" Effect**: While the percentage of adoption drops significantly as you move down there ranks, there is still usage across all ranks.
106+
107+
- **Platform Parity**: There is a very close correlation between desktop and mobile usage across all ranking groups. This confirms that Wasm is being used as a cross-platform solution rather than being restricted to desktop-only environments.
108+
109+
High-ranking sites are more likely to be complex web apps that need Wasm for performance, while lower-ranking sites (like simple blogs or small business pages) have not yet found a massive need for it—though they often use it "silently" via third-party libraries.
110+
111+
## WebAssembly requests
49112

50113
{{ figure_markup(
51114
image="number-of-wasm-requests.png",
@@ -57,7 +120,9 @@ We found 303,496 confirmed WebAssembly requests on desktop and 308,971 on mobile
57120
)
58121
}}
59122

60-
Interestingly, compared to our 2022 data, WebAssembly requests have increased drastically to 9,472% for desktop clients and 11,126% for mobile clients and WebAssembly domains increase by 8,736% and 11,189% for desktop and mobile respectively.
123+
There are over 300,000 wasm requests in our dataset, which come down to 32,197 unique wasm file requests on desktop and 29,997 on mobile. The large number of requests shows many sites are requesting multiple (hundreds in come cases!) WASM files.
124+
125+
### MIME type
61126

62127
{{ figure_markup(
63128
image="top-mime-types.png",
@@ -75,15 +140,7 @@ We observed that the MIME type `application/wasm` is used in 293,470 requests on
75140

76141
Some requests lacked a `Content-Type` header, and some had incorrect MIME types, such as `text/html` or `text/plain`. These account for 3.2% and 2.4% of requests, respectively. Compared to 2022, these percentages have dropped significantly, indicating increased awareness in setting the correct MIME type for WASM applications.
77142

78-
{{ figure_markup(
79-
image="cross-origin-webassembly-usage.png",
80-
caption="Cross-origin WebAssembly usage.",
81-
description="Bar chart showing 0.21% of WebAssembly usage on desktop, and 0.19% on mobile are cross-origin.",
82-
chart_url="https://docs.google.com/spreadsheets/d/e/2PACX-1vSXX1UpspK3gNeMVyApXrSYk42_Wmeh9RVpGarOFbs9EVbuU8wDyQh72Mu9PckmNat2wRqfP4kVAOki/pubchart?oid=1012527908&format=interactive",
83-
sql_file="cross_domain.sql",
84-
sheets_gid="TODO"
85-
)
86-
}}
143+
### Module size
87144

88145
The smallest WebAssembly modules are likely used for specific functions, such as "Micro-Utility" like _Base64 Encoder/Decoder_ or a _CRC32 Checksum_ utility—These are typically used for performance-critical calculations or polyfills where JavaScript might be too slow or lack the specific precision needed.
89146

@@ -122,33 +179,7 @@ These WebAssembly modules differ considerably in size, with the smallest being j
122179
)
123180
}}
124181

125-
## WebAssembly by rank
126-
127-
{{ figure_markup(
128-
image="webassembly-by-rank.png",
129-
caption="Page Ranking (Group) for Web Assembly 2025",
130-
description="Bar chart showing distribution of page ranking groups from 1000, 10,000, 100000, 1000000, 10000000 and all on client requests for desktop and mobile",
131-
chart_url="https://docs.google.com/spreadsheets/d/e/2PACX-1vSXX1UpspK3gNeMVyApXrSYk42_Wmeh9RVpGarOFbs9EVbuU8wDyQh72Mu9PckmNat2wRqfP4kVAOki/pubchart?oid=1476075550&format=interactive",
132-
sql_file="page_rankings.sql",
133-
sheets_gid="TODO"
134-
)
135-
}}
136-
137-
We see a clear "Power Law" in WebAssembly adoption: more popular sites are more likely it is to use Wasm.
138-
139-
### Key Insights from the Page Ranking Data
140-
141-
- **Top-Tier Dominance**: Wasm is most prevalent among the top 1,000 sites mobile. These are typically "heavy" applications like Figma, Adobe, or Google Meet that require high performance for complex tasks.
142-
143-
-- **The "Long Tail" Effect**: While the percentage of adoption drops significantly as you move down there ranks, there is still usage across all ranks.
144-
145-
- **Platform Parity**: There is a very close correlation between desktop and mobile usage across all ranking groups. This confirms that Wasm is being used as a cross-platform solution rather than being restricted to desktop-only environments.
146-
147-
High-ranking sites are more likely to be complex web apps that need Wasm for performance, while lower-ranking sites (like simple blogs or small business pages) have not yet found a massive need for it—though they often use it "silently" via third-party libraries.
148-
149-
To understand more on libraries please refer to stats of most popular libraries in the next section.
150-
151-
## What is WebAssembly being used for?
182+
## WebAssembly libraries
152183

153184
Our crawl identified a modest number of modules, it is possible to analyze and learn about the most popular libraries in requests for wasm.
154185

@@ -172,7 +203,7 @@ Let's look a bit more into the top three libraries:
172203

173204
- **Library : RXEngine (6.2%)** is a more specialized entry, often associated with high-performance execution engines used for specific industries like gaming or advanced data processing. While more niche than the top two, its 6.2% share indicates it is a popular choice for developers who need a pre-built, optimized engine to handle computationally intensive tasks (such as real-time analytics or complex UI interactions) without building the entire infrastructure from scratch.
174205

175-
## What languages are developers using?
206+
## WebAssembly languages
176207

177208
WebAssembly can use various languages and using toolchains It can be compiled in binary format to server browser and desktop applications. It can carry much of the information in the source (programming language, application structure, variable names).
178209

@@ -202,7 +233,7 @@ However 41.56% clients in desktop and 41.56% clients in mobile have language "Un
202233
)
203234
}}
204235

205-
## What features are being used?
236+
## WebAssembly features
206237

207238
The initial release of WebAssembly was considered an MVP. In common with other web standards, it is continually evolving under the governance of the World Wide Web Consortium (W3C). This year saw the announcement of the WebAssembly version 2.0, adding a number of new features. The version 3.0 shows the true vision and its potential for WebAssembly.
208239

@@ -222,22 +253,6 @@ SIMD is a new feature and isn't yet available in all browsers with WebAssembly s
222253

223254
With respect to the total extension usage in Year 2021, It is observed that total extension usage in 2025 drastically ~61 times more on desktop clients and ~80 times more on mobile based clients. To make the usage of very complex tasks, the WebAssembly, We have marked the Bulk Memory stats are increased to 8936 times higher on desktop and 25,512 times higher on mobile clients with respect to Year 2021 stats.
224255

225-
## Disclaimer
226-
227-
### Methodology & Limitations
228-
229-
- **Data Acquisition & Retrieval** Our analysis relies on the almanac-wasm tool to fetch WASM binaries using parameters from the initial HTTP Archive crawl. However, retrieval depends on third-party server availability; 404/403 errors or resource updates since the initial crawl may occur. We assume the retrieved file is identical to the one present during the original recording.
230-
231-
- **Source Language Identification** To identify source languages, we utilize the WebAssembly Binary Toolkit (`wasm2wat`) and Rust-based parsers to analyze imports, exports, and custom sections for compiler metadata and language fingerprints.
232-
233-
- **Limitations**: This is not a definitive approach. "Stripped" binaries (using tools like *wasm-strip*) or obfuscated code remove the debug info and metadata required for identification.
234-
- **Example**: Compilers like TinyGo generate unique structures and WASI imports that often diverge from standard *go_exec.js* patterns, resulting in these binaries being classified as "Unknown".
235-
236-
### Feature Detection Constraints
237-
238-
- **No Runtime Check:** WebAssembly lacks a built-in instruction for modules to detect host features from within the sandbox; detection is handled by the host environment (e.g., JavaScript or Wasmtime).
239-
- **Compile-time Dependency:** Advanced features like SIMD or Threads are enabled via compiler flags. If the host environment does not support these specific features at instantiation, the binary will fail to load.
240-
241256
## Conclusions
242257

243258
There is a significant increase in the number of webpages using this technology for serverless, containerisation, machine learning components and plug-n-play types of applications. The future of WebAssembly could be as a niche web technology, but as an entirely mainstream runtime on a wide range of other platforms. WebAssembly runtime (multi-language, lightweight, secure) are making it a popular choice for a wider range of non-browser applications for agnostic platforms.

0 commit comments

Comments
 (0)