Rewrite your app in Rust, piece by piece, checked against the original at every step. Works with TypeScript, JavaScript, Python, Go, Ruby, Java, C, PHP, C#, Kotlin, PowerShell and Swift.
Rust agent-skillsclaude-codeclicode-migrationcodexffigolangjavajavascriptmcpmigrationnapiperformanceportingpyo3pythonrewriterubyrusttypescript
//! One line of the fallbacks journal, and the strict reader that reads it.
//!
//! The same reader serves the journal the front door writes and the file `--write` stores
//! (`rust/obligations-fallbacks.jsonl`): a line it does not understand is a fault, never an
//! ignored line. All faults are listed at once, with `file:line`, and nothing is applied if
//! there is one: a badly read entry would make what blocks look absent.
//!
//! The shape is the one in `front_door_journal.rs.in`, which writes it by hand:
//!
//! ```text
//! {"v":1,"kind":"cli","args":["build","--out","d"],"status":0}
//! {"v":1,"kind":"cli","args":["fmt"],"stdin_bytes":12,"stdin_fnv":"af63dc4c8601ec8c","status":0}
//! {"v":1,"kind":"http","method":"GET","path":"/a?b=1","status":200}
//! {"v":1,"kind":"skipped","bytes":70000,"fnv":"af63dc4c8601ec8c"}
//! ```
use std::collections::BTreeMap;
use serde::de::{Deserialize, Deserializer, MapAccess, Visitor};
use serde_json::{Value, json};
use crate::front_door::AppKind;
use crate::obligations::evidence::Digest;
use crate::obligations::standing::fnv16;
/// The text the front door writes, included as is: the reader takes its bounds from it (size of
/// a line, of a journal, statuses), no value is copied.
#[allow(dead_code, unused_imports)]
pub(crate) mod writer {
include!("../../../front_door_journal.rs.in");
}
/// What identifies an entry: what the front door handed back to the original, without the status.
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
pub(crate) enum Identity {
Cli {
args: Vec<String>,
/// An argument is not UTF-8: `args` comes from `to_string_lossy` and does not say which.
lossy: bool,
stdin: Option<Digest>,
},
Http {
method: String,
/// The path and the query, as the server received them.
path: String,
body: Option<Digest>,
},
/// A fallback too long to be written (or a request without a path): only its size is known.
/// Never recorded nor explained, only a waiver covers it.
Skipped { bytes: u64, fnv: String },
/// A journal that reached its bound: the following fallbacks were not written. The identity
/// is the size read. Same fate as `Skipped`.
Truncated { bytes: u64, fnv: String },
}
/// A distinct entry of the journal, with what the original answered.
#[derive(Clone, Debug, PartialEq, Eq)]
pub(crate) struct Entry {
pub identity: Identity,
/// The code returned (CLI) or the status of the response (HTTP, absent if the original did
/// not answer).
pub status: Option<u16>,
}
impl Entry {
/// Did the original serve the entry? Exit 0, or a 2xx response. Otherwise it refused it, and
/// it says nothing about what the program must do.
pub fn served(&self) -> bool {
match (&self.identity, self.status) {
(Identity::Cli { .. }, Some(code)) => code == 0,
(Identity::Http { .. }, Some(code)) => (200..300).contains(&code),
(Identity::Skipped { .. } | Identity::Truncated { .. }, _) => false,
(_, None) => false,
}
}
/// `cli`, `http`, `skipped` or `truncated`: the kind of the line.
pub fn kind_name(&self) -> &'static str {
match self.identity {
Identity::Cli { .. } => "cli",
Identity::Http { .. } => "http",
Identity::Skipped { .. } => "skipped",
Identity::Truncated { .. } => "truncated",
}
}
/// An entry nothing is known about (too long, or after the end of a full journal).
pub fn is_unreadable(&self) -> bool {
matches!(
self.identity,
Identity::Skipped { .. } | Identity::Truncated { .. }
)
}
/// `fallback:cli#<16 hex>` or `fallback:http#<16 hex>`: the FNV-1a fingerprint of a
/// canonical form of the identity (the status is not part of it).
pub fn id(&self) -> String {
let (kind, canonical) = match &self.identity {
Identity::Cli { args, lossy, stdin } => (
"cli",
json!([
args,
lossy,
stdin.as_ref().map(|d| d.bytes),
stdin.as_ref().map(|d| d.fnv.as_str())
]),
),
Identity::Http { method, path, body } => (
"http",
json!([
method,
path,
body.as_ref().map(|d| d.bytes),
body.as_ref().map(|d| d.fnv.as_str())
]),
),
Identity::Skipped { bytes, fnv } => ("skipped", json!([bytes, fnv])),
Identity::Truncated { bytes, fnv } => ("truncated", json!([bytes, fnv])),
};
format!(
"fallback:{kind}#{}",
fnv16(canonical.to_string().as_bytes())
)
}
/// The 16 digits of the id, to name a case.
pub fn digest(&self) -> String {
self.id()
.rsplit_once('#')
.map(|(_, d)| d.to_string())
.unwrap_or_default()
}
/// A readable line: the command line or the request.
pub fn summary(&self) -> String {
match &self.identity {
Identity::Cli { args, .. } => {
let words: Vec<String> = args.iter().map(|a| shown(a)).collect();
words.join(" ")
}
Identity::Http { method, path, .. } => format!("{method} {path}"),
Identity::Skipped { bytes, fnv } => {
format!("<a fallback of {bytes} bytes (fnv {fnv}), too long to be journaled>")
}
Identity::Truncated { bytes, fnv } => {
format!("<the journal was cut after {bytes} bytes (fnv {fnv})>")
}
}
}
/// The line `--write` stores: the identity and the status only.
pub fn stored_line(&self) -> String {
let mut line = serde_json::Map::new();
line.insert("v".into(), json!(1));
match &self.identity {
Identity::Cli { args, lossy, stdin } => {
line.insert("kind".into(), json!("cli"));
line.insert("args".into(), json!(args));
if *lossy {
line.insert("lossy".into(), json!(true));
}
if let Some(d) = stdin {
line.insert("stdin_bytes".into(), json!(d.bytes));
line.insert("stdin_fnv".into(), json!(d.fnv));
}
}
Identity::Http { method, path, body } => {
line.insert("kind".into(), json!("http"));
line.insert("method".into(), json!(method));
line.insert("path".into(), json!(path));
if let Some(d) = body {
line.insert("body_bytes".into(), json!(d.bytes));
line.insert("body_fnv".into(), json!(d.fnv));
}
}
Identity::Skipped { bytes, fnv } => {
line.insert("kind".into(), json!("skipped"));
line.insert("bytes".into(), json!(bytes));
line.insert("fnv".into(), json!(fnv));
}
Identity::Truncated { bytes, fnv } => {
line.insert("kind".into(), json!("truncated"));
line.insert("bytes".into(), json!(bytes));
line.insert("fnv".into(), json!(fnv));
}
}
if let Some(status) = self.status {
line.insert("status".into(), json!(status));
}
Value::Object(line).to_string()
}
}
/// An argument shown to a person: quoted when needed so that it reads as it is.
fn shown(arg: &str) -> String {
if !arg.is_empty()
&& arg
.chars()
.all(|c| c.is_ascii_alphanumeric() || "-_./=:@%+,".contains(c))
{
arg.to_string()
} else {
format!("{arg:?}")
}
}
/// What a reading of the journal gives.
#[derive(Debug, Default)]
pub(crate) struct Read {
/// The entries, in line order, with their line number (from 1).
pub entries: Vec<(usize, Entry)>,
/// The `skipped` lines (too long to be written) and the size of the biggest.
pub skipped: usize,
pub faults: Vec<String>,
}
/// The pairs of a JSON object in order, duplicates included: `serde_json::Value` keeps the
/// last value of a key written twice, and a line that speaks twice hides an error.
struct Pairs(Vec<(String, Value)>);
impl<'de> Deserialize<'de> for Pairs {
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
struct Walk;
impl<'de> Visitor<'de> for Walk {
type Value = Pairs;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("a JSON object")
}
fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Pairs, A::Error> {
let mut pairs = Vec::new();
while let Some(pair) = map.next_entry::<String, Value>()? {
pairs.push(pair);
}
Ok(Pairs(pairs))
}
}
deserializer.deserialize_map(Walk)
}
}
/// Reads `text`, the content of the file named `label`, for an application of kind `app`. A line
/// of another kind is a fault: it was not written by this application's front door.
pub(crate) fn read(text: &str, label: &str, app: AppKind) -> Read {
read_as(text, label, app, false)
}
/// Reads the file stored by `--write`: like a journal, and it also accepts the `truncated` line
/// (a journal that reached its bound), which the front door never writes.
pub(crate) fn read_stored(text: &str, label: &str, app: AppKind) -> Read {
read_as(text, label, app, true)
}
fn read_as(text: &str, label: &str, app: AppKind, stored: bool) -> Read {
let mut out = Read::default();
for (n, line) in text.lines().enumerate() {
let n = n + 1;
if line.trim().is_empty() {
continue;
}
let mut faults: Vec<String> = Vec::new();
if line.len() > writer::MAX_LINE {
faults.push(format!(
"the line is {} bytes, longer than a front door writes",
line.len()
));
} else {
match serde_json::from_str::<Pairs>(line) {
Err(e) => faults.push(format!("not a JSON object: {e}")),
Ok(Pairs(pairs)) => match line_of(&pairs, app, stored, &mut faults) {
Some(entry) if faults.is_empty() => {
if matches!(entry.identity, Identity::Skipped { .. }) {
out.skipped += 1;
}
out.entries.push((n, entry));
}
_ => {}
},
}
}
out.faults
.extend(faults.into_iter().map(|f| format!("{label}:{n}: {f}")));
}
out
}
const COMMON: [&str; 2] = ["v", "kind"];
const CLI_KEYS: [&str; 5] = ["args", "lossy", "stdin_bytes", "stdin_fnv", "status"];
const HTTP_KEYS: [&str; 5] = ["method", "path", "body_bytes", "body_fnv", "status"];
const BYTES_KEYS: [&str; 2] = ["bytes", "fnv"];
fn line_of(
pairs: &[(String, Value)],
app: AppKind,
stored: bool,
faults: &mut Vec<String>,
) -> Option<Entry> {
let mut seen: BTreeMap<&str, &Value> = BTreeMap::new();
for (key, value) in pairs {
if seen.insert(key, value).is_some() {
faults.push(format!("the key `{key}` is written twice"));
}
}
match seen.get("v").and_then(|v| v.as_u64()) {
Some(1) => {}
Some(other) => faults.push(format!("`v` is {other}: this reader knows version 1")),
None => faults.push("`v` must be the number 1".to_string()),
}
let kind = match seen.get("kind").and_then(|k| k.as_str()) {
Some(kind @ ("cli" | "http" | "skipped")) => kind,
Some("truncated") if stored => "truncated",
Some(other) => {
faults.push(format!(
"`kind` is \"{other}\": expected cli, http or skipped"
));
return None;
}
None => {
faults.push("`kind` must be a string: cli, http or skipped".to_string());
return None;
}
};
let allowed: &[&str] = match kind {
"cli" => &CLI_KEYS,
"http" => &HTTP_KEYS,
_ => &BYTES_KEYS,
};
for (key, _) in pairs {
if !COMMON.contains(&key.as_str()) && !allowed.contains(&key.as_str()) {
faults.push(format!("unknown key `{key}` in a `{kind}` line"));
}
}
match (kind, app) {
("skipped" | "truncated", _) => {
// The size is not enough to identify: without the fingerprint of what was not
// written, a waiver would silently cover any other fallback of the same size.
let Some(Digest { bytes, fnv }) = digest(&seen, "bytes", "fnv", faults) else {
if !seen.contains_key("bytes") && !seen.contains_key("fnv") {
faults.push(format!(
"a `{kind}` line needs `bytes` and `fnv` (16 lowercase hexadecimal digits)"
));
}
return None;
};
let identity = if kind == "skipped" {
Identity::Skipped { bytes, fnv }
} else {
Identity::Truncated { bytes, fnv }
};
return Some(Entry {
identity,
status: None,
});
}
("cli", AppKind::Cli) | ("http", AppKind::Http) => {}
(kind, AppKind::Library) => {
faults.push(format!(
"a `{kind}` line in a library: a library has no front door to journal"
));
return None;
}
(kind, _) => {
let other = if kind == "cli" { "an HTTP" } else { "a CLI" };
faults.push(format!("a `{kind}` line, but this is {other} application"));
return None;
}
}
let identity = if kind == "cli" {
cli_identity(&seen, faults)
} else {
http_identity(&seen, faults)
};
let status = status_of(&seen, kind == "cli", faults);
Some(Entry {
identity: identity?,
status,
})
}
fn cli_identity(seen: &BTreeMap<&str, &Value>, faults: &mut Vec<String>) -> Option<Identity> {
let mut args = Vec::new();
match seen.get("args").and_then(|a| a.as_array()) {
None => faults.push("`args` must be an array of strings".to_string()),
Some(list) => {
for item in list {
match item.as_str() {
Some(s) => args.push(s.to_string()),
None => {
faults.push("`args` holds something that is not a string".to_string());
break;
}
}
}
}
}
let lossy = match seen.get("lossy") {
None => false,
Some(v) if v.as_bool() == Some(true) => true,
Some(_) => {
faults.push("`lossy` is written only as `true`".to_string());
false
}
};
let stdin = digest(seen, "stdin_bytes", "stdin_fnv", faults);
Some(Identity::Cli { args, lossy, stdin })
}
fn http_identity(seen: &BTreeMap<&str, &Value>, faults: &mut Vec<String>) -> Option<Identity> {
let method = match seen.get("method").and_then(|m| m.as_str()) {
Some(m) if !m.is_empty() && m.chars().all(|c| c.is_ascii_graphic()) => m.to_string(),
_ => {
faults.push("`method` must be a word without spaces".to_string());
String::new()
}
};
let path = match seen.get("path").and_then(|p| p.as_str()) {
Some(p) if p.starts_with('/') => p.to_string(),
_ => {
faults.push("`path` must be a string that starts with /".to_string());
String::new()
}
};
let body = digest(seen, "body_bytes", "body_fnv", faults);
if let Some(d) = &body
&& d.bytes == 0
{
faults.push("`body_bytes` is 0: a request without a body writes neither key".to_string());
}
Some(Identity::Http { method, path, body })
}
/// The length and fingerprint pair: both or neither, the fingerprint as 16 lowercase
/// hexadecimal digits.
fn digest(
seen: &BTreeMap<&str, &Value>,
bytes: &str,
fnv: &str,
faults: &mut Vec<String>,
) -> Option<Digest> {
match (seen.get(bytes), seen.get(fnv)) {
(None, None) => None,
(Some(b), Some(f)) => {
let b = b.as_u64();
let f = f.as_str().filter(|f| {
f.len() == 16
&& f.bytes()
.all(|c| c.is_ascii_digit() || (b'a'..=b'f').contains(&c))
});
match (b, f) {
(Some(bytes), Some(fnv)) => Some(Digest {
bytes,
fnv: fnv.to_string(),
}),
(None, _) => {
faults.push(format!("`{bytes}` must be a whole number"));
None
}
(_, None) => {
faults.push(format!("`{fnv}` must be 16 lowercase hexadecimal digits"));
None
}
}
}
_ => {
faults.push(format!(
"`{bytes}` and `{fnv}` are written together or not at all"
));
None
}
}
}
fn status_of(seen: &BTreeMap<&str, &Value>, cli: bool, faults: &mut Vec<String>) -> Option<u16> {
let Some(value) = seen.get("status") else {
if cli {
faults.push("`status` is missing".to_string());
}
return None;
};
let code = value.as_u64().and_then(|s| u16::try_from(s).ok());
match code {
Some(c) if cli && c <= u16::from(u8::MAX) => Some(c),
Some(c) if !cli && (writer::HTTP_STATUS_MIN..=writer::HTTP_STATUS_MAX).contains(&c) => {
Some(c)
}
_ => {
faults.push(if cli {
format!("`status` must be an exit code, 0 to {}", u8::MAX)
} else {
format!(
"`status` must be an HTTP status, {} to {}",
writer::HTTP_STATUS_MIN,
writer::HTTP_STATUS_MAX
)
});
None
}
}
}
/// One entry per identity, the best answer kept: an entry the original served once is served,
/// even if another time it refused it. Sorted.
pub(crate) fn merge(entries: impl IntoIterator<Item = Entry>) -> Vec<Entry> {
let mut by: BTreeMap<Identity, Entry> = BTreeMap::new();
for entry in entries {
match by.get(&entry.identity) {
None => {
by.insert(entry.identity.clone(), entry);
}
Some(kept) => {
let better = match (kept.served(), entry.served()) {
(false, true) => true,
(true, false) => false,
_ => entry.status < kept.status,
};
if better {
by.insert(entry.identity.clone(), entry);
}
}
}
}
by.into_values().collect()
}
/// The ids that two distinct identities share: the id is a 64-bit fingerprint, and two entries
/// that share it could be neither waived nor counted separately. `items` are (id, identity)
/// pairs; the same identity twice is not a collision.
pub(crate) fn id_collisions<'a>(
items: impl IntoIterator<Item = (String, &'a Identity)>,
) -> Vec<String> {
let mut seen: BTreeMap<String, &Identity> = BTreeMap::new();
let mut out = Vec::new();
for (id, identity) in items {
match seen.get(&id) {
Some(other) if *other != identity => out.push(format!(
"two different entries have the id {id}: {other:?} and {identity:?}"
)),
Some(_) => {}
None => {
seen.insert(id, identity);
}
}
}
out
}
/// The id collisions between these entries (see `id_collisions`).
pub(crate) fn collisions(entries: &[Entry], id_of: &dyn Fn(&Entry) -> String) -> Vec<String> {
id_collisions(entries.iter().map(|e| (id_of(e), &e.identity)))
}
#[cfg(test)]
mod tests {
use super::*;
fn cli(text: &str) -> Read {
read(text, "j", AppKind::Cli)
}
#[test]
fn a_good_line_of_each_kind_is_read() {
let r = cli(
"{\"v\":1,\"kind\":\"cli\",\"args\":[\"a\",\"\"],\"status\":0}\n\
{\"v\":1,\"kind\":\"cli\",\"args\":[],\"stdin_bytes\":3,\"stdin_fnv\":\"af63dc4c8601ec8c\",\"status\":2}\n\
{\"v\":1,\"kind\":\"skipped\",\"bytes\":70000,\"fnv\":\"af63dc4c8601ec8c\"}\n",
);
assert!(r.faults.is_empty(), "{:?}", r.faults);
assert_eq!(r.entries.len(), 3);
assert_eq!(r.skipped, 1);
let h = read(
"{\"v\":1,\"kind\":\"http\",\"method\":\"GET\",\"path\":\"/a?b=1\",\"status\":200}\n\
{\"v\":1,\"kind\":\"http\",\"method\":\"POST\",\"path\":\"/\",\"body_bytes\":2,\"body_fnv\":\"af63dc4c8601ec8c\"}\n",
"j",
AppKind::Http,
);
assert!(h.faults.is_empty(), "{:?}", h.faults);
assert_eq!(h.entries[1].1.status, None, "no answer: no status");
}
#[test]
fn every_fault_is_listed_with_its_file_and_line() {
let r = cli("{\"v\":2,\"kind\":\"cli\",\"args\":[],\"status\":0}\n\
not json\n\
{\"v\":1,\"kind\":\"other\"}\n\
{\"v\":1,\"kind\":\"cli\",\"args\":[1],\"status\":0,\"extra\":1}\n\
{\"v\":1,\"kind\":\"cli\",\"args\":[],\"status\":300}\n\
{\"v\":1,\"kind\":\"cli\",\"args\":[],\"stdin_bytes\":1,\"status\":0}\n\
{\"v\":1,\"kind\":\"cli\",\"args\":[],\"stdin_bytes\":1,\"stdin_fnv\":\"AF63DC4C8601EC8C\",\"status\":0}\n\
{\"v\":1,\"kind\":\"cli\",\"args\":[],\"args\":[],\"status\":0}\n\
{\"v\":1,\"kind\":\"cli\",\"args\":[],\"lossy\":false,\"status\":0}\n\
{\"v\":1,\"kind\":\"cli\",\"args\":[]}\n\
{\"v\":1,\"kind\":\"http\",\"method\":\"GET\",\"path\":\"/\"}\n\
{\"v\":1,\"kind\":\"skipped\"}\n");
assert!(r.entries.is_empty(), "nothing is read from a bad file");
let text = r.faults.join("\n");
for (line, what) in [
(1, "this reader knows version 1"),
(2, "not a JSON object"),
(3, "expected cli, http or skipped"),
(4, "`args` holds something that is not a string"),
(4, "unknown key `extra`"),
(5, "`status` must be an exit code"),
(6, "written together or not at all"),
(7, "16 lowercase hexadecimal digits"),
(8, "written twice"),
(9, "`lossy` is written only as `true`"),
(10, "`status` is missing"),
(11, "but this is a CLI application"),
(12, "a `skipped` line needs `bytes` and `fnv`"),
] {
assert!(
text.contains(&format!("j:{line}: ")) && text.contains(what),
"line {line}: {what}\n{text}"
);
}
}
#[test]
fn a_line_of_the_other_kind_is_a_fault_and_so_is_any_line_in_a_library() {
let line = "{\"v\":1,\"kind\":\"http\",\"method\":\"GET\",\"path\":\"/\"}\n";
assert!(
read(line, "j", AppKind::Cli)
.faults
.join("")
.contains("this is a CLI application")
);
assert!(
read(line, "j", AppKind::Library)
.faults
.join("")
.contains("a library has no front door")
);
let cli_line = "{\"v\":1,\"kind\":\"cli\",\"args\":[],\"status\":0}\n";
assert!(
read(cli_line, "j", AppKind::Http)
.faults
.join("")
.contains("this is an HTTP application")
);
}
#[test]
fn an_http_path_must_start_with_a_slash_and_a_body_has_a_length() {
let r = read(
"{\"v\":1,\"kind\":\"http\",\"method\":\"GET\",\"path\":\"a\"}\n\
{\"v\":1,\"kind\":\"http\",\"method\":\"G T\",\"path\":\"/\"}\n\
{\"v\":1,\"kind\":\"http\",\"method\":\"GET\",\"path\":\"/\",\"body_bytes\":0,\"body_fnv\":\"cbf29ce484222325\"}\n",
"j",
AppKind::Http,
);
let text = r.faults.join("\n");
assert!(text.contains("j:1: `path` must be a string that starts with /"));
assert!(text.contains("j:2: `method` must be a word"));
assert!(text.contains("j:3: `body_bytes` is 0"));
}
#[test]
fn an_identity_does_not_depend_on_the_status_and_a_served_answer_wins_the_merge() {
let entry = |status| Entry {
identity: Identity::Cli {
args: vec!["a".into()],
lossy: false,
stdin: None,
},
status: Some(status),
};
assert_eq!(entry(0).id(), entry(1).id());
let merged = merge([entry(2), entry(0), entry(1)]);
assert_eq!(merged.len(), 1);
assert_eq!(merged[0].status, Some(0), "served once is served");
let merged = merge([entry(3), entry(1)]);
assert_eq!(merged[0].status, Some(1), "refused every time: the least");
assert!(!merged[0].served());
}
#[test]
fn the_stored_line_reads_back_as_the_same_entry() {
let entries = [
Entry {
identity: Identity::Cli {
args: vec!["a \"q\"".into(), "\\".into(), "é\n".into()],
lossy: true,
stdin: Some(Digest {
bytes: 4,
fnv: "af63dc4c8601ec8c".into(),
}),
},
status: Some(0),
},
Entry {
identity: Identity::Http {
method: "PUT".into(),
path: "/x?y=%20".into(),
body: Some(Digest {
bytes: 9,
fnv: "cbf29ce484222325".into(),
}),
},
status: None,
},
];
for entry in entries {
let app = if entry.kind_name() == "cli" {
AppKind::Cli
} else {
AppKind::Http
};
let line = entry.stored_line();
let r = read(&line, "j", app);
assert!(r.faults.is_empty(), "{line}: {:?}", r.faults);
assert_eq!(r.entries[0].1, entry);
}
}
#[test]
fn the_id_is_the_fnv_of_a_canonical_form() {
let entry = Entry {
identity: Identity::Cli {
args: vec!["a".into()],
lossy: false,
stdin: None,
},
status: Some(0),
};
assert_eq!(
entry.id(),
format!("fallback:cli#{}", fnv16(b"[[\"a\"],false,null,null]"))
);
assert_eq!(entry.digest().len(), 16);
}
}