1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
[]
= "web_modules"
= "0.2.0"
= ["Stefan Grönke <stefan@gronke.net>"]
= "https://github.com/gronke/rust-web_modules"
= "https://github.com/gronke/rust-web_modules"
= "https://docs.rs/web_modules"
= "Pure-Rust, buildless toolchain for ES modules and Web Components"
= ["development-tools", "web-programming"]
= ["typescript", "esm", "importmap", "web_modules", "buildless"]
= "MIT"
= "2021"
# MSRV tracks oxc (the transform/minify toolchain), which raises it as it evolves.
= "1.94"
# Leading slashes anchor to the crate root — bare patterns (gitignore semantics) match at any
# depth and would pull in stray files like examples/tauri/README.md.
= ["/src/**/*.rs", "/Cargo.toml", "/README.md", "/LICENSE"]
= true
# docs.rs: document the full lean toolchain so the whole API renders. The heavy, opt-in
# `bundle`/rolldown tree stays out (it's a thin wrapper, described in prose).
[]
= ["full"]
[]
# Specialised for building web modules + simple web apps: TypeScript, SCSS and
# Tera are on by default. None of these pull in a server runtime, so a `build.rs`
# that only enables `default` stays free of axum/tokio.
= ["typescript", "scss", "tera"]
# TypeScript / modern-JS → browser JS via oxc (incl. legacy decorators for Lit).
= ["dep:oxc_allocator", "dep:oxc_parser", "dep:oxc_semantic", "dep:oxc_transformer", "dep:oxc_codegen", "dep:oxc_span"]
# SCSS → CSS via grass.
= ["dep:grass"]
# HTML templating (e.g. importmap injection) via Tera.
= ["dep:tera"]
# Production JS minification via oxc_minifier (reuses the oxc parse/codegen stack).
= ["typescript", "dep:oxc_minifier"]
# Generate favicons / app icons from a source PNG.
= ["dep:image", "dep:ico"]
# Emit TypeScript declaration files (.d.ts) via oxc_isolated_declarations.
= ["typescript", "dep:oxc_isolated_declarations"]
# Read/merge XLIFF localisation files (e.g. lit-localize interchange).
= ["dep:quick-xml"]
# Pre-compress emitted assets to `.gz` sidecars (gzip), for static serving with `Content-Encoding`.
= ["dep:flate2"]
# Axum web-server integration: a `Frontend` router factory that serves the built
# frontend from baked-in (embedded) assets, or — with `dev` — compiled on the fly.
# Embedded serving pulls no compiler, so release binaries stay lean. (Other web
# servers can be added as parallel features later.)
= ["dep:axum", "dep:tokio", "dep:mime_guess", "dep:include_dir"]
# Dev server on top of `axum`: compile TS/SCSS on the fly, watch the source tree,
# live-reload the browser.
= ["axum", "typescript", "scss", "dep:notify", "dep:tower-livereload"]
# The `web-modules` CLI binary (dev / compile / vendor / ci / npm). `npm-utils/cli` powers the
# `npm` passthrough; it stays behind this opt-in feature so the library path never pulls clap.
= ["dev", "minify", "dep:clap", "npm-utils/cli"]
# Re-export `npm-utils` as `web_modules::npm`. `npm-utils` is always compiled (the core `vendor`
# path needs it); this flag only exposes the public re-export, so consumers can reach the npm API
# (resolve / install a node_modules tree / npm ci) without taking a separate dependency.
= []
# CommonJS→ESM bundling via rolldown (the embedded, oxc-based Rust bundler): bundle an app plus its
# `node_modules/` (CommonJS and all) into one browser ESM file. Heavy and **opt-in** — the default
# toolchain stays a buildless, no-bundler ESM workflow; pull this in only when you need CJS→ESM.
# Independent of `npm`: pair with `npm` (→ `web_modules::npm`) for the install→bundle pipeline.
= ["dep:rolldown", "dep:tokio"]
# Everything in the lean toolchain. The heavy, opt-in `bundle` is intentionally NOT included, so
# `full` (and `--features full`) builds stay free of the rolldown / second-oxc tree.
= ["typescript", "scss", "tera", "minify", "icons", "dts", "i18n", "compress", "axum", "dev", "cli", "npm"]
[]
# Core — vendoring npm packages + composing import maps + a transitive `node_modules/`
# install (npm_utils::install, incl. install::from_lockfile for `web-modules ci`).
= "0.5.1"
= "1"
= "2"
= "1"
# oxc toolchain (TypeScript transform + minify). Optional; pulled by `typescript`/`minify`.
= { = "0.137", = true }
= { = "0.137", = true }
= { = "0.137", = true }
= { = "0.137", = true }
= { = "0.137", = true }
= { = "0.137", = true }
= { = "0.137", = true }
= { = "0.137", = true }
# SCSS + templating.
= { = "0.13", = true }
= { = "1", = true }
# Icons (favicon / app icons) + i18n (XLIFF).
= { = "0.25", = false, = ["png"], = true }
= { = "0.5", = true }
= { = "0.40", = true }
= { = "1", = true }
# Axum server integration (embedded serving + dev server) + CLI. Optional; off the
# build-only path.
= { = "0.8", = true }
= { = "1", = ["rt-multi-thread", "macros", "net"], = true }
= { = "0.7", = true }
= { = "8", = true }
= { = "0.10", = true }
= { = "2", = true }
= { = "4", = ["derive"], = true }
# CommonJS→ESM bundling (the `bundle` feature): the embedded, oxc-based Rust bundler. Heavy
# (pulls a second oxc + the rolldown tree), so it's optional and off by default.
= { = "1", = true }
[[]]
= "web-modules"
= "src/bin/web-modules.rs"
= ["cli"]
[]
= "3"
# Drive the axum routers in integration tests without binding a port
# (`ServiceExt::oneshot` + read the response body). Both are already in the tree via
# axum, dev-only, and not part of the published crate's dependencies.
= { = "0.5", = ["util"] }
= "0.1"
= { = "1", = ["rt", "macros"] }
[]
= ["examples/*"]
# tauri is excluded: its crate is the nested examples/tauri/src-tauri, which declares its own
# [workspace] (and pulls a heavyweight webkit2gtk tree), so it can't be a workspace member — and
# examples/tauri/ itself has no Cargo.toml for the glob to load. It has a dedicated CI job.
= ["examples/tauri"]