OXYGENHUB
# 01043bfff9fd oxygenflow / crates / flow / src / main.rs
21.8 KiB · Rust · last changed Images by hash: flow rootfs push and pull, and runners fetch what they lack 24 days ago source blame history raw
1
//! `flow`: check pipelines, run them locally, and run jobs for OxygenHub
2
//! (docs/spec.md, docs/m0.md).
3
4
mod cpio;
5
/// The job-starting code `flow-init` uses in a microVM, shared with the
6
/// syscall tier.
7
#[path = "../../flow-init/src/job.rs"]
8
mod guest;
9
mod home;
10
mod images;
11
mod microvm;
12
mod outputs;
13
mod runner;
14
mod syscall;
15
mod wait;
16
mod workspace;
17
18
use anyhow::{bail, Context, Result};
19
use clap::{Parser, Subcommand};
20
use flow_core::api::Record;
21
use flow_core::{Pipeline, Runtime, PIPELINE_PATH};
22
use home::Home;
23
use std::collections::BTreeSet;
24
use std::path::{Path, PathBuf};
25
use std::time::Duration;
26
27
#[derive(Parser)]
28
#[command(name = "flow", version = env!("OXY_VERSION_LONG"), about = "OxygenFlow: hermetic pipelines for Oxygen repositories")]
29
struct Cli {
30
    /// The Flow home (default $FLOW_HOME, else ~/.local/share/flow).
31
    #[arg(long, global = true)]
32
    home: Option<PathBuf>,
33
    #[command(subcommand)]
34
    cmd: Cmd,
35
}
36
37
#[derive(Subcommand)]
38
enum RunnerCmd {
39
    /// Register this runner with a hub using a one-time token from its Admin → Runners page
40
    Register {
41
        /// The hub, e.g. https://earth.example:7343
42
        hub: String,
43
        /// The registration token (read from stdin when not given)
44
        #[arg(long)]
45
        token: Option<String>,
46
        /// The runner's name (default: the host name)
47
        #[arg(long)]
48
        name: Option<String>,
49
        /// The hub's CA certificate, when self-signed
50
        #[arg(long)]
51
        ca: Option<PathBuf>,
52
        /// A label the runner offers (repeatable)
53
        #[arg(long)]
54
        label: Vec<String>,
55
    },
56
}
57
58
#[derive(Subcommand)]
59
enum Cmd {
60
    /// Validate a pipeline and print its jobs and hash
61
    Check {
62
        /// The pipeline file (default: .flow/pipeline.kdl)
63
        file: Option<PathBuf>,
64
    },
65
    /// Print a file's BLAKE3, for pinning in flow.toml
66
    Hash { file: PathBuf },
67
    /// Rootfs images for sandboxes
68
    Rootfs {
69
        #[command(subcommand)]
70
        cmd: RootfsCmd,
71
    },
72
    /// Run the pipeline on this directory's files, locally
73
    Run {
74
        /// Only these jobs (and what they depend on)
75
        jobs: Vec<String>,
76
        /// The directory to build (default: the current one)
77
        #[arg(long, default_value = ".")]
78
        dir: PathBuf,
79
        /// Minutes before a job is stopped
80
        #[arg(long, default_value_t = 60)]
81
        timeout: u64,
82
        /// A variable for every job, as the hub's settings would give it;
83
        /// the pipeline's own `env` wins
84
        #[arg(long = "var", value_name = "NAME=VALUE")]
85
        vars: Vec<String>,
86
        /// A secret a job's `secret` block names, as the hub would supply
87
        /// it; mounted as a file, never in the environment
88
        #[arg(long = "secret", value_name = "NAME=VALUE")]
89
        secrets: Vec<String>,
90
    },
91
    /// Claim and run jobs for the hub in flow.toml's [runner] (or the
92
    /// runner.toml `flow runner register` wrote)
93
    Runner {
94
        #[command(subcommand)]
95
        cmd: Option<RunnerCmd>,
96
    },
97
    /// Follow the checks of a pushed state on OxygenHub until they finish:
98
    /// exit 0 when all passed, 1 when one failed, 2 at the time limit.
99
    /// Uses $OXY_TOKEN and $OXY_CA as oxy does.
100
    Wait {
101
        /// The repository's URL on the hub (https://hub/owner/name)
102
        url: String,
103
        /// The state hash the push moved the bookmark to (`oxy push --json` prints it)
104
        state: String,
105
        /// Minutes to wait at most
106
        #[arg(long, default_value_t = 60)]
107
        timeout: u64,
108
    },
109
    /// Show which isolation tiers this machine can run jobs in, and why
110
    /// the others cannot
111
    Tiers,
112
    /// The syscall tier's sandbox helper, started by the runner for each job
113
    #[command(name = "__sandbox", hide = true)]
114
    Sandbox { spec: PathBuf },
115
    /// Check that this machine can run the syscall tier
116
    #[command(name = "__sandbox-probe", hide = true)]
117
    SandboxProbe,
118
}
119
120
#[derive(Subcommand)]
121
enum RootfsCmd {
122
    /// Make an ext4 rootfs image from a root file system tarball and store it by hash
123
    Import {
124
        tarball: PathBuf,
125
        /// Refuse the tarball unless its SHA-256 matches (as its publisher states it)
126
        #[arg(long)]
127
        sha256: Option<String>,
128
        /// The image's own environment, NAME=value (repeatable): what a
129
        /// Dockerfile's ENV sets and `docker export` loses. Jobs start from
130
        /// it; their sandbox's and their own `env` override it
131
        #[arg(long = "env", value_name = "NAME=VALUE")]
132
        env: Vec<String>,
133
    },
134
    /// List the images this home holds
135
    List,
136
    /// Send an image to a hub, so its runners fetch it instead of having it
137
    /// copied to them: only the chunks the hub lacks travel. Uses
138
    /// $OXY_TOKEN (a token that may write repositories) and $OXY_CA
139
    Push {
140
        /// The image's hash, as pipelines pin it (cas://blob/HASH)
141
        hash: String,
142
        /// The hub (default: the runner's, from runner.toml or flow.toml)
143
        #[arg(long)]
144
        hub: Option<String>,
145
    },
146
    /// Fetch an image a hub holds into this home, as a runner does for a
147
    /// job whose image it lacks. Uses $OXY_TOKEN and $OXY_CA
148
    Pull {
149
        hash: String,
150
        #[arg(long)]
151
        hub: Option<String>,
152
    },
153
}
154
155
fn main() {
156
    let cli = Cli::parse();
157
    if let Err(e) = run(cli) {
158
        eprintln!("flow: {e:#}");
159
        std::process::exit(1);
160
    }
161
}
162
163
fn run(cli: Cli) -> Result<()> {
164
    match cli.cmd {
165
        Cmd::Sandbox { spec } => std::process::exit(syscall::sandbox_main(&spec)),
166
        Cmd::SandboxProbe => std::process::exit(syscall::probe_main()),
167
        Cmd::Check { file } => check(&file.unwrap_or_else(|| PathBuf::from(PIPELINE_PATH))),
168
        Cmd::Hash { file } => {
169
            println!("{}", home::hash_file(&file)?);
170
            Ok(())
171
        }
172
        Cmd::Rootfs { cmd } => {
173
            let home = Home::locate(cli.home.as_deref())?;
174
            match cmd {
175
                RootfsCmd::Import { tarball, sha256, env } => rootfs_import(&home, &tarball, sha256.as_deref(), &env),
176
                RootfsCmd::Push { hash, hub } => {
177
                    let client = image_client(&home, hub)?;
178
                    eprintln!("Sending image {} …", &hash[..12.min(hash.len())]);
179
                    let m = client.push(&home, &hash)?;
180
                    println!(
181
                        "Sent image {}: {} chunks the hub lacked, {} in {:.1} s",
182
                        &hash[..12],
183
                        m.chunks,
184
                        images::human(m.bytes),
185
                        m.elapsed.as_secs_f64()
186
                    );
187
                    Ok(())
188
                }
189
                RootfsCmd::Pull { hash, hub } => {
190
                    let client = image_client(&home, hub)?;
191
                    match client.fetch(&home, &hash)? {
192
                        Some(m) => {
193
                            println!(
194
                                "Fetched image {}: {} chunks, {} in {:.1} s",
195
                                &hash[..12],
196
                                m.chunks,
197
                                images::human(m.bytes),
198
                                m.elapsed.as_secs_f64()
199
                            );
200
                            Ok(())
201
                        }
202
                        None => anyhow::bail!("the hub does not hold image {}; send it with flow rootfs push", &hash[..12.min(hash.len())]),
203
                    }
204
                }
205
                RootfsCmd::List => {
206
                    for e in std::fs::read_dir(home.root.join("cas"))?.flatten() {
207
                        let size = e.metadata().map(|m| m.len()).unwrap_or(0);
208
                        if let Some(h) = e.file_name().to_string_lossy().strip_suffix(".ext4") {
209
                            println!("cas://blob/{h}  {} MiB", size >> 20);
210
                        }
211
                    }
212
                    Ok(())
213
                }
214
            }
215
        }
216
        Cmd::Run { jobs, dir, timeout, vars, secrets } => {
217
            let home = Home::locate(cli.home.as_deref())?;
218
            let pairs = |what: &str, list: &[String]| {
219
                list.iter()
220
                    .map(|e| {
221
                        e.split_once('=')
222
                            .map(|(k, v)| (k.to_string(), v.to_string()))
223
                            .ok_or_else(|| anyhow::anyhow!("--{what} {e:?}: expected NAME=VALUE"))
224
                    })
225
                    .collect::<Result<Vec<_>>>()
226
            };
227
            let (vars, secrets) = (pairs("var", &vars)?, pairs("secret", &secrets)?);
228
            run_local(&home, &dir, &jobs, Duration::from_secs(timeout * 60), &vars, &secrets)
229
        }
230
        Cmd::Runner { cmd: Some(RunnerCmd::Register { hub, token, name, ca, label }) } => {
231
            let home = Home::locate(cli.home.as_deref())?;
232
            if std::env::var_os("OXY_HOME").is_none() {
233
                std::env::set_var("OXY_HOME", home.root.join("oxy"));
234
            }
235
            let name = name.unwrap_or_else(|| {
236
                std::fs::read_to_string("/etc/hostname").map(|h| h.trim().to_string()).unwrap_or_else(|_| "flow".into())
237
            });
238
            let token = match token {
239
                Some(t) => t,
240
                None => {
241
                    eprintln!("Paste the registration token from the hub's Admin → Runners, then press Enter:");
242
                    let mut line = String::new();
243
                    std::io::stdin().read_line(&mut line)?;
244
                    line.trim().to_string()
245
                }
246
            };
247
            let got = runner::register(&home, &hub, &token, &name, ca, label)?;
248
            println!("registered as {} (runner {}); start it with `flow runner`", got.name, got.id);
249
            Ok(())
250
        }
251
        Cmd::Runner { cmd: None } => {
252
            let home = Home::locate(cli.home.as_deref())?;
253
            // The runner's oxy state (identity, user config) stays in its home.
254
            if std::env::var_os("OXY_HOME").is_none() {
255
                std::env::set_var("OXY_HOME", home.root.join("oxy"));
256
            }
257
            runner::serve(&home)
258
        }
259
        Cmd::Tiers => {
260
            let home = Home::locate(cli.home.as_deref())?;
261
            match runner::tiers(&home) {
262
                Ok((have, missing)) => {
263
                    for t in have {
264
                        println!("{t}: available");
265
                    }
266
                    for why in missing {
267
                        println!("{}", why.replacen(": ", ": unavailable: ", 1));
268
                    }
269
                }
270
                Err(why) => println!("{why}"),
271
            }
272
            Ok(())
273
        }
274
        Cmd::Wait { url, state, timeout } => {
275
            let token = std::env::var("OXY_TOKEN").ok();
276
            let ca = std::env::var_os("OXY_CA").map(PathBuf::from);
277
            let code =
278
                wait::wait(&url, &state, token.as_deref(), ca.as_deref(), Duration::from_secs(timeout * 60), Duration::from_secs(15))?;
279
            std::process::exit(code);
280
        }
281
    }
282
}
283
284
/// The hub image commands talk to: `--hub`, else the runner's; with
285
/// $OXY_TOKEN, else the runner's own token.
286
fn image_client(home: &Home, hub: Option<String>) -> Result<images::Client> {
287
    let runner = home.config.runner.clone();
288
    let hub = hub.or_else(|| runner.as_ref().map(|r| r.hub.clone())).context("name the hub with --hub https://HUB")?;
289
    let token = std::env::var("OXY_TOKEN")
290
        .ok()
291
        .or_else(|| runner.as_ref().map(|r| r.token.clone()))
292
        .context("set OXY_TOKEN to a token of yours on the hub")?;
293
    let ca = std::env::var_os("OXY_CA").map(PathBuf::from).or_else(|| runner.as_ref().and_then(|r| r.ca.clone()));
294
    images::Client::new(&hub, &token, ca.as_deref())
295
}
296
297
fn load(file: &Path) -> Result<Pipeline> {
298
    let src = std::fs::read_to_string(file).with_context(|| format!("read {}", file.display()))?;
299
    Pipeline::parse(&src).map_err(|p| anyhow::anyhow!("{} is not valid:\n{p}", file.display()))
300
}
301
302
fn check(file: &Path) -> Result<()> {
303
    let p = load(file)?;
304
    let depths = p.depths();
305
    for j in p.order() {
306
        let sb = &p.sandboxes[&j.sandbox];
307
        let after = if j.depends_on.is_empty() { String::new() } else { format!(" after {}", j.depends_on.join(", ")) };
308
        println!("{}{}  {} [{}]{after}", "  ".repeat(depths[j.name.as_str()]), j.name, j.exec.join(" "), sb.runtime.as_str());
309
    }
310
    println!("pipeline {}", hex::encode(p.hash()));
311
    Ok(())
312
}
313
314
/// The image environment file flow-init reads (`/etc/flow/env`): one
315
/// `NAME=value` per line, names checked as a pipeline's are.
316
fn image_env_file(env: &[String]) -> Result<String> {
317
    let mut out = String::new();
318
    for e in env {
319
        let Some((k, v)) = e.split_once('=') else { bail!("--env {e:?}: expected NAME=value") };
320
        let ok = !k.is_empty() && !k.starts_with(|c: char| c.is_ascii_digit()) && k.bytes().all(|b| b.is_ascii_alphanumeric() || b == b'_');
321
        if !ok || v.contains('\n') || v.contains('\0') {
322
            bail!("--env {e:?}: a name is letters, digits and _, and a value is one line");
323
        }
324
        out.push_str(&format!("{k}={v}\n"));
325
    }
326
    Ok(out)
327
}
328
329
/// The architecture an ELF file was built for, by its header.
330
fn elf_arch(path: &Path) -> Option<&'static str> {
331
    let bytes = std::fs::read(path).ok()?;
332
    if bytes.len() < 20 || &bytes[..4] != b"\x7fELF" {
333
        return None;
334
    }
335
    let little = bytes[5] == 1;
336
    let machine = if little { u16::from_le_bytes([bytes[18], bytes[19]]) } else { u16::from_be_bytes([bytes[18], bytes[19]]) };
337
    Some(match machine {
338
        0x3E => "x86_64",
339
        0xB7 => "aarch64",
340
        0xF3 => "riscv64",
341
        0x03 => "x86",
342
        0x28 => "arm",
343
        0x15 => "powerpc64",
344
        0x16 => "s390x",
345
        _ => return None,
346
    })
347
}
348
349
/// The architecture of an unpacked rootfs: its shell's, or the first
350
/// program's found under bin.
351
fn tree_arch(tree: &Path) -> Option<&'static str> {
352
    for rel in ["bin/sh", "bin/busybox", "usr/bin/env", "bin/bash", "usr/bin/sh"] {
353
        let p = tree.join(rel);
354
        let p = std::fs::canonicalize(&p).unwrap_or(p);
355
        if let Some(a) = elf_arch(&p) {
356
            return Some(a);
357
        }
358
    }
359
    None
360
}
361
362
fn rootfs_import(home: &Home, tarball: &Path, sha256: Option<&str>, env: &[String]) -> Result<()> {
363
    let env_file = image_env_file(env)?;
364
    if let Some(want) = sha256 {
365
        let out = std::process::Command::new("sha256sum").arg(tarball).output().context("run sha256sum")?;
366
        let got = String::from_utf8_lossy(&out.stdout).split_whitespace().next().unwrap_or("").to_string();
367
        if got != want.to_lowercase() {
368
            bail!("{} has SHA-256 {got}, expected {want}", tarball.display());
369
        }
370
    }
371
    let tmp = home.root.join("work").join(format!("rootfs-{}", std::process::id()));
372
    let _ = std::fs::remove_dir_all(&tmp);
373
    let tree = tmp.join("tree");
374
    std::fs::create_dir_all(&tree)?;
375
    let result = (|| -> Result<String> {
376
        let status = std::process::Command::new("tar").arg("-xf").arg(tarball).arg("-C").arg(&tree).arg("--no-same-owner").status()?;
377
        if !status.success() {
378
            bail!("tar could not unpack {}", tarball.display());
379
        }
380
        // The image's architecture must be this machine's: there is no
381
        // emulation tier (spec §11.2).
382
        let arch = tree_arch(&tree).unwrap_or("unknown");
383
        if arch != "unknown" && arch != std::env::consts::ARCH {
384
            bail!(
385
                "{} is a {arch} image; this runner is {}, and jobs here run no other architecture",
386
                tarball.display(),
387
                std::env::consts::ARCH
388
            );
389
        }
390
        // Mount points flow-init needs (docs/m0.md §2).
391
        for d in ["src", "tmp", "proc", "dev", "run"] {
392
            std::fs::create_dir_all(tree.join(d))?;
393
        }
394
        if !env_file.is_empty() {
395
            std::fs::create_dir_all(tree.join("etc/flow"))?;
396
            std::fs::write(tree.join("etc/flow/env"), &env_file)?;
397
        }
398
        let used: u64 = ignore::WalkBuilder::new(&tree)
399
            .hidden(false)
400
            .ignore(false)
401
            .git_ignore(false)
402
            .build()
403
            .flatten()
404
            .filter_map(|e| e.metadata().ok())
405
            .map(|m| m.len().max(4096))
406
            .sum();
407
        let mib = used * 13 / 10 / (1 << 20) + 64;
408
        let img = tmp.join("rootfs.ext4");
409
        let status = std::process::Command::new("mkfs.ext4")
410
            .args(["-q", "-F", "-L", "rootfs", "-E", "root_owner=0:0", "-d"])
411
            .arg(&tree)
412
            .arg(&img)
413
            .arg(format!("{mib}M"))
414
            .status()
415
            .context("run mkfs.ext4")?;
416
        if !status.success() {
417
            bail!("mkfs.ext4 failed");
418
        }
419
        let hash = home::hash_file(&img)?;
420
        std::fs::rename(&img, home.rootfs(&hash))?;
421
        let manifest = serde_json::json!({ "arch": if arch == "unknown" { std::env::consts::ARCH } else { arch }, "imported_ms": std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).map(|d| d.as_millis() as u64).unwrap_or(0) });
422
        std::fs::write(home.image_manifest(&hash), manifest.to_string())?;
423
        Ok(hash)
424
    })();
425
    let _ = std::fs::remove_dir_all(&tmp);
426
    let hash = result?;
427
    println!("rootfs \"cas://blob/{hash}\"");
428
    Ok(())
429
}
430
431
fn run_local(
432
    home: &Home,
433
    dir: &Path,
434
    only: &[String],
435
    timeout: Duration,
436
    vars: &[(String, String)],
437
    secrets: &[(String, String)],
438
) -> Result<()> {
439
    let p = load(&dir.join(PIPELINE_PATH))?;
440
    // The named jobs and everything they depend on.
441
    let mut wanted: BTreeSet<String> = only.iter().cloned().collect();
442
    for name in only {
443
        if !p.jobs.contains_key(name) {
444
            bail!("no job {name:?} in the pipeline");
445
        }
446
    }
447
    if !only.is_empty() {
448
        loop {
449
            let more: Vec<String> = wanted.iter().flat_map(|j| p.jobs[j].depends_on.clone()).filter(|d| !wanted.contains(d)).collect();
450
            if more.is_empty() {
451
                break;
452
            }
453
            wanted.extend(more);
454
        }
455
    }
456
    let scratch = home.root.join("work").join(format!("local-{}", std::process::id()));
457
    let _ = std::fs::remove_dir_all(&scratch);
458
    std::fs::create_dir_all(scratch.join("tree"))?;
459
    workspace::copy_tree(dir, &scratch.join("tree"))?;
460
    let mut failed: BTreeSet<String> = BTreeSet::new();
461
    let mut worst = 0;
462
    for job in p.order() {
463
        if !only.is_empty() && !wanted.contains(&job.name) {
464
            continue;
465
        }
466
        if let Some(d) = job.depends_on.iter().find(|d| failed.contains(*d)) {
467
            println!("── {} skipped: {d} failed", job.name);
468
            failed.insert(job.name.clone());
469
            continue;
470
        }
471
        let sb = &p.sandboxes[&job.sandbox];
472
        if sb.runtime == Runtime::Wasm {
473
            bail!("job {}: runtime {} is not available in this build yet", job.name, sb.runtime.as_str());
474
        }
475
        println!("── {} ({})", job.name, job.exec.join(" "));
476
        let js = scratch.join(&job.name);
477
        std::fs::create_dir_all(&js)?;
478
        let job = &job
479
            .in_sandbox(sb)
480
            .with_flow_env(&[("FLOW_JOB".into(), job.name.clone()), ("FLOW_RUN".into(), "local".into())])
481
            .with_flow_env(vars);
482
        // Identities come from a hub: a local run has none.
483
        for i in &job.identities {
484
            println!("── {}: identity {:?} is not available locally; {} will be missing", job.name, i.audience, i.mount_path);
485
        }
486
        // Each secret the job declares must be given, as the hub would.
487
        let inputs = job
488
            .secrets
489
            .iter()
490
            .map(|s| {
491
                let value = secrets.iter().find(|(k, _)| *k == s.name).map(|(_, v)| v.clone());
492
                value
493
                    .map(|value| flow_core::api::SecretInput { name: s.name.clone(), path: s.mount_path.clone(), value })
494
                    .ok_or_else(|| anyhow::anyhow!("job {}: secret {:?} is not given; pass --secret {}=VALUE", job.name, s.name, s.name))
495
            })
496
            .collect::<Result<Vec<_>>>()?;
497
        // Each job starts from the same files: jobs do not share writes.
498
        let out = if sb.runtime == Runtime::Syscall {
499
            workspace::copy_tree(&scratch.join("tree"), &js.join("tree"))?;
500
            let group = format!("local-{}-{}", std::process::id(), js.file_name().unwrap_or_default().to_string_lossy());
501
            syscall::run(home, sb, job, &inputs, &js.join("tree"), &js, timeout, &mut |r: Record| print_record(&r), &group)?
502
        } else {
503
            workspace::image(&scratch.join("tree"), &js.join("workspace.ext4"))?;
504
            microvm::run(home, sb, job, &inputs, &js.join("workspace.ext4"), &js, timeout, &mut |r: Record| print_record(&r))?
505
        };
506
        let _ = workspace::remove_tree(&js);
507
        match out.exit_code {
508
            Some(0) => println!("── {} passed in {} ms", job.name, out.duration_ms),
509
            other => {
510
                println!(
511
                    "── {} failed ({}) in {} ms",
512
                    job.name,
513
                    other.map(|c| format!("exit {c}")).unwrap_or_else(|| "no exit code".into()),
514
                    out.duration_ms
515
                );
516
                failed.insert(job.name.clone());
517
                worst = 1;
518
            }
519
        }
520
    }
521
    let _ = workspace::remove_tree(&scratch);
522
    if worst != 0 {
523
        std::process::exit(worst);
524
    }
525
    Ok(())
526
}
527
528
fn print_record(r: &Record) {
529
    match r.stream.as_str() {
530
        "out" => println!("   {}", r.text),
531
        "err" => eprintln!("   {}", r.text),
532
        s => eprintln!("   [{s}] {}", r.text),
533
    }
534
}
535
536
#[cfg(test)]
537
mod tests {
538
    use super::image_env_file;
539
540
    #[test]
541
    fn image_environments_are_checked_lines() {
542
        let f = image_env_file(&["PATH=/opt/bin:/usr/bin".into(), "X16EMU=/opt/x16emu".into(), "EMPTY=".into()]).unwrap();
543
        assert_eq!(f, "PATH=/opt/bin:/usr/bin\nX16EMU=/opt/x16emu\nEMPTY=\n");
544
        assert!(image_env_file(&["NOEQUALS".into()]).is_err());
545
        assert!(image_env_file(&["1X=y".into()]).is_err());
546
        assert!(image_env_file(&["X=two\nlines".into()]).is_err());
547
        assert_eq!(image_env_file(&[]).unwrap(), "");
548
    }
549
}