[{"data":1,"prerenderedAt":399},["ShallowReactive",2],{"navigation":3,"\u002Fguides\u002Fbuild-from-source-navigation":18,"\u002Fguides\u002Fbuild-from-source":23,"\u002Fguides\u002Fbuild-from-source-surround":395},[4],{"title":5,"path":6,"stem":7,"children":8,"page":17},"Guides","\u002Fguides","guides",[9,13],{"title":10,"path":11,"stem":12},"Get Started","\u002Fguides\u002Fget-started","guides\u002F1.get-started",{"title":14,"path":15,"stem":16},"Build from Source","\u002Fguides\u002Fbuild-from-source","guides\u002F2.build-from-source",false,[19],{"title":5,"path":6,"stem":7,"children":20,"page":17},[21,22],{"title":10,"path":11,"stem":12},{"title":14,"path":15,"stem":16},{"id":24,"title":14,"body":25,"description":35,"extension":389,"meta":390,"navigation":392,"path":15,"seo":393,"stem":16,"__hash__":394},"guides\u002Fguides\u002F2.build-from-source.md",{"type":26,"value":27,"toc":369},"minimark",[28,32,36,41,54,58,61,85,89,98,101,110,117,120,129,133,163,167,200,204,207,211,214,223,236,240,247,256,262,271,274,283,286,301,304,313,317,321,347,353,365],[29,30,14],"h1",{"id":31},"build-from-source",[33,34,35],"p",{},"Instructions for building MathScript from source code.",[37,38,40],"h2",{"id":39},"prerequisites","Prerequisites",[42,43,44,48,51],"ul",{},[45,46,47],"li",{},".NET SDK 9.0 or later",[45,49,50],{},"Git",[45,52,53],{},"A C# compatible IDE (Visual Studio, Visual Studio Code, or JetBrains Rider) or any code editor with command line tools",[37,55,57],{"id":56},"cloning-the-repository","Cloning the Repository",[33,59,60],{},"Clone the MathScript repository:",[62,63,68],"pre",{"className":64,"code":65,"language":66,"meta":67,"style":67},"language-sh shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","git clone https:\u002F\u002Fgithub.com\u002FMathScript-Lang\u002FMathScript\ncd MathScript\n","sh","",[69,70,71,79],"code",{"__ignoreMap":67},[72,73,76],"span",{"class":74,"line":75},"line",1,[72,77,78],{},"git clone https:\u002F\u002Fgithub.com\u002FMathScript-Lang\u002FMathScript\n",[72,80,82],{"class":74,"line":81},2,[72,83,84],{},"cd MathScript\n",[37,86,88],{"id":87},"building","Building",[90,91,93,94,97],"h3",{"id":92},"with-the-dotnet-cli","With the ",[69,95,96],{},"dotnet"," CLI",[33,99,100],{},"Navigate to the project's folder and build:",[62,102,104],{"className":64,"code":103,"language":66,"meta":67,"style":67},"dotnet build\n",[69,105,106],{"__ignoreMap":67},[72,107,108],{"class":74,"line":75},[72,109,103],{},[33,111,112,113,116],{},"You may need to build twice for your first build to generate and use ",[69,114,115],{},"BuildInfo.cs",".",[33,118,119],{},"To create a release build:",[62,121,123],{"className":64,"code":122,"language":66,"meta":67,"style":67},"dotnet build -c Release\n",[69,124,125],{"__ignoreMap":67},[72,126,127],{"class":74,"line":75},[72,128,122],{},[90,130,132],{"id":131},"with-visual-studio","With Visual Studio",[134,135,136,139,142,148],"ol",{},[45,137,138],{},"Open Visual Studio",[45,140,141],{},"Select \"Open a project or solution\"",[45,143,144,145],{},"Navigate to and open ",[69,146,147],{},"MathScript.slnx",[45,149,150,151,155,156,155,159,162],{},"Build the solution with ",[152,153,154],"kbd",{},"Ctrl"," + ",[152,157,158],{},"Shift",[152,160,161],{},"B"," or via Build > Build Solution",[90,164,166],{"id":165},"with-visual-studio-code","With Visual Studio Code",[134,168,169,172,175],{},[45,170,171],{},"Open the MathScript folder in Visual Studio Code",[45,173,174],{},"Install the C# extensions if not already installed",[45,176,177,178],{},"Run the build task:\n",[42,179,180,189],{},[45,181,182,183,155,185,155,187],{},"Press ",[152,184,154],{},[152,186,158],{},[152,188,161],{},[45,190,191,192],{},"Or use the terminal:",[62,193,194],{"className":64,"code":103,"language":66,"meta":67,"style":67},[69,195,196],{"__ignoreMap":67},[72,197,198],{"class":74,"line":75},[72,199,103],{},[37,201,203],{"id":202},"running","Running",[33,205,206],{},"After building, you can run MathScript in two ways:",[90,208,210],{"id":209},"interactive-repl-mode","Interactive REPL Mode",[33,212,213],{},"Run without arguments to start an interactive shell:",[62,215,217],{"className":64,"code":216,"language":66,"meta":67,"style":67},"dotnet run\n",[69,218,219],{"__ignoreMap":67},[72,220,221],{"class":74,"line":75},[72,222,216],{},[33,224,225,226,229,230,155,232,235],{},"Type your MathScript code and press Enter to execute it. Type ",[69,227,228],{},"exit"," or press ",[152,231,154],{},[152,233,234],{},"C"," to quit.",[90,237,239],{"id":238},"execute-or-compile-a-program","Execute or Compile a Program",[33,241,242,243,246],{},"Execute a ",[69,244,245],{},".mscr"," file directly:",[62,248,250],{"className":64,"code":249,"language":66,"meta":67,"style":67},"dotnet run -- hello.mscr\n",[69,251,252],{"__ignoreMap":67},[72,253,254],{"class":74,"line":75},[72,255,249],{},[33,257,258,259,261],{},"Compile a ",[69,260,245],{}," file to an executable:",[62,263,265],{"className":64,"code":264,"language":66,"meta":67,"style":67},"dotnet run -- -o output hello.mscr\n",[69,266,267],{"__ignoreMap":67},[72,268,269],{"class":74,"line":75},[72,270,264],{},[33,272,273],{},"And generally:",[62,275,277],{"className":64,"code":276,"language":66,"meta":67,"style":67},"dotnet run -- [arguments]\n",[69,278,279],{"__ignoreMap":67},[72,280,281],{"class":74,"line":75},[72,282,276],{},[33,284,285],{},"You can also use the built executable directly from the build output directory:",[62,287,289],{"className":64,"code":288,"language":66,"meta":67,"style":67},".\u002Fbin\u002FDebug\u002Fnet9.0\u002Fmathscript hello.mscr\n.\u002Fbin\u002FDebug\u002Fnet9.0\u002Fmathscript -o output hello.mscr\n",[69,290,291,296],{"__ignoreMap":67},[72,292,293],{"class":74,"line":75},[72,294,295],{},".\u002Fbin\u002FDebug\u002Fnet9.0\u002Fmathscript hello.mscr\n",[72,297,298],{"class":74,"line":81},[72,299,300],{},".\u002Fbin\u002FDebug\u002Fnet9.0\u002Fmathscript -o output hello.mscr\n",[33,302,303],{},"For release builds:",[62,305,307],{"className":64,"code":306,"language":66,"meta":67,"style":67},".\u002Fbin\u002FRelease\u002Fnet9.0\u002Fmathscript hello.mscr\n",[69,308,309],{"__ignoreMap":67},[72,310,311],{"class":74,"line":75},[72,312,306],{},[37,314,316],{"id":315},"troubleshooting","Troubleshooting",[90,318,320],{"id":319},"build-fails-with-missing-dependencies","Build fails with missing dependencies",[42,322,323,335],{},[45,324,325,326],{},"Ensure .NET SDK 9.0+ is installed:",[62,327,329],{"className":64,"code":328,"language":66,"meta":67,"style":67},"dotnet --version\n",[69,330,331],{"__ignoreMap":67},[72,332,333],{"class":74,"line":75},[72,334,328],{},[45,336,337,338],{},"Restore NuGet packages:",[62,339,341],{"className":64,"code":340,"language":66,"meta":67,"style":67},"dotnet restore\n",[69,342,343],{"__ignoreMap":67},[72,344,345],{"class":74,"line":75},[72,346,340],{},[90,348,350,352],{"id":349},"buildinfocs-not-found-on-first-build",[69,351,115],{}," not found on first build",[42,354,355,362],{},[45,356,357,358,361],{},"This is a known issue with the build system checking for the ",[69,359,360],{},"BuildInfo"," class before the file generation task runs.",[45,363,364],{},"Simply build again and it will succeed, as the file will already exist.",[366,367,368],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":67,"searchDepth":81,"depth":81,"links":370},[371,372,373,380,384],{"id":39,"depth":81,"text":40},{"id":56,"depth":81,"text":57},{"id":87,"depth":81,"text":88,"children":374},[375,378,379],{"id":92,"depth":376,"text":377},3,"With the dotnet CLI",{"id":131,"depth":376,"text":132},{"id":165,"depth":376,"text":166},{"id":202,"depth":81,"text":203,"children":381},[382,383],{"id":209,"depth":376,"text":210},{"id":238,"depth":376,"text":239},{"id":315,"depth":81,"text":316,"children":385},[386,387],{"id":319,"depth":376,"text":320},{"id":349,"depth":376,"text":388},"BuildInfo.cs not found on first build","md",{"icon":391},"i-lucide-folder-open-dot",true,{"title":14,"description":35},"uARPlGcqhN1bMdv0F5vWC_JA5kI81xiIaJq3w1djBsc",[396,398],{"title":10,"path":11,"stem":12,"description":397,"children":-1},"This guide covers installation and basic usage of MathScript.",null,1777218335009]