Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
matrix:
rust:
- stable
- 1.88.0 # MSRV
- 1.90.0 # MSRV
steps:
- name: Setup | Checkout
uses: actions/checkout@v5
Expand Down Expand Up @@ -171,6 +171,7 @@ jobs:
- initializer
- leptos
- no-rust
- node-module
- proxy
- seed
- target-path
Expand Down
51 changes: 49 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "trunk"
version = "0.21.14"
version = "0.22.0-beta.1"
edition = "2024"
description = "Build, bundle & ship your Rust WASM application to the web."
license = "MIT/Apache-2.0"
Expand All @@ -12,7 +12,7 @@ repository = "https://github.com/trunk-rs/trunk"
readme = "README.md"
categories = ["command-line-utilities", "wasm", "web-programming"]
keywords = ["wasm", "bundler", "web", "build-tool", "compiler"]
rust-version = "1.88.0"
rust-version = "1.90.0"

[profile.release]
lto = "fat"
Expand All @@ -21,6 +21,8 @@ panic = "abort"

[dependencies]
anyhow = "1"
async-compression = { version = "0.4.41", features = ["gzip", "tokio"] }
async-tar = { version = "0.6", default-features = false, features = ["runtime-tokio"] }
axum = { version = "0.8.1", features = ["ws"] }
axum-server = "0.7"
base64 = "0.22"
Expand Down Expand Up @@ -53,7 +55,7 @@ oxipng = "9"
rand = "0.9.0"
regex = "1"
remove_dir_all = "1"
reqwest = { version = "0.12", default-features = false, features = ["stream", "trust-dns"] }
reqwest = { version = "0.12", default-features = false, features = ["stream", "trust-dns", "json"] }
schemars = { version = "0.8", features = ["derive"] }
seahash = { version = "4", features = ["use_std"] }
semver = "1"
Expand All @@ -68,10 +70,12 @@ time = { version = "0.3", features = ["serde-well-known"] }
tokio = { version = "1", default-features = false, features = ["full"] }
tokio-stream = { version = "0.1", default-features = false, features = ["fs", "sync"] }
tokio-tungstenite = "0.26"
tokio-util = "0.7.18"
toml = "0.8"
tower-http = { version = "0.6.1", features = ["fs", "trace", "set-header"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
url = "2"
which = "8"
zip = "7"

Expand Down
146 changes: 146 additions & 0 deletions examples/node-module/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions examples/node-module/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[package]
name = "node-module-example"
version = "0.1.0"
authors = ["Marc-Antoine Arnaud <marc-antoine.arnaud@luminvent.com>"]
edition = "2024"

[dependencies]
console_error_panic_hook = "0.1"
wasm-bindgen = "0.2"
web-sys = { version = "0.3", features = ["Window", "Document", "HtmlElement", "Node", "Text"] }
3 changes: 3 additions & 0 deletions examples/node-module/Trunk.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[[node_packages]]
name = "@patternfly/patternfly"
version = "6.4.0"
14 changes: 14 additions & 0 deletions examples/node-module/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Npm dependency</title>

<link data-trunk rel="sass" href="target/node_modules/@patternfly/patternfly/6.4.0/patternfly.scss">
<link data-trunk rel="sass" href="target/node_modules/@patternfly/patternfly/6.4.0/patternfly-addons.scss">
<link data-trunk rel="copy-dir" href="target/node_modules/@patternfly/patternfly/6.4.0/assets" data-target-path="assets/">
</head>
<body>
</body>
</html>
34 changes: 34 additions & 0 deletions examples/node-module/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#![recursion_limit = "1024"]

use console_error_panic_hook::set_once as set_panic_hook;
use web_sys::window;

fn start_app() {
let document = window()
.and_then(|win| win.document())
.expect("could not access document");
let body = document.body().expect("could not access document.body");

let button_text_node = document.create_element("span").unwrap();
button_text_node
.set_attribute("class", "pf-v6-c-button__text")
.unwrap();
button_text_node.set_text_content(Some("Primary"));

let button_node = document.create_element("button").unwrap();
button_node
.set_attribute("class", "pf-v6-c-button pf-m-primary")
.unwrap();
button_node.set_attribute("type", "button").unwrap();
button_node
.append_child(button_text_node.as_ref())
.expect("failed to append button text");

body.append_child(button_node.as_ref())
.expect("failed to append button");
}

fn main() {
set_panic_hook();
start_app();
}
4 changes: 2 additions & 2 deletions examples/yaml-config/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading