1"use strict";(globalThis.webpackChunkdocs=globalThis.webpackChunkdocs||[]).push([[1586],{29221(e,n,r){r.r(n),r.d(n,{assets:()=>a,contentTitle:()=>d,default:()=>h,frontMatter:()=>c,metadata:()=>i,toc:()=>o});const i=JSON.parse('{"id":"reference/NoirJS/noir_wasm/index","title":"noir_wasm","description":"Interfaces","source":"@site/processed-docs/reference/NoirJS/noir_wasm/index.md","sourceDirName":"reference/NoirJS/noir_wasm","slug":"/reference/NoirJS/noir_wasm/","permalink":"/docs/dev/reference/NoirJS/noir_wasm/","draft":false,"unlisted":false,"editUrl":"https://github.com/noir-lang/noir/edit/master/docs/docs/reference/NoirJS/noir_wasm/index.md","tags":[],"version":"current","frontMatter":{},"sidebar":"sidebar","previous":{"title":"Type Alias: ErrorWithPayload","permalink":"/docs/dev/reference/NoirJS/noir_js/type-aliases/ErrorWithPayload"},"next":{"title":"Function: compile()","permalink":"/docs/dev/reference/NoirJS/noir_wasm/functions/compile"}}');var s=r(74848),t=r(28453);const c={},d="noir_wasm",a={},o=[{value:"Interfaces",id:"interfaces",level:2},{value:"ContractCompilationArtifacts",id:"contractcompilationartifacts",level:3},{value:"Properties",id:"properties",level:4},{value:"ProgramCompilationArtifacts",id:"programcompilationartifacts",level:3},{value:"Properties",id:"properties-1",level:4},{value:"Variables",id:"variables",level:2},{value:"createFileManager",id:"createfilemanager",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Returns",id:"returns",level:4},{value:"Functions",id:"functions",level:2},{value:"References",id:"references",level:2},{value:"compile_program",id:"compile_program",level:3}];function l(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",header:"header",hr:"hr",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"noir_wasm",children:"noir_wasm"})}),"\n",(0,s.jsx)(n.h2,{id:"interfaces",children:"Interfaces"}),"\n",(0,s.jsx)(n.h3,{id:"contractcompilationartifacts",children:"ContractCompilationArtifacts"}),"\n",(0,s.jsx)(n.p,{children:"The compilation artifacts of a given contract."}),"\n",(0,s.jsx)(n.h4,{id:"properties",children:"Properties"}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Property"}),(0,s.jsx)(n.th,{children:"Type"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsxs)(n.td,{children:[(0,s.jsx)(n.a,{id:"contract"})," ",(0,s.jsx)(n.code,{children:"contract"})]}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"ContractArtifact"})}),(0,s.jsx)(n.td,{children:"The compiled contract."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsxs)(n.td,{children:[(0,s.jsx)(n.a,{id:"warnings"})," ",(0,s.jsx)(n.code,{children:"warnings"})]}),(0,s.jsxs)(n.td,{children:[(0,s.jsx)(n.code,{children:"unknown"}),"[]"]}),(0,s.jsx)(n.td,{children:"Compilation warnings."})]})]})]}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsx)(n.h3,{id:"programcompilationartifacts",children:"ProgramCompilationArtifacts"}),"\n",(0,s.jsx)(n.p,{children:"The compilation artifacts of a given program."}),"\n",(0,s.jsx)(n.h4,{id:"properties-1",children:"Properties"}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Property"}),(0,s.jsx)(n.th,{children:"Type"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsxs)(n.td,{children:[(0,s.jsx)(n.a,{id:"name"})," ",(0,s.jsx)(n.code,{children:"name"})]}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"string"})}),(0,s.jsx)(n.td,{children:"not part of the compilation output, injected later"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsxs)(n.td,{children:[(0,s.jsx)(n.a,{id:"program"})," ",(0,s.jsx)(n.code,{children:"program"})]}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"ProgramArtifact"})}),(0,s.jsx)(n.td,{children:"The compiled contract."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsxs)(n.td,{children:[(0,s.jsx)(n.a,{id:"warnings-1"})," ",(0,s.jsx)(n.code,{children:"warnings"})]}),(0,s.jsxs)(n.td,{children:[(0,s.jsx)(n.code,{children:"unknown"}),"[]"]}),(0,s.jsx)(n.td,{children:"Compilation warnings."})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"variables",children:"Variables"}),"\n",(0,s.jsx)(n.h3,{id:"createfilemanager",children:"createFileManager"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:"const createFileManager: (dataDir) => FileManager = createNodejsFileManager;\n"})}),"\n",(0,s.jsx)(n.p,{children:"Creates a new FileManager instance based on fs in node and memfs in the browser (via webpack alias)"}),"\n",(0,s.jsx)(n.h4,{id:"parameters",children:"Parameters"}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Parameter"}),(0,s.jsx)(n.th,{children:"Type"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsx)(n.tbody,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"dataDir"})}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"string"})}),(0,s.jsx)(n.td,{children:"root of the file system"})]})})]}),"\n",(0,s.jsx)(n.h4,{id:"returns",children:"Returns"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.code,{children:"FileManager"})}),"\n",(0,s.jsx)(n.h2,{id:"functions",children:"Functions"}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Function"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.a,{href:"/docs/dev/reference/NoirJS/noir_wasm/functions/compile",children:"compile"})}
1),(0,s.jsx)(n.td,{children:"Compiles a Noir project"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.a,{href:"/docs/dev/reference/NoirJS/noir_wasm/functions/compile_contract",children:"compile_contract"})}),(0,s.jsx)(n.td,{children:"Compiles a Noir project"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.a,{href:"/docs/dev/reference/NoirJS/noir_wasm/functions/inflateDebugSymbols",children:"inflateDebugSymbols"})}),(0,s.jsx)(n.td,{children:"Decompresses and decodes the debug symbols"})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"references",children:"References"}),"\n",(0,s.jsx)(n.h3,{id:"compile_program",children:"compile_program"}),"\n",(0,s.jsxs)(n.p,{children:["Renames and re-exports ",(0,s.jsx)(n.a,{href:"/docs/dev/reference/NoirJS/noir_wasm/functions/compile",children:"compile"})]})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},28453(e,n,r){r.d(n,{R:()=>c,x:()=>d});var i=r(96540);const s={},t=i.createContext(s);function c(e){const n=i.useContext(t);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:c(e.components),i.createElement(t.Provider,{value:n},e.children)}}}]);
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.