1"use strict";(self.webpackChunkwasmcloud_com=self.webpackChunkwasmcloud_com||[]).push([["17474"],{37572:function(e,s,i){i.d(s,{Z:()=>k});var n=i(85893),r=i(67294),l=i(67026),d=i(69599),c=i(16550),t=i(32e3),a=i(4520),o=i(38341),h=i(76009);function x(e){return r.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){let{props:s}=e;return!!s&&"object"==typeof s&&"value"in s}(e))return e;throw Error(`Docusaurus error: Bad <Tabs> child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the <Tabs> component should be <TabItem>, and every <TabItem> should have a unique "value" prop.`)})?.filter(Boolean)??[]}function j(e){let{value:s,tabValues:i}=e;return i.some(e=>e.value===s)}var p=i(7227);function u(e){let{className:s,block:i,selectedValue:r,selectValue:c,tabValues:t}=e,a=[],{blockElementScrollPositionUntilNextRender:o}=(0,d.o5)(),h=e=>{let s=e.currentTarget,i=t[a.indexOf(s)].value;i!==r&&(o(s),c(i))},x=e=>{let s=null;switch(e.key){case"Enter":h(e);break;case"ArrowRight":{let i=a.indexOf(e.currentTarget)+1;s=a[i]??a[0];break}case"ArrowLeft":{let i=a.indexOf(e.currentTarget)-1;s=a[i]??a[a.length-1]}}s?.focus()};return(0,n.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":i},s),children:t.map(e=>{let{value:s,label:i,attributes:d}=e;return(0,n.jsx)("li",{role:"tab",tabIndex:r===s?0:-1,"aria-selected":r===s,ref:e=>{a.push(e)},onKeyDown:x,onClick:h,...d,className:(0,l.Z)("tabs__item","tabItem_LNqP",d?.className,{"tabs__item--active":r===s}),children:i??s},s)})})}function m(e){let{lazy:s,children:i,selectedValue:d}=e,c=(Array.isArray(i)?i:[i]).filter(Boolean);if(s){let e=c.find(e=>e.props.value===d);return e?(0,r.cloneElement)(e,{className:(0,l.Z)("margin-top--md",e.props.className)}):null}return(0,n.jsx)("div",{className:"margin-top--md",children:c.map((e,s)=>(0,r.cloneElement)(e,{key:s,hidden:e.props.value!==d}))})}function g(e){let s=function(e){let{defaultValue:s,queryString:i=!1,groupId:n}=e,l=function(e){let{values:s,children:i}=e;return(0,r.useMemo)(()=>{let e=s??x(i).map(e=>{let{props:{value:s,label:i,attributes:n,default:r}}=e;return{value:s,label:i,attributes:n,default:r}}),n=(0,o.lx)(e,(e,s)=>e.value===s.value);if(n.length>0)throw Error(`Docusaurus error: Duplicate values "${n.map(e=>e.value).join(", ")}" found in <Tabs>. Every value needs to be unique.`);return e},[s,i])}(e),[d,p]=(0,r.useState)(()=>(function(e){let{defaultValue:s,tabValues:i}=e;if(0===i.length)throw Error("Docusaurus error: the <Tabs> component requires at least one <TabItem> children component");if(s){if(!j({value:s,tabValues:i}))throw Error(`Docusaurus error: The <Tabs> has a defaultValue "${s}" but none of its children has the corresponding value. Available values are: ${i.map(e=>e.value).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return s}let n=i.find(e=>e.default)??i[0];if(!n)throw Error("Unexpected error: 0 tabValues");return n.value})({defaultValue:s,tabValues:l})),[u,m]=function(e){let{queryString:s=!1,groupId:i}=e,n=(0,c.k6)(),l=function(e){let{queryString:s=!1,groupId:i}=e;if("string"==typeof s)return s;if(!1===s)return null;if(!0===s&&!i)throw Error('Docusaurus error: The <Tabs> component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return i??null}({queryString:s,groupId:i});return[(0,a._X)(l),(0,r.useCallback)(e=>{if(!l)return;let s=new URLSearchParams(n.location.search);s.set(l,e),n.replace({...n.location,search:s.toString()})},[l,n])]}({queryString:i,groupId:n}),[g,f]=function(e){let{groupId:s}=e,i=s?`docusaurus.tab.${s}`:null,[n,l]=(0,h.Nk)(i);return[n,(0,r.useCallback)(e=>{i&&l.set(e)},[i,l])]}({groupId:n}),k=(()=>{let e=u??g;return j({value:e,tabValues:l})?e:null})();return(0,t.Z)(()=>{k&&p(k)},[k]),{selectedValue:d,selectValue:(0,r.useCallback)(e=>{if(!j({value:e,tabValues:l}))throw Error(`Can't select invalid tab value=${e}`);p(e),m(e),f(e)},[m,f,l]),tabValues:l}}(e);return(0,n.jsxs)("div",{className:(0,l.Z)("tabs-container","tabList__CuJ"),children:[(0,n.jsx)(u,{...s,...e}),(0,n.jsx)(m,{...s,...e})]})}function f(e){let s=(0,p.Z)();return(0,n.jsx)(g,{...e,children:x(e.children)},String(s))}function k(e){let s=(0,c.TH)(),[i,l]=r.useState();return(r.useEffect(()=>
1{if("os"===e.groupId&&!new URLSearchParams(s.search).has("os")){let e=function(){if("undefined"==typeof navigator)return;let e=navigator.userAgent;if(/windows|win32|win64/i.test(e))return"windows"}();e&&l(e)}},[e.groupId,s.search]),i)?(0,n.jsx)(f,{...e,defaultValue:i}):(0,n.jsx)(f,{...e})}},45677:function(e,s,i){i.r(s),i.d(s,{frontMatter:()=>t,default:()=>j,contentTitle:()=>a,assets:()=>o,toc:()=>h,metadata:()=>n});var n=JSON.parse('{"id":"wash/config","title":"wash Configuration \u2014 User and Project Settings","description":"Configure the wash CLI for wasmCloud \u2014 user settings, project config files, and available options in YAML, JSON, or TOML for WebAssembly workflows.","source":"@site/docs/wash/config.mdx","sourceDirName":"wash","slug":"/wash/config","permalink":"/docs/wash/config","draft":false,"unlisted":false,"editUrl":"https://github.com/wasmCloud/wasmcloud.com/edit/main/docs/wash/config.mdx","tags":[],"version":"current","lastUpdatedBy":"Eric Gregory","lastUpdatedAt":1790194298000,"sidebarPosition":4,"frontMatter":{"title":"wash Configuration \u2014 User and Project Settings","hide_title":true,"sidebar_label":"Configuration","sidebar_position":4,"description":"Configure the wash CLI for wasmCloud \u2014 user settings, project config files, and available options in YAML, JSON, or TOML for WebAssembly workflows.","proficiency":"Intermediate","about":"wash","mentions":["wasmCloud","NATS","WebAssembly"],"platforms":["wasmCloud","wash"]},"sidebar":"tutorialSidebar","previous":{"title":"Commands","permalink":"/docs/wash/commands"},"next":{"title":"Registries","permalink":"/docs/wash/registries"}}'),r=i(85893),l=i(50065),d=i(37572),c=i(5525);let t={title:"wash Configuration \u2014 User and Project Settings",hide_title:!0,sidebar_label:"Configuration",sidebar_position:4,description:"Configure the wash CLI for wasmCloud \u2014 user settings, project config files, and available options in YAML, JSON, or TOML for WebAssembly workflows.",proficiency:"Intermediate",about:"wash",mentions:["wasmCloud","NATS","WebAssembly"],platforms:["wasmCloud","wash"]},a="Wasm Shell Configuration",o={},h=[{value:"Configuration hierarchy",id:"configuration-hierarchy",level:2},{value:"Managing the config file",id:"managing-the-config-file",level:2},{value:"Creating a new config",id:"creating-a-new-config",level:3},{value:"Validating a config",id:"validating-a-config",level:3},{value:"Cleaning up cache and data directories",id:"cleaning-up-cache-and-data-directories",level:3},{value:"User configuration",id:"user-configuration",level:2},{value:"Project configuration",id:"project-configuration",level:2},{value:"<code>version</code> configuration",id:"version-configuration",level:3},{value:"<code>build</code> configuration",id:"build-configuration",level:3},{value:"<code>build</code> options",id:"build-options",level:4},{value:"<code>build</code> examples",id:"build-examples",level:4},{value:"<code>dev</code> configuration",id:"dev-configuration",level:3},{value:"<code>dev</code> options",id:"dev-options",level:4},{value:"<code>dev.components[]</code>",id:"devcomponents",level:5},{value:"<code>dev.volumes[]</code>",id:"devvolumes",level:5},{value:"<code>dev</code> example",id:"dev-example",level:4},{value:"<code>wit</code> configuration",id:"wit-configuration",level:3},{value:"<code>wit</code> options",id:"wit-options",level:4},{value:"<code>wit.registries[]</code>",id:"witregistries",level:4},{value:"<code>wit</code> example",id:"wit-example",level:4}];function x(e){let s={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",span:"span",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,l.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.header,{children:(0,r.jsx)(s.h1,{id:"wasm-shell-configuration",children:"Wasm Shell Configuration"})}),"\n",(0,r.jsxs)(s.p,{children:["This document describes the configuration options available for the ",(0,r.jsx)(s.code,{children:"wash"})," CLI. Configuration can be specified in YAML, JSON, or TOML format (",(0,r.jsx)(s.code,{children:".json"}),", ",(0,r.jsx)(s.code,{children:".yaml"}),", ",(0,r.jsx)(s.code,{children:".yml"}),", or ",(0,r.jsx)(s.code,{children:".toml"}),")."]}),"\n",(0,r.jsx)(s.p,{children:"Wasm Shell uses two configuration files:"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.a,{href:"#user-configuration",children:(0,r.jsx)(s.strong,{children:"User configuration"})})," that is local to the machine"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.a,{href:"#project-configuration",children:(0,r.jsx)(s.strong,{children:"Project configuration"})})," in the ",(0,r.jsx)(s.code,{children:".wash"})," directory at the root of each project"]}),"\n"]}),"\n",(0,r.jsx)(s.h2,{id:"configuration-hierarchy",children:"Configuration hierarchy"}),"\n",(0,r.jsx)(s.p,{children:"Configuration is merged with the following precedence (highest to lowest):"}),"\n",(0,r.jsxs)(s.ol,{children:["\n",(0,r.jsx)(s.li,{children:"CLI arguments"}),"\n",(0,r.jsxs)(s.li,{children:["Environment variables (",(0,r.jsx)(s.code,{children:"WASH_ prefix"}),")"]}),"\n",(0,r.jsxs)(s.li,{children:["Project config (",(0,r.jsx)(s.code,{children:".wash/config.yaml"}),")"]}),"\n",(0,r.jsxs)(s.li,{children:["User config (",(0,r.jsx)(s.code,{children:"$HOME/.config/wash/config.yaml"}),")"]}),"\n",(0,r.jsx)(s.li,{children:"Default values"}),"\n"]}),"\n",(0,r.jsx)(s.h2,{id:"managing-the-config-file",children:"Managing the config file"}),"\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.code,{children:"wash"})," ships three subcommands for managing the project-local config file in ",(0,r.jsx)(s.code,{children:".wash/"}),". Together they cover the typical lifecycle: scaffold a working file, check it before you run anything against it, and clean up stale state when something goes wrong."]}),"\n",(0,r.jsx)(s.h3,{id:"creating-a-new-config",children:"Creating a new config"}),"\n",(0,r.jsxs)(s.p,{children:["Use ",(0,r.jsx)(s.code,{children:"wash config init"})," to create a starter file. The ",(0,r.jsx)(s.code,{children:"--example"})," flag populates every section with illustrative values, which is the fastest way to see what ",(0,r.jsx)(s.code,{children:"wash"})," accepts:"]}),"\n",(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(s.pre,{className:"shiki shiki-themes g
1ithub-light github-dark",style:{backgroundColor:"#fff","--shiki-dark-bg":"#24292e",color:"#24292e","--shiki-dark":"#e1e4e8"},tabIndex:"0",children:(0,r.jsx)(s.code,{className:"language-shell",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"#6F42C1","--shiki-dark":"#B392F0"},children:"wash"}),(0,r.jsx)(s.span,{style:{color:"#032F62","--shiki-dark":"#9ECBFF"},children:" config"}),(0,r.jsx)(s.span,{style:{color:"#032F62","--shiki-dark":"#9ECBFF"},children:" init"}),(0,r.jsx)(s.span,{style:{color:"#005CC5","--shiki-dark":"#79B8FF"},children:" --example"})]})})})}),"\n",(0,r.jsxs)(s.p,{children:["The ",(0,r.jsx)(s.code,{children:"--format"})," flag selects the serialization format. ",(0,r.jsx)(s.code,{children:"yaml"})," is the default; ",(0,r.jsx)(s.code,{children:"yml"}),", ",(0,r.jsx)(s.code,{children:"json"}),", and ",(0,r.jsx)(s.code,{children:"toml"})," are also supported:"]}),"\n",(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(s.pre,{className:"shiki shiki-themes github-light github-dark",style:{backgroundColor:"#fff","--shiki-dark-bg":"#24292e",color:"#24292e","--shiki-dark":"#e1e4e8"},tabIndex:"0",children:(0,r.jsx)(s.code,{className:"language-shell",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"#6F42C1","--shiki-dark":"#B392F0"},children:"wash"}),(0,r.jsx)(s.span,{style:{color:"#032F62","--shiki-dark":"#9ECBFF"},children:" config"}),(0,r.jsx)(s.span,{style:{color:"#032F62","--shiki-dark":"#9ECBFF"},children:" init"}),(0,r.jsx)(s.span,{style:{color:"#005CC5","--shiki-dark":"#79B8FF"},children:" --format"}),(0,r.jsx)(s.span,{style:{color:"#032F62","--shiki-dark":"#9ECBFF"},children:" toml"}),(0,r.jsx)(s.span,{style:{color:"#005CC5","--shiki-dark":"#79B8FF"},children:" --example"})]})})})}),"\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.code,{children:"init"})," always writes to the project-local ",(0,r.jsx)(s.code,{children:".wash/"})," directory. The legacy ",(0,r.jsx)(s.code,{children:"--global"})," flag is deprecated and has no effect."]}),"\n",(0,r.jsx)(s.h3,{id:"validating-a-config",children:"Validating a config"}),"\n",(0,r.jsxs)(s.p,{children:["Run ",(0,r.jsx)(s.code,{children:"wash config validate"})," to catch hard errors in the merged project configuration before they show up at runtime:"]}),"\n",(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(s.pre,{className:"shiki shiki-themes github-light github-dark",style:{backgroundColor:"#fff","--shiki-dark-bg":"#24292e",color:"#24292e","--shiki-dark":"#e1e4e8"},tabIndex:"0",children:(0,r.jsx)(s.code,{className:"language-shell",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"#6F42C1","--shiki-dark":"#B392F0"},children:"wash"}),(0,r.jsx)(s.span,{style:{color:"#032F62","--shiki-dark":"#9ECBFF"},children:" config"}),(0,r.jsx)(s.span,{style:{color:"#032F62","--shiki-dark":"#9ECBFF"},children:" validate"})]})})})}),"\n",(0,r.jsxs)(s.p,{children:["Validation covers socket-address syntax, ",(0,r.jsx)(s.code,{children:"redis://"})," / ",(0,r.jsx)(s.code,{children:"nats://"})," / ",(0,r.jsx)(s.code,{children:"postgres://"})," URL schemes, paired TLS cert and key files, WebGPU availability on Windows, non-empty build commands, well-formed WIT registry URLs, and local WIT source paths that actually exist on disk. Remote sources (HTTP, Git, OCI) are skipped \u2014 ",(0,r.jsx)(s.code,{children:"validate"})," doesn't reach out to the network. Errors are collected across every section before the command returns, so every issue surfaces in one pass."]}),"\n",(0,r.jsxs)(s.p,{children:["To validate a specific file instead of the merged project config (useful when working with multiple variants), pass ",(0,r.jsx)(s.code,{children:"--file"}),":"]}),"\n",(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(s.pre,{className:"shiki shiki-themes github-light github-dark",style:{backgroundColor:"#fff","--shiki-dark-bg":"#24292e",color:"#24292e","--shiki-dark":"#e1e4e8"},tabIndex:"0",children:(0,r.jsx)(s.code,{className:"language-shell",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"#6F42C1","--shiki-dark":"#B392F0"},children:"wash"}),(0,r.jsx)(s.span,{style:{color:"#032F62","--shiki-dark":"#9ECBFF"},children:" config"}),(0,r.jsx)(s.span,{style:{color:"#032F62","--shiki-dark":"#9ECBFF"},children:" validate"}),(0,r.jsx)(s.span,{style:{color:"#005CC5","--shiki-dark":"#79B8FF"},children:" --file"}),(0,r.jsx)(s.span,{style:{color:"#032F62","--shiki-dark":"#9ECBFF"},children:" ./alternate-config.yaml"})]})})})}),"\n",(0,r.jsx)(s.h3,{id:"cleaning-up-cache-and-data-directories",children:"Cleaning up cache and data directories"}),"\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.code,{children:"wash config cleanup"})," removes the wash cache and/or data directories. Use it to reclaim disk space or to recover from a corrupted cache. Always preview with ",(0,r.jsx)(s.code,{children:"--dry-run"})," first to see what would be removed and how much space it would free:"]}),"\n",(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(s.pre,{className:"shiki shiki-themes g
1ithub-light github-dark",style:{backgroundColor:"#fff","--shiki-dark-bg":"#24292e",color:"#24292e","--shiki-dark":"#e1e4e8"},tabIndex:"0",children:(0,r.jsxs)(s.code,{className:"language-shell",children:[(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"#6A737D","--shiki-dark":"#6A737D"},children:"# Preview"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"#6F42C1","--shiki-dark":"#B392F0"},children:"wash"}),(0,r.jsx)(s.span,{style:{color:"#032F62","--shiki-dark":"#9ECBFF"},children:" config"}),(0,r.jsx)(s.span,{style:{color:"#032F62","--shiki-dark":"#9ECBFF"},children:" cleanup"}),(0,r.jsx)(s.span,{style:{color:"#005CC5","--shiki-dark":"#79B8FF"},children:" --all"}),(0,r.jsx)(s.span,{style:{color:"#005CC5","--shiki-dark":"#79B8FF"},children:" --dry-run"})]}),"\n",(0,r.jsx)(s.span,{className:"line"}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"#6A737D","--shiki-dark":"#6A737D"},children:"# Apply"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"#6F42C1","--shiki-dark":"#B392F0"},children:"wash"}),(0,r.jsx)(s.span,{style:{color:"#032F62","--shiki-dark":"#9ECBFF"},children:" config"}),(0,r.jsx)(s.span,{style:{color:"#032F62","--shiki-dark":"#9ECBFF"},children:" cleanup"}),(0,r.jsx)(s.span,{style:{color:"#005CC5","--shiki-dark":"#79B8FF"},children:" --all"})]})]})})}),"\n",(0,r.jsxs)(s.p,{children:["Use ",(0,r.jsx)(s.code,{children:"--cache"})," or ",(0,r.jsx)(s.code,{children:"--data"})," instead of ",(0,r.jsx)(s.code,{children:"--all"})," to target a single directory."]}),"\n",(0,r.jsx)(s.h2,{id:"user-configuration",children:"User configuration"}),"\n",(0,r.jsxs)(s.p,{children:["By default, user configuration files are found at ",(0,r.jsx)(s.code,{children:"$HOME/.config/wash/config.yaml"}),"."]}),"\n",(0,r.jsx)(s.admonition,{title:"Under construction",type:"warning",children:(0,r.jsx)(s.p,{children:"This section is under active development\u2014please check back soon for a more complete reference."})}),"\n",(0,r.jsx)(s.h2,{id:"project-configuration",children:"Project configuration"}),"\n",(0,r.jsxs)(s.p,{children:["Projects can be configured via a project config file that resides in the ",(0,r.jsx)(s.code,{children:".wash"})," directory at the project root, and which may be expressed in JSON, YAML, or TOML format."]}),"\n",(0,r.jsx)(s.p,{children:"Top-level project configuration options include:"}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Option"}),(0,r.jsx)(s.th,{children:"Type"}),(0,r.jsx)(s.th,{children:"Description"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"version"})}),(0,r.jsx)(s.td,{children:"string"}),(0,r.jsx)(s.td,{children:"Configuration schema version"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"build"})}),(0,r.jsx)(s.td,{children:"object"}),(0,r.jsx)(s.td,{children:"Build configuration options"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"dev"})}),(0,r.jsx)(s.td,{children:"object"}),(0,r.jsx)(s.td,{children:"Development server configuration options"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"wit"})}),(0,r.jsx)(s.td,{children:"object"}),(0,r.jsx)(s.td,{children:"WIT dependency management configuration"})]})]})]}),"\n",(0,r.jsxs)(s.h3,{id:"version-configuration",children:[(0,r.jsx)(s.code,{children:"version"})," configuration"]}),"\n",(0,r.jsxs)(s.p,{children:["Specify the ",(0,r.jsx)(s.code,{children:"wash"})," version for this project."]}),"\n",(0,r.jsx)(s.p,{children:"Example:"}),"\n",(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(s.pre,{className:"shiki shiki-themes github-light github-dark",style:{backgroundColor:"#fff","--shiki-dark-bg":"#24292e",color:"#24292e","--shiki-dark":"#e1e4e8"},tabIndex:"0",children:(0,r.jsx)(s.code,{className:"language-yaml",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"#22863A","--shiki-dark":"#85E89D"},children:"version"}),(0,r.jsx)(s.span,{style:{color:"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,r.jsx)(s.span,{style:{color:"#005CC5","--shiki-dark":"#79B8FF"},children:"2.3.0"})]})})})}),"\n",(0,r.jsxs)(s.h3,{id:"build-configuration",children:[(0,r.jsx)(s.code,{children:"build"})," configuration"]}),"\n",(0,r.jsxs)(s.p,{children:["Wasm Shell builds WebAssembly component binaries by wrapping language-specific utilities like ",(0,r.jsx)(s.code,{children:"cargo"}),", ",(0,r.jsx)(s.code,{children:"go"}),", ",(0,r.jsx)(s.code,{children:"npm"}),", etc, and project configuration files are used to define configuration for builds."]}),"\n",(0,r.jsx)(s.p,{children:"Wasm Shell executes the build command for your language toolchain specified in your project configuration file."}),"\n",(0,r.jsxs)(s.h4,{id:"build-options",children:[(0,r.jsx)(s.code,{children:"build"})," options"]}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Option"}),(0,r.jsx)(s.th,{children:"Type"}),(0,r.jsx)(s.th,{children:"Default"}),(0,r.jsx)(s.th,{children:"Description"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"command"})}),(0,r.jsx)(s.td,{children:"string"}),(0,r.jsx)(s.td,{children:"-"}),(0,r.jsx)(s.td,{children:"Build command to execute"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"env"})}),(0,r.jsx)(s.td,{children:"map"}),(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"{}"})}),(0,r.jsx)(s.td,{children:"Environment variables to set during the build process"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"component_path"})}),(0,r.jsx)(s.td,{children:"string"}),(0,r.jsx)(s.td,{children:"-"}),(0,r.jsx)(s.td,{children:"Path to the output Wasm component file"})]})]})]}),"\n",(0,r.jsxs)(s.h4,{id:"build-examples",children:[(0,r.jsx)(s.code,{children:"build"})," examples"]}),"\n",(0,r.jsxs)(d.Z,{groupId:"lang",queryString:!0,children:[(0,r.jsx)(c.Z,{value:"rust",label:"Rust",default:!0,children:(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(s.pre,{className:"shiki shiki-themes g
1ithub-light github-dark",style:{backgroundColor:"#fff","--shiki-dark-bg":"#24292e",color:"#24292e","--shiki-dark":"#e1e4e8"},tabIndex:"0",children:(0,r.jsxs)(s.code,{className:"language-yaml",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"#22863A","--shiki-dark":"#85E89D"},children:"build"}),(0,r.jsx)(s.span,{style:{color:"#24292E","--shiki-dark":"#E1E4E8"},children:":"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"#22863A","--shiki-dark":"#85E89D"},children:" command"}),(0,r.jsx)(s.span,{style:{color:"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,r.jsx)(s.span,{style:{color:"#032F62","--shiki-dark":"#9ECBFF"},children:"cargo build --target wasm32-wasip2 --release"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"#22863A","--shiki-dark":"#85E89D"},children:" component_path"}),(0,r.jsx)(s.span,{style:{color:"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,r.jsx)(s.span,{style:{color:"#032F62","--shiki-dark":"#9ECBFF"},children:"target/wasm32-wasip2/release/project_name.wasm"})]})]})})})}),(0,r.jsx)(c.Z,{value:"tinygo",label:"TinyGo",children:(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(s.pre,{className:"shiki shiki-themes github-light github-dark",style:{backgroundColor:"#fff","--shiki-dark-bg":"#24292e",color:"#24292e","--shiki-dark":"#e1e4e8"},tabIndex:"0",children:(0,r.jsxs)(s.code,{className:"language-yaml",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"#22863A","--shiki-dark":"#85E89D"},children:"build"}),(0,r.jsx)(s.span,{style:{color:"#24292E","--shiki-dark":"#E1E4E8"},children:":"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"#22863A","--shiki-dark":"#85E89D"},children:" command"}),(0,r.jsx)(s.span,{style:{color:"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,r.jsx)(s.span,{style:{color:"#032F62","--shiki-dark":"#9ECBFF"},children:"go generate ./... && tinygo build -target wasip2 -wit-package ./wit -wit-world example -o build/output.wasm ./"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"#22863A","--shiki-dark":"#85E89D"},children:" component_path"}),(0,r.jsx)(s.span,{style:{color:"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,r.jsx)(s.span,{style:{color:"#032F62","--shiki-dark":"#9ECBFF"},children:"build/output.wasm"})]})]})})})}),(0,r.jsxs)(c.Z,{value:"typescript",label:"TypeScript",children:[(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(s.pre,{className:"shiki shiki-themes github-light github-dark",style:{backgroundColor:"#fff","--shiki-dark-bg":"#24292e",color:"#24292e","--shiki-dark":"#e1e4e8"},tabIndex:"0",children:(0,r.jsxs)(s.code,{className:"language-yaml",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"#22863A","--shiki-dark":"#85E89D"},children:"build"}),(0,r.jsx)(s.span,{style:{color:"#24292E","--shiki-dark":"#E1E4E8"},children:":"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"#22863A","--shiki-dark":"#85E89D"},children:" command"}),(0,r.jsx)(s.span,{style:{color:"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,r.jsx)(s.span,{style:{color:"#032F62","--shiki-dark":"#9ECBFF"},children:"npm run install-and-build"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"#22863A","--shiki-dark":"#85E89D"},children:" component_path"}),(0,r.jsx)(s.span,{style:{color:"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,r.jsx)(s.span,{style:{color:"#032F62","--shiki-dark":"#9ECBFF"},children:"dist/output.wasm"})]})]})})}),(0,r.jsxs)(s.p,{children:["This build command will execute the ",(0,r.jsx)(s.code,{children:"install-and-build"})," script defined in your TypeScript project's ",(0,r.jsx)(s.code,{children:"package.json"})," file. Make sure the value for ",(0,r.jsx)(s.code,{children:"component_path"})," matches the path defined in your build script."]})]})]}),"\n",(0,r.jsxs)(s.h3,{id:"dev-configuration",children:[(0,r.jsx)(s.code,{children:"dev"})," configuration"]}),"\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.code,{children:"wash dev"})," builds a component according to the specified build options (unless otherwise specified in the ",(0,r.jsx)(s.code,{children:"dev"})," options) and then starts a local development server. There are a variety of options available for local development."]}),"\n",(0,r.jsxs)(s.h4,{id:"dev-options",children:[(0,r.jsx)(s.code,{children:"dev"})," options"]}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Option"}),(0,r.jsx)(s.th,{children:"Type"}),(0,r.jsx)(s.th,{children:"Default"}),(0,r.jsx)(s.th,{children:"Description"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"command"})}),(0,r.jsx)(s.td,{children:"string"}),(0,r.jsx)(s.td,{children:"-"}),(0,r.jsx)(s.td,{children:"Custom command to run for building during development"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"address"})}),(0,r.jsx)(s.td,{children:"string"}),(0,r.jsx)(s.td,{children:"-"}),(0,r.jsx)(s.td,{children:"Address for the development server to listen on"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"service"})}),(0,r.jsx)(s.td,{children:"boolean"}),(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"false"})}),(0,r.jsx)(s.td,{children:"Whether to run as a long-running service with port binding"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"service_file"})}),(0,r.jsx)(s.td,{children:"string"}),(0,r.jsx)(s.td,{children:"-"}),(0,r.jsx)(s.td,{children:"Path to a service definition file"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"components"})}),(0,r.jsx)(s.td,{children:"array"}),(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"[]"})}),(0,r.jsx)(s.td,{children:"Additional components to load during development"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"volumes"})}),(0,r.jsx)(s.td,{children:"array"}),(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"[]"})}),(0,r.jsx)(s.td,{children:"Volumes to mount from host to guest"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"host_interfaces"})}),(0,r.jsx)(s.td,{children:"array"}),(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"[]"})}),(0,r.jsx)(s.td,{children:"WIT interfaces to expose from the host"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"plugins"})}),(0,r.jsx)(s.td,{children:"array"}),(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"[]"})}),(0,r.jsxs)(s.td,{children:["Host plugin declarations: ",(0,r.jsx)(s.code,{children:"id"})," plus an ",(0,r.jsx)(s.code,{children:"image"}),"/",(0,r.jsx)(s.code,{children:"file"})," source for component plugins, with ",(0,r.jsx)(s.code,{children:"config"}),"/",(0,r.jsx)(s.code,{children:"configFrom"}),"/",(0,r.jsx)(s.code,{children:"secretFrom"}),", ",(0,r.jsx)(s.code,{children:"bindings"}),", and ",(0,r.jsx)(s.code,{children:"workloadConfig"}),", which defaults to ",(0,r.jsx)(s.code,{children:"allow"})," in dev (since 2.9.0; ",(0,r.jsx)(s.code,{children:"host_plugins"})," is a deprecated alias). See ",(0,r.jsx)(s.a,{href:"/docs/runtime/creating-host-component-plugins#wash-dev",children:"Creating host component plugins"}),"."]})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"tls_cert_path"})}),(0,r.jsx)(s.td,{children:"string"}),(0,r.jsx)(s.td,{children:"-"}),(0,r.jsx)(s.td,{children:"Path to TLS certificate file for HTTPS"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"tls_key_path"})}),(0,r.jsx)(s.td,{children:"string"}),(0,r.jsx)(s.td,{children:"-"}),(0,r.jsx)(s.td,{children:"Path to TLS private key file for HTTPS"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"tls_ca_path"})}),(0,r.jsx)(s.td,{children:"string"}),(0,r.jsx)(s.td,{children:"-"}),(0,r.jsx)(s.td,{children:"Path to TLS CA certificate file"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"wasi_webgpu"})}),(0,r.jsx)(s.td,{children:"boolean"}),(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"false"})}),(0,r.jsx)(s.td,{children:"Enable WASI WebGPU support"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"wasi_keyvalue_redis_url"})}),(0,r.jsx)(s.td,{children:"string"}),(0,r.jsx)(s.td,{children:"-"}),(0,r.jsx)(s.td,{children:"Redis URL for the keyvalue plugin. Takes precedence over the other keyvalue settings"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"wasi_keyvalue_nats_url"})}),(0,r.jsx)(s.td,{children:"string"}),(0,r.jsx)(s.td,{children:"-"}),(0,r.jsxs)(s.td,{children:["NATS URL for the keyvalue plugin. Overrides ",(0,r.jsx)(s.code,{children:"data_nats_url"})," for keyvalue only"]})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"wasi_keyvalue_path"})}),(0,r.jsx)(s.td,{children:"string"}),(0,r.jsx)(s.td,{children:"-"}),(0,r.jsx)(s.td,{children:"Path for WASI key-value store data"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"wasi_blobstore_path"})}),(0,r.jsx)(s.td,{children:"string"}),(0,r.jsx)(s.td,{children:"-"}),(0,r.jsx)(s.td,{children:"Path for WASI blob store data"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"data_nats_url"})}),(0,r.jsx)(s.td,{children:"string"}),(0,r.jsx)(s.td,{children:"-"}),(0,r.jsxs)(s.td,{children:["Unified NATS URL for the blobstore, keyvalue, and messaging plugins (since 2.4.0), mirroring ",(0,r.jsx)(s.code,{children:"wash host --data-nats-url"}),". Per-plugin settings (",(0,r.jsx)(s.code,{children:"wasi_keyvalue_redis_url"}),", ",(0,r.jsx)(s.code,{children:"wasi_keyvalue_nats_url"}),", ",(0,r.jsx)(s.code,{children:"wasi_keyvalue_path"}),", ",(0,r.jsx)(s.code,{children:"wasi_blobstore_path"}),") take precedence over it; messaging has no per-plugin override."]})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"wasm_proposals"})}),(0,r.jsx)(s.td,{children:"array"}),(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"[]"})}),(0,r.jsxs)(s.td,{children:["Top-level Wasm proposals to enable on the engine (since 2.5.0). Recognized values: ",(0,r.jsx)(s.code,{children:"component-model-async"}),", ",(0,r.jsx)(s.code,{children:"gc"}),", ",(0,r.jsx)(s.code,{children:"exception-handling"}),", ",(0,r.jsx)(s.code,{children:"wide-arithmetic"}),", ",(0,r.jsx)(s.code,{children:"threads"}),", ",(0,r.jsx)(s.code,{children:"tail-call"}),". Validated at startup."]})]})]})]}),"\n",(0,r.jsx)(s.h5,{id:"devcomponents",children:(0,r.jsx)(s.code,{children:"dev.components[]"})}),"\n",(0,r.jsxs)(s.p,{children:["Additional components to load alongside your main component. Eac
1h entry can also override the workload-wide ",(0,r.jsx)(s.code,{children:"environment"}),", ",(0,r.jsx)(s.code,{children:"config"}),", and ",(0,r.jsx)(s.code,{children:"allowedHosts"})," values for that component (since 2.4.0); the override fields mirror the ",(0,r.jsx)(s.code,{children:"localResources"})," shape on a ",(0,r.jsx)(s.code,{children:"WorkloadDeployment"}),"."]}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Field"}),(0,r.jsx)(s.th,{children:"Type"}),(0,r.jsx)(s.th,{children:"Description"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"name"})}),(0,r.jsx)(s.td,{children:"string"}),(0,r.jsx)(s.td,{children:"Name identifier for the component"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"file"})}),(0,r.jsx)(s.td,{children:"string"}),(0,r.jsx)(s.td,{children:"Path to the component Wasm file"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"environment"})}),(0,r.jsx)(s.td,{children:"object"}),(0,r.jsxs)(s.td,{children:["Environment variables (",(0,r.jsx)(s.code,{children:"wasi:cli/env"}),") merged over ",(0,r.jsx)(s.code,{children:"workload.environment"}),". This component wins on key conflicts."]})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"config"})}),(0,r.jsx)(s.td,{children:"map"}),(0,r.jsxs)(s.td,{children:["Opaque key-value config merged over ",(0,r.jsx)(s.code,{children:"workload.config"}),". This component wins on key conflicts."]})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"allowedHosts"})}),(0,r.jsx)(s.td,{children:"array"}),(0,r.jsxs)(s.td,{children:["Outbound HTTP allowlist. When set, ",(0,r.jsx)(s.strong,{children:"replaces"})," ",(0,r.jsx)(s.code,{children:"workload.allowedHosts"})," for this component (",(0,r.jsx)(s.code,{children:"[]"})," denies all egress); when omitted the workload list applies."]})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"poolSize"})}),(0,r.jsx)(s.td,{children:"integer"}),(0,r.jsxs)(s.td,{children:["Maximum warm instances the host keeps for this component. Unset, ",(0,r.jsx)(s.code,{children:"0"}),", or negative instantiates fresh on every call."]})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"maxConcurrency"})}),(0,r.jsx)(s.td,{children:"integer"}),(0,r.jsxs)(s.td,{children:["Calls one warm instance serves at the same time (default ",(0,r.jsx)(s.code,{children:"1"}),"; only meaningful alongside ",(0,r.jsx)(s.code,{children:"poolSize"}),")."]})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"maxInvocations"})}),(0,r.jsx)(s.td,{children:"integer"}),(0,r.jsx)(s.td,{children:"Retires a warm instance after it admits this many calls (default: unlimited reuse)."})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"reclaimWindowSeconds"})}),(0,r.jsx)(s.td,{children:"integer"}),(0,r.jsx)(s.td,{children:"Lets an idle instance pool shrink: each window, warm instances beyond what peak load needed are retired (since 2.9.0). Unset means never reclaimed."})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"reclaimMinInstances"})}),(0,r.jsx)(s.td,{children:"integer"}),(0,r.jsx)(s.td,{children:"Floor on reclaim; sweeps never shrink the pool below this count (since 2.9.0)."})]})]})]}),"\n",(0,r.jsxs)(s.p,{children:["Workload-wide ",(0,r.jsx)(s.code,{children:"workload.environment"}),", ",(0,r.jsx)(s.code,{children:"workload.config"}),", and ",(0,r.jsx)(s.code,{children:"workload.allowedHosts"})," are the base layer for every component in a dev workload, including sidecars from ",(0,r.jsx)(s.code,{children:"dev.components[]"})," and the service from ",(0,r.jsx)(s.code,{children:"dev.service_file"})," (since 2.4.0; earlier releases applied them only to the main component). More than one component in the same workload may export the same interface (for example, two ",(0,r.jsx)(s.code,{children:"wasmcloud:messaging"})," handlers). A sibling importing a multi-exported interface names its provider with an ",(0,r.jsx)(s.code,{children:"(implements <component-name>)"})," label (since 2.10.0); unlabeled imports of it are refused."]}),"\n",(0,r.jsx)(s.h5,{id:"devvolumes",children:(0,r.jsx)(s.code,{children:"dev.volumes[]"})}),"\n",(0,r.jsx)(s.p,{children:"Volume mounts for filesystem access from within the Wasm component."}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Field"}),(0,r.jsx)(s.th,{children:"Type"}),(0,r.jsx)(s.th,{children:"Description"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"host_path"})}),(0,r.jsx)(s.td,{children:"string"}),(0,r.jsx)(s.td,{children:"Path on the host filesystem"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"guest_path"})}),(0,r.jsx)(s.td,{children:"string"}),(0,r.jsx)(s.td,{children:"Path as seen from within the Wasm component"})]})]})]}),"\n",(0,r.jsxs)(s.h4,{id:"dev-example",children:[(0,r.jsx)(s.code,{children:"dev"})," example"]}),"\n",(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(s.pre,{className:"shiki shiki-themes g
1ithub-light github-dark",style:{backgroundColor:"#fff","--shiki-dark-bg":"#24292e",color:"#24292e","--shiki-dark":"#e1e4e8"},tabIndex:"0",children:(0,r.jsxs)(s.code,{className:"language-yaml",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"#22863A","--shiki-dark":"#85E89D"},children:"dev"}),(0,r.jsx)(s.span,{style:{color:"#24292E","--shiki-dark":"#E1E4E8"},children:":"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"#22863A","--shiki-dark":"#85E89D"},children:" command"}),(0,r.jsx)(s.span,{style:{color:"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,r.jsx)(s.span,{style:{color:"#032F62","--shiki-dark":"#9ECBFF"},children:"cargo build --target wasm32-wasip2 --debug"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"#22863A","--shiki-dark":"#85E89D"},children:" address"}),(0,r.jsx)(s.span,{style:{color:"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,r.jsx)(s.span,{style:{color:"#032F62","--shiki-dark":"#9ECBFF"},children:"127.0.0.1:8080"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"#22863A","--shiki-dark":"#85E89D"},children:" service"}),(0,r.jsx)(s.span,{style:{color:"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,r.jsx)(s.span,{style:{color:"#005CC5","--shiki-dark":"#79B8FF"},children:"true"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"#22863A","--shiki-dark":"#85E89D"},children:" wasi_webgpu"}),(0,r.jsx)(s.span,{style:{color:"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,r.jsx)(s.span,{style:{color:"#005CC5","--shiki-dark":"#79B8FF"},children:"true"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"#22863A","--shiki-dark":"#85E89D"},children:" tls_cert_path"}),(0,r.jsx)(s.span,{style:{color:"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,r.jsx)(s.span,{style:{color:"#032F62","--shiki-dark":"#9ECBFF"},children:'"./certs/cert.pem"'})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"#22863A","--shiki-dark":"#85E89D"},children:" tls_key_path"}),(0,r.jsx)(s.span,{style:{color:"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,r.jsx)(s.span,{style:{color:"#032F62","--shiki-dark":"#9ECBFF"},children:'"./certs/key.pem"'})]})]})})}),"\n",(0,r.jsxs)(s.h3,{id:"wit-configuration",children:[(0,r.jsx)(s.code,{children:"wit"})," configuration"]}),"\n",(0,r.jsx)(s.p,{children:"Configuration for WIT (WebAssembly Interface Type) dependency management."}),"\n",(0,r.jsxs)(s.h4,{id:"wit-options",children:[(0,r.jsx)(s.code,{children:"wit"})," options"]}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Option"}),(0,r.jsx)(s.th,{children:"Type"}),(0,r.jsx)(s.th,{children:"Default"}),(0,r.jsx)(s.th,{children:"Description"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"registries"})}),(0,r.jsx)(s.td,{children:"array"}),(0,r.jsx)(s.td,{children:"wasm.pkg registry"}),(0,r.jsx)(s.td,{children:"Registries for WIT package fetching"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"skip_fetch"})}),(0,r.jsx)(s.td,{children:"boolean"}),(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"false"})}),(0,r.jsx)(s.td,{children:"Skip fetching WIT dependencies"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"wit_dir"})}),(0,r.jsx)(s.td,{children:"string"}),(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"./wit"})}),(0,r.jsx)(s.td,{children:"Directory where WIT files are stored"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"sources"})}),(0,r.jsx)(s.td,{children:"map"}),(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"{}"})}),(0,r.jsx)(s.td,{children:"Source overrides for WIT dependencies (target \u2192 source mapping). Accepts HTTP, Git, and OCI references; absolute local paths as of wasmCloud 2.8.0"})]})]})]}),"\n",(0,r.jsx)(s.h4,{id:"witregistries",children:(0,r.jsx)(s.code,{children:"wit.registries[]"})}),"\n",(0,r.jsx)(s.p,{children:"Registry configuration for fetching WIT packages."}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Field"}),(0,r.jsx)(s.th,{children:"Type"}),(0,r.jsx)(s.th,{children:"Description"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"url"})}),(0,r.jsx)(s.td,{children:"string"}),(0,r.jsx)(s.td,{children:"Registry URL endpoint"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"token"})}),(0,r.jsx)(s.td,{children:"string"}),(0,r.jsx)(s.td,{children:"Optional authentication token"})]})]})]}),"\n",(0,r.jsxs)(s.h4,{id:"wit-example",children:[(0,r.jsx)(s.code,{children:"wit"})," example"]}),"\n",(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(s.pre,{className:"shiki shiki-themes g
1ithub-light github-dark",style:{backgroundColor:"#fff","--shiki-dark-bg":"#24292e",color:"#24292e","--shiki-dark":"#e1e4e8"},tabIndex:"0",children:(0,r.jsxs)(s.code,{className:"language-yaml",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"#22863A","--shiki-dark":"#85E89D"},children:"wit"}),(0,r.jsx)(s.span,{style:{color:"#24292E","--shiki-dark":"#E1E4E8"},children:":"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"#22863A","--shiki-dark":"#85E89D"},children:" wit_dir"}),(0,r.jsx)(s.span,{style:{color:"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,r.jsx)(s.span,{style:{color:"#032F62","--shiki-dark":"#9ECBFF"},children:'"./wit"'})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"#22863A","--shiki-dark":"#85E89D"},children:" skip_fetch"}),(0,r.jsx)(s.span,{style:{color:"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,r.jsx)(s.span,{style:{color:"#005CC5","--shiki-dark":"#79B8FF"},children:"false"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"#22863A","--shiki-dark":"#85E89D"},children:" registries"}),(0,r.jsx)(s.span,{style:{color:"#24292E","--shiki-dark":"#E1E4E8"},children:":"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"#24292E","--shiki-dark":"#E1E4E8"},children:" - "}),(0,r.jsx)(s.span,{style:{color:"#22863A","--shiki-dark":"#85E89D"},children:"url"}),(0,r.jsx)(s.span,{style:{color:"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,r.jsx)(s.span,{style:{color:"#032F62","--shiki-dark":"#9ECBFF"},children:'"https://private-registry.example.com"'})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"#22863A","--shiki-dark":"#85E89D"},children:" token"}),(0,r.jsx)(s.span,{style:{color:"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,r.jsx)(s.span,{style:{color:"#032F62","--shiki-dark":"#9ECBFF"},children:'"${REGISTRY_TOKEN}"'})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"#22863A","--shiki-dark":"#85E89D"},children:" sources"}),(0,r.jsx)(s.span,{style:{color:"#24292E","--shiki-dark":"#E1E4E8"},children:":"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"#032F62","--shiki-dark":"#9ECBFF"},children:' "wasi:http"'}),(0,r.jsx)(s.span,{style:{color:"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,r.jsx)(s.span,{style:{color:"#032F62","--shiki-dark":"#9ECBFF"},children:'"https://github.com/WebAssembly/wasi-http/archive/refs/tags/v0.2.0.tar.gz"'})]})]})})})]})}function j(e={}){let{wrapper:s}={...(0,l.a)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(x,{...e})}):x(e)}},50065:function(e,s,i){i.d(s,{Z:()=>c,a:()=>d});var n=i(67294);let r={},l=n.createContext(r);function d(e){let s=n.useContext(l);return n.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function c(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:d(e.components),n.createElement(l.Provider,{value:s},e.children)}},5525:function(e,s,i){i.d(s,{Z:()=>l});var n=i(85893);i(67294);var r=i(67026);function l(e){let{children:s,hidden:i,className:l}=e;return(0,n.jsx)("div",{role:"tabpanel",className:(0,r.Z)("tabItem_Ymn6",l),hidden:i,children:s})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.