WEFT_OS/Cargo.toml

42 lines
1.8 KiB
TOML
Raw Normal View History

[workspace]
members = [
"crates/weft-app-shell",
"crates/weft-appd",
"crates/weft-build-meta",
"crates/weft-compositor",
"crates/weft-ipc-types",
"crates/weft-file-portal",
"crates/weft-mount-helper",
"crates/weft-pack",
"crates/weft-runtime",
"crates/weft-servo-shell",
]
exclude = [
"examples/org.weft.demo.counter",
"examples/org.weft.demo.notes",
fix(runtime): enforce effective capability grants per session Every host import was registered and callable whatever the package declared, read-only directory capabilities were preopened read-write, and appd launched packages whose capabilities it could not satisfy. The fetch import also could not be linked: the host returned a tuple where the WIT declares the response record, so any component importing weft:app/fetch failed to instantiate. One capability vocabulary now lives in weft_ipc_types::capability and is used by weft-pack, weft-appd and weft-runtime. weft-appd derives a session's grants once, before the session exists, and refuses the launch with error 403 when a capability is unknown, unsupported (hw:gpu:*) or unsatisfiable (documents without an XDG documents directory). The documents directory now comes from user-dirs.dirs instead of a guessed ~/Documents. The runtime receives grants explicitly (--grant CAP, --preopen HOST::GUEST::ro|rw), preopens read-only directories read-only, and checks the grant on every notifications, clipboard and fetch call. Fetch accepts only http and https to granted hosts, returns redirects and HTTP error statuses as responses instead of following or failing them, and bounds connect time, total time and response size. The file portal takes read-only directories with --allow-read and refuses writes there. tests/runtime/check_grants.py runs the real runtime on a probe component under each kind of grant and checks the outcome of every operation; it fails when read-only data is writable or an import ignores its grant. The appd dispatch tests that read WEFT_RUNTIME_BIN now hold the env lock shared with the tests that set it.
2026-10-09 08:08:58 +00:00
"tests/components/grants-probe",
]
resolver = "2"
[workspace.package]
version = "0.1.0"
edition = "2024"
rust-version = "1.93"
[workspace.lints.rust]
unsafe_code = "forbid"
build: select compiling Servo and Stylo fork revisions Both Servo hosts tracked the marcoallegretti/servo `servo-weft` branch, which the lockfile resolved to 8e7dc40. That revision's servo-layout does not compile (E0308 and E0716 in build_backdrop_filter). WEFT also resolved upstream Stylo dca3934, where backdrop-filter is gated behind layout.unimplemented, because the Servo fork's own [patch] for Stylo does not apply to dependents. Pin Servo by revision to f0bb1aa (8e7dc40 plus the build fix) and add a root [patch."https://github.com/servo/stylo"] selecting the marcoallegretti/stylo fork at f1ba496 for all eight Stylo crates Servo uses. Cargo.lock changes only the 66 source lines of those packages. Record both pins, their reachable branches, purpose and removal conditions in SERVO_PIN.md, and restate its limitations against executed evidence. Update the Nix outputHashes: the Stylo hash is recomputed for f1ba496 with the method that reproduces the previous dca3934 value; the Servo hash is not yet known for f0bb1aa and is left as lib.fakeHash, so Nix builds report the expected value instead of using a stale one. Validation: - cargo metadata --locked: ok; no servo/stylo sources remain in the lock - cargo check -p weft-servo-shell --features servo-embed --locked: all of Servo, including servo-layout, compiles; the remaining errors are in the shell's own embedder code - cargo fmt --check; portable workspace tests: 78 passed - Nix fetchgit could not run here (archive downloads and the sandbox's TLS to the proxy fail), so the Servo hash remains unverified
2026-10-09 00:13:08 +00:00
# Servo's own [patch] tables do not apply to dependents. The servo fork's
# backdrop-filter support needs the stylo fork that removes the property's
# `layout.unimplemented` gate, so the override lives here. Remove it once the
# change is available from upstream stylo at the revision Servo selects.
[patch."https://github.com/servo/stylo"]
selectors = { git = "https://github.com/marcoallegretti/stylo", rev = "f1ba4969536d63f2e319a561e466c03e78b4a076" }
servo_arc = { git = "https://github.com/marcoallegretti/stylo", rev = "f1ba4969536d63f2e319a561e466c03e78b4a076" }
stylo = { git = "https://github.com/marcoallegretti/stylo", rev = "f1ba4969536d63f2e319a561e466c03e78b4a076" }
stylo_atoms = { git = "https://github.com/marcoallegretti/stylo", rev = "f1ba4969536d63f2e319a561e466c03e78b4a076" }
stylo_dom = { git = "https://github.com/marcoallegretti/stylo", rev = "f1ba4969536d63f2e319a561e466c03e78b4a076" }
stylo_malloc_size_of = { git = "https://github.com/marcoallegretti/stylo", rev = "f1ba4969536d63f2e319a561e466c03e78b4a076" }
stylo_static_prefs = { git = "https://github.com/marcoallegretti/stylo", rev = "f1ba4969536d63f2e319a561e466c03e78b4a076" }
stylo_traits = { git = "https://github.com/marcoallegretti/stylo", rev = "f1ba4969536d63f2e319a561e466c03e78b4a076" }