1"use strict"; 2(globalThis["webpackChunkboajs_dev"] ||= []).push([[5042],{ 3 4/***/ 1391 5(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 6 7// ESM COMPAT FLAG 8__webpack_require__.r(__webpack_exports__); 9 10// EXPORTS 11__webpack_require__.d(__webpack_exports__, { 12 assets: () => (/* binding */ assets), 13 contentTitle: () => (/* binding */ contentTitle), 14 "default": () => (/* binding */ MDXContent), 15 frontMatter: () => (/* binding */ frontMatter), 16 metadata: () => (/* reexport */ site_docs_contributing_contributing_md_f15_namespaceObject), 17 toc: () => (/* binding */ toc) 18}); 19 20;// ./.docusaurus/docusaurus-plugin-content-docs/default/site-docs-contributing-contributing-md-f15.json 21const site_docs_contributing_contributing_md_f15_namespaceObject = /*#__PURE__*/JSON.parse('{"id":"contributing/contributing","title":"Contributing to Boa","description":"Boa welcomes contribution from everyone. Here are the guidelines if you are","source":"@site/docs/contributing/contributing.md","sourceDirName":"contributing","slug":"/contributing/","permalink":"/docs/contributing/","draft":false,"unlisted":false,"editUrl":"https://github.com/boa-dev/boa-dev.github.io/tree/main/docs/docs/contributing/contributing.md","tags":[],"version":"current","sidebarPosition":1,"frontMatter":{"sidebar_position":1},"sidebar":"infoSidebar","previous":{"title":"Contributing","permalink":"/docs/category/contributing"},"next":{"title":"Testing","permalink":"/docs/contributing/testing"}}'); 22// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js 23var jsx_runtime = __webpack_require__(4848); 24// EXTERNAL MODULE: ./node_modules/@mdx-js/react/lib/index.js 25var lib = __webpack_require__(8453); 26;// ./docs/contributing/contributing.md 27 28 29const frontMatter = { 30 sidebar_position: 1 31}; 32const contentTitle = 'Contributing to Boa'; 33 34const assets = { 35 36}; 37 38 39 40const toc = [{ 41 "value": "Contributions", 42 "id": "contributions", 43 "level": 2 44}, { 45 "value": "Running the compiler", 46 "id": "running-the-compiler", 47 "level": 2 48}, { 49 "value": "Building the docs", 50 "id": "building-the-docs", 51 "level": 2 52}, { 53 "value": "Debugging", 54 "id": "debugging", 55 "level": 2 56}, { 57 "value": "IDE Setup", 58 "id": "ide-setup", 59 "level": 2 60}, { 61 "value": "AI", 62 "id": "ai", 63 "level": 2 64}, { 65 "value": "Communication", 66 "id": "communication", 67 "level": 2 68}]; 69function _createMdxContent(props) { 70 const _components = { 71 a: "a", 72 code: "code", 73 em: "em", 74 h1: "h1", 75 h2: "h2", 76 header: "header", 77 li: "li", 78 p: "p", 79 pre: "pre", 80 ul: "ul", 81 ...(0,lib/* useMDXComponents */.R)(), 82 ...props.components 83 }; 84 return (0,jsx_runtime.jsxs)(jsx_runtime.Fragment, { 85 children: [(0,jsx_runtime.jsx)(_components.header, { 86 children: (0,jsx_runtime.jsx)(_components.h1, { 87 id: "contributing-to-boa", 88 children: "Contributing to Boa" 89 }) 90 }), "\n", (0,jsx_runtime.jsx)(_components.p, { 91 children: "Boa welcomes contribution from everyone. Here are the guidelines if you are\nthinking of helping out:" 92 }), "\n", (0,jsx_runtime.jsx)(_components.h2, { 93 id: "contributions", 94 children: "Contributions" 95 }), "\n", (0,jsx_runtime.jsx)(_components.p, { 96 children: "Contributions to Boa or its dependencies should be made in the form of GitHub\npull requests. Each pull request will be reviewed by a core contributor\n(someone with permission to land patches) and either landed in the main tree or\ngiven feedback for changes that would be required. All contributions should\nfollow this format." 97 }), "\n", (0,jsx_runtime.jsx)(_components.p, { 98 children: "Should you wish to work on an issue, please claim it first by commenting on\nthe GitHub issue that you want to work on it. This is to prevent duplicated\nefforts from contributors on the same issue." 99 }), "\n", (0,jsx_runtime.jsxs)(_components.p, { 100 children: ["Head over to ", (0,jsx_runtime.jsx)(_components.a, { 101 href: "https://github.com/boa-dev/boa/issues", 102 children: "issues" 103 }), " and check for \"good first issue\" labels to find\ngood tasks to start with. If you come across words or jargon that do not make\nsense, please ask!"] 104 }), "\n", (0,jsx_runtime.jsxs)(_components.p, { 105 children: ["If you don't already have Rust installed ", (0,jsx_runtime.jsx)(_components.a, { 106 href: "https://rustup.rs/", 107 children: (0,jsx_runtime.jsx)(_components.em, { 108 children: "rustup" 109 }) 110 }), " is the recommended\ntool to use. It will install Rust and allow you to switch between ", (0,jsx_runtime.jsx)(_components.em, { 111 children: "nightly" 112 }), ",\n", (0,jsx_runtime.jsx)(_components.em, { 113 children: "stable" 114 }), " and ", (0,jsx_runtime.jsx)(_components.em, { 115 children: "beta" 116 }), ". You can also install additional components. In Linux, you\ncan run:"] 117 }), "\n", (0,jsx_runtime.jsx)(_components.pre, {
118 children: (0,jsx_runtime.jsx)(_components.code, { 119 className: "language-shell", 120 children: "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n" 121 }) 122 }), "\n", (0,jsx_runtime.jsxs)(_components.p, { 123 children: ["Then simply clone this project and ", (0,jsx_runtime.jsx)(_components.code, { 124 children: "cargo build" 125 }), "."] 126 }), "\n", (0,jsx_runtime.jsx)(_components.h2, { 127 id: "running-the-compiler", 128 children: "Running the compiler" 129 }), "\n", (0,jsx_runtime.jsxs)(_components.p, { 130 children: ["You can execute a Boa console by running ", (0,jsx_runtime.jsx)(_components.code, { 131 children: "cargo run" 132 }), ", and you can compile a list\nof JavaScript files by running ", (0,jsx_runtime.jsx)(_components.code, { 133 children: "cargo run -- file1.js file2.js" 134 }), " and so on."] 135 }), "\n", (0,jsx_runtime.jsx)(_components.h2, { 136 id: "building-the-docs", 137 children: "Building the docs" 138 }), "\n", (0,jsx_runtime.jsx)(_components.p, { 139 children: "To build the development documentation, run:" 140 }), "\n", (0,jsx_runtime.jsx)(_components.pre, { 141 children: (0,jsx_runtime.jsx)(_components.code, { 142 className: "language-shell", 143 children: "cargo doc --all-features --document-private-items --workspace\n" 144 }) 145 }), "\n", (0,jsx_runtime.jsxs)(_components.p, { 146 children: ["This will also document all the dependencies on the workspace, which could be\nheavier in size. To only generate documentation for the workspace members, just\nadd the ", (0,jsx_runtime.jsx)(_components.code, { 147 children: "--no-deps" 148 }), " flag:"] 149 }), "\n", (0,jsx_runtime.jsx)(_components.pre, { 150 children: (0,jsx_runtime.jsx)(_components.code, { 151 className: "language-shell", 152 children: "cargo doc --all-features --document-private-items --workspace --no-deps\n" 153 }) 154 }), "\n", (0,jsx_runtime.jsx)(_components.h2, { 155 id: "debugging", 156 children: "Debugging" 157 }), "\n", (0,jsx_runtime.jsxs)(_components.p, { 158 children: ["Knowing how to debug the interpreter should help you resolve problems quite quickly.\nSee ", (0,jsx_runtime.jsx)(_components.a, { 159 href: "/docs/category/debugging", 160 children: "Debugging" 161 }), "."] 162 }), "\n", (0,jsx_runtime.jsx)(_components.h2, { 163 id: "ide-setup", 164 children: "IDE Setup" 165 }), "\n", (0,jsx_runtime.jsxs)(_components.p, { 166 children: ["You can work on Boa with any text editor capable of editing Rust and Javascript code.\nAn easy way of getting started is to use ", (0,jsx_runtime.jsx)(_components.a, { 167 href: "https://code.visualstudio.com/", 168 children: "Visual Studio Code" 169 }), "\nwith the ", (0,jsx_runtime.jsx)(_components.a, { 170 href: "https://marketplace.visualstudio.com/items?itemName=matklad.rust-analyzer", 171 children: "Rust Analyzer" 172 }), " extension."] 173 }), "\n", (0,jsx_runtime.jsx)(_components.h2, { 174 id: "ai", 175 children: "AI" 176 }), "\n", (0,jsx_runtime.jsx)(_components.p, { 177 children: "We are usually not against using AI tools. However, their\ngeneral availability makes it much easier to fill our review capacity with\nlow-effort contributions. Therefore, every contributor must adhere to the following\nrules:" 178 }), "\n", (0,jsx_runtime.jsxs)(_components.ul, { 179 children: ["\n", (0,jsx_runtime.jsx)(_components.li, { 180 children: "No spamming PRs. This includes the use of AI agents to open multiple PRs in\nsuccession." 181 }), "\n", (0,jsx_runtime.jsx)(_components.li, { 182 children: "No PRs with massive line changes (5k+) without prior discussion and acknowledgement." 183 }), "\n", (0,jsx_runtime.jsx)(_components.li, { 184 children: "All PR authors must be able to explain what their contribution does in detail." 185 }), "\n"] 186 }), "\n", (0,jsx_runtime.jsx)(_components.p, { 187 children: "The maintainers reserve the right to closing any PRs that do not follow these rules,\nand recurrent offenses will result in a global ban from contributing to all\nBoa-related projects." 188 }), "\n", (0,jsx_runtime.jsx)(_components.h2, { 189 id: "communication", 190 children: "Communication" 191 }), "\n", (0,jsx_runtime.jsxs)(_components.p, { 192 children: ["Most of our communication happens in Matrix, feel free to ask questions in our\n", (0,jsx_runtime.jsx)(_components.a, { 193 href: "https://matrix.to/#/#boa:matrix.org", 194 children: "Boa space" 195 }), "."] 196 })] 197 }); 198} 199function MDXContent(props = {}) { 200 const {wrapper: MDXLayout} = { 201 ...(0,lib/* useMDXComponents */.R)(), 202 ...props.components 203 }; 204 return MDXLayout ? (0,jsx_runtime.jsx)(MDXLayout, { 205 ...props, 206 children: (0,jsx_runtime.jsx)(_createMdxContent, { 207 ...props 208 }) 209 }) : _createMdxContent(props); 210} 211 212 213 214/***/ }, 215 216/***/ 8453 217(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { 218 219/* harmony export */ __webpack_require__.d(__webpack_exports__, { 220/* harmony export */ R: () => (/* binding */ useMDXComponents), 221/* harmony export */ x: () => (/* binding */ MDXProvider) 222/* harmony export */ }); 223/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6540); 224/** 225 * @import {MDXComponents} from 'mdx/types.js' 226 * @import {Component, ReactElement, ReactNode} from 'react' 227 */ 228 229/** 230 * @callback MergeComponents 231 * Custom merge function. 232 * @param {Readonly<MDXComponents>} currentComponents 233 * Current components from the context. 234 * @returns {MDXComponents} 235 * Additional components. 236 * 237 * @typedef Props 238 * Configuration for `MDXProvider`. 239 * @property {ReactNode | null | undefined} [children] 240 * Children (optional). 241 * @property {Readonly<MDXComponents> | MergeComponents | null | undefined} [components] 242 * Additional components to use or a function that creates them (optional). 243 * @property {boolean | null | undefined} [disableParentContext=false]
244 * Turn off outer component context (default: `false`). 245 */ 246 247 248 249/** @type {Readonly<MDXComponents>} */ 250const emptyComponents = {} 251 252const MDXContext = react__WEBPACK_IMPORTED_MODULE_0__.createContext(emptyComponents) 253 254/** 255 * Get current components from the MDX Context. 256 * 257 * @param {Readonly<MDXComponents> | MergeComponents | null | undefined} [components] 258 * Additional components to use or a function that creates them (optional). 259 * @returns {MDXComponents} 260 * Current components. 261 */ 262function useMDXComponents(components) { 263 const contextComponents = react__WEBPACK_IMPORTED_MODULE_0__.useContext(MDXContext) 264 265 // Memoize to avoid unnecessary top-level context changes 266 return react__WEBPACK_IMPORTED_MODULE_0__.useMemo( 267 function () { 268 // Custom merge via a function prop 269 if (typeof components === 'function') { 270 return components(contextComponents) 271 } 272 273 return {...contextComponents, ...components} 274 }, 275 [contextComponents, components] 276 ) 277} 278 279/** 280 * Provider for MDX context. 281 * 282 * @param {Readonly<Props>} properties 283 * Properties. 284 * @returns {ReactElement} 285 * Element. 286 * @satisfies {Component} 287 */ 288function MDXProvider(properties) { 289 /** @type {Readonly<MDXComponents>} */ 290 let allComponents 291 292 if (properties.disableParentContext) { 293 allComponents = 294 typeof properties.components === 'function' 295 ? properties.components(emptyComponents) 296 : properties.components || emptyComponents 297 } else { 298 allComponents = useMDXComponents(properties.components) 299 } 300 301 return react__WEBPACK_IMPORTED_MODULE_0__.createElement( 302 MDXContext.Provider, 303 {value: allComponents}, 304 properties.children 305 ) 306} 307 308 309/***/ } 310 311}]);
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.