diff --git a/docs/02_ko.html b/docs/02_ko.html index b3f33d29d3abdffc6dbb55e178f80eb3709f2415..1e10a64f623bb1dd04f95c83e83e03a0ce9469b0 100644 --- a/docs/02_ko.html +++ b/docs/02_ko.html @@ -42,7 +42,7 @@ </p> <h3>Stackoverflow survey @ 2022</h3> </div> -<p>2022년 Stack Overflow 개발자 설문조사 기준으로 Rust는 "가장 사랑받는 언어" 부문에서 <code>7년 연속</code>으로 1위를 차지할 정도입니다.</p> +<p>2022년 Stack Overflow 개발자 설문조사 기준으로<br/>Rust는 "가장 사랑받는 언어" 부문에서 <code>7년 연속</code>으로 1위를 차지할 정도입니다.</p> <p>실제 예로 IT 대기업들 Facebook, Google, Mozilla 등이 Rust를 사용하고 있습니다.</p> <ul> <li><code>Facebook</code>은 Rust를 기반으로 하는 Libra, 디지털 자산을 위한 글로벌 금융 시스템을 구축하는 것을 목표 블록체인 프로젝트를 진행, HHVM, API etc</li> diff --git a/docs/08_ko.html b/docs/08_ko.html index d06413a74354bef5830f0efd5ca6cc37542652b2..bea90db584f7581fa5e9c0689e9c2bbce18b7bf8 100644 --- a/docs/08_ko.html +++ b/docs/08_ko.html @@ -48,7 +48,7 @@ </div> </div> <div class="code"> - <iframe id="rust-playground" width="100%" src="https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&code=fn%20main()%20%7B%0A%20%20%20%20let%20mut%20x%20%3D%2042%3B%0A%20%20%20%20println!(%22%7B%7D%22%2C%20x)%3B%0A%20%20%20%20x%20%3D%2013%3B%0A%20%20%20%20println!(%22%7B%7D%22%2C%20x)%3B%0A%7D%0A" scrolling="no" frameborder="no" allowtransparency="true" allowfullscreen="true" sandbox="allow-forms allow-pointer-lock allow-popups allow-same-origin allow-scripts allow-modals" title="Rust Playground" loading="lazy"></iframe> + <iframe id="rust-playground" width="100%" src="https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&code=fn+main%28%29+%7B%0A++++let+mut+x+%3D+42%3B%0A++++println%21%28%22%7B%7D%22%2C+x%29%3B%0A++++x+%3D+13%3B%0A++++println%21%28%22%7B%7D%22%2C+x%29%3B%0A%0A++++let+y+%3D+23%3B%0A++++println%21%28%22%7B%7D%22%2C+y%29%3B%0A++++%2F%2F+y+%3D+9%3B++%2F%2F+%EC%97%90%EB%9F%AC%0A%7D%0A" scrolling="no" frameborder="no" allowtransparency="true" allowfullscreen="true" sandbox="allow-forms allow-pointer-lock allow-popups allow-same-origin allow-scripts allow-modals" title="Rust Playground" loading="lazy"></iframe> </div> </div> <!-- <script> diff --git a/docs/09_ko.html b/docs/09_ko.html index cfbc9d7877c184054fa215ed6774f4e8cd341a10..d2f0c8de5697680d5007dcbc8a7effabcd6efd84 100644 --- a/docs/09_ko.html +++ b/docs/09_ko.html @@ -48,8 +48,8 @@ <li>slices - 런타임에 길이가 알려진 비슷한 요소의 집합입니다.</li> <li><code>str</code>(문자열 슬라이스) - 런타임에 길이가 알려진 텍스트입니다.</li> </ul> -<p>다른 언어에서 사용하는 것보다 텍스트는 더 복잡할 수 있습니다. -Rust가 시스템 프로그래밍 언어이기 때문에, 기존에 익숙하지 않은 메모리 문제에 대해서도 신경쓰고 있습니다. +<p>다른 언어에서 사용하는 것보다 텍스트는 더 복잡할 수 있습니다.<br /> +Rust가 시스템 프로그래밍 언어이기 때문에, 기존에 익숙하지 않은 메모리 문제에 대해서도 신경쓰고 있습니다.<br /> 이에 대해서는 나중에 자세히 다룰 예정입니다.</p> <p>숫자형은 숫자 끝에 유형을 명시하여 명시적으로 지정할 수 있습니다(예: <code>13u32</code>, <code>2u8</code>).</p> <div class="bottomnav"> diff --git a/docs/12_ko.html b/docs/12_ko.html index 0ee12e585029d0fa3f447e11b898aec073bd6b5e..a28c74adcc47f1fbab8640d5494209d1cfbaba00 100644 --- a/docs/12_ko.html +++ b/docs/12_ko.html @@ -37,9 +37,9 @@ <div class="page"> <h1>Arrays</h1> <p><em>배열</em>은 동일한 유형의 데이터 요소들의 <strong>고정된 길이 집합</strong>입니다.</p> -<p><em>배열</em>의 데이터 유형은 <code>[T;N]</code> 입니다. +<p><em>배열</em>의 데이터 유형은 <code>[T;N]</code> 입니다.<br /> (T는 요소의 유형이고, N은 컴파일 시간에 알려진 고정 길이)</p> -<p>개별 요소는 <code>[x]</code> 연산자를 사용하여 가져올 수 있습니다. +<p>개별 요소는 <code>[x]</code> 연산자를 사용하여 가져올 수 있습니다.<br /> 여기서 x는 원하는 요소의 <em>usize</em> 인덱스(0부터 시작)입니다.</p> <p>가변 길이의 컬렉션, 즉 가변 배열은 나중에 <strong>Vectors</strong>에 대한 챕터에서 소개됩니다.</p> <div class="bottomnav"> diff --git a/docs/13_ko.html b/docs/13_ko.html index 618e626c033cd057413286d0f412c0ba0644c3ac..5beebea10b61729d4eb88a8afe97a8407710fbb8 100644 --- a/docs/13_ko.html +++ b/docs/13_ko.html @@ -40,8 +40,22 @@ <p>이 예제에서 <em>add</em> 함수는 <code>i32</code>(32비트 길이의 부호 있는 정수)형 두 개의 인수를 취합니다.</p> <p><em>subtract</em> 함수에서와 같이 표현식만 반환하려면 <code>return</code> 키워드와 세미콜론을 삭제할 수 있습니다.</p> <p>함수 이름은 항상 <code>snake_case</code>로 지정됩니다.</p> -<p>힌트: 함수를 정의하는 경우, 해당 함수가 수신하는 데이터를 매개변수 (parameter)라고합니다. +<p>힌트: 함수를 정의하는 경우, 해당 함수가 수신하는 데이터를 매개변수 (parameter)라고합니다.<br /> 그 함수를 호출하고 데이터를 전달하면 인수(argument)라고합니다.</p> +<pre><code class="python language-python">def add(x: int, y: int) -> int: + return x + y + +def subtract(x: int, y: int) -> int: + return x - y + +def main(): + print(f"42 + 13 = {add(42, 13)}") + print(f"42 - 13 = {subtract(42, 13)}") + + +if __name__ == "__main__": + main() +</code></pre> <div class="bottomnav"> <span class="back"><a href="12_ko.html" rel="prev">❮ 이전</a></span> <span class="next"><a href="14_ko.html" rel="next">다음 ❯</a></span> diff --git a/docs/14_ko.html b/docs/14_ko.html index e6b9e944ed9806701b60de54e8a2ef31c3514960..4fe3f5f77bae91bf7bf885068c17ebcda2cdda05 100644 --- a/docs/14_ko.html +++ b/docs/14_ko.html @@ -38,7 +38,7 @@ <h1>Multiple Return Values</h1> <p>함수는 값의 <strong>튜플</strong>을 반환하여 여러 값을 반환할 수 있습니다.</p> <p>튜플 요소는 인덱스 번호를 사용하여 참조할 수 있습니다.</p> -<p>Rust는 여러 형식의 destructuring을 지원합니다. +<p>Rust는 여러 형식의 destructuring을 지원합니다.<br /> 우리는 더 많은 형태로 볼 것이며, 이를 통해 데이터 구조의 하위 요소를 직관적으로 추출할 수 있습니다.</p> <div class="bottomnav"> <span class="back"><a href="13_ko.html" rel="prev">❮ 이전</a></span> diff --git a/docs/16_ko.html b/docs/16_ko.html index eca5df1157fe1c75b9a497d85705699f659a9f10..577907bc4d40ce4bea80dff8b91d6fd94d38bd54 100644 --- a/docs/16_ko.html +++ b/docs/16_ko.html @@ -42,10 +42,10 @@ <pre><code class="rust">struct Person { name: String, age: u8, -} %end -구조체의 인스턴스를 생성하려면, 구조체 이름 뒤에 중괄호를 사용하고 필드에 값을 할당합니다. -예를 들면: -%rust% let person = Person { name: String::from("Alice"), age: 30 };</code></pre> +}</code></pre> +<p>구조체의 인스턴스를 생성하려면, 구조체 이름 뒤에 중괄호를 사용하고 필드에 값을 할당합니다.<br /> +예를 들면:</p> +<pre><code class="rust">let person = Person { name: String::from("Alice"), age: 30 };</code></pre> <hr /> <p><strong>열거형 (Enum)</strong></p> <p>열거형(enum, "enumeration"의 줄임말)은 고정된 명명된 값 집합인 "변종(variants)"을 가진 타입을 나타냅니다.</p> @@ -107,7 +107,7 @@ fn main() { } }</code></pre> <hr /> -<p><strong>Nested</strong> +<p><strong>Nested</strong><br /> 중첩된 Struct과 Enum을 만들고 싶다면?</p> <pre><code class="rust">// 중첩된 구조체 (Nested Struct) struct Address { diff --git a/docs/TOC_ko.html b/docs/TOC_ko.html index 2735a588e1f6b106d9e4880846f369a4c186de61..5eaf3c1f6d8c726eb061d69e2da3a5cd127adc3e 100644 --- a/docs/TOC_ko.html +++ b/docs/TOC_ko.html @@ -74,6 +74,10 @@ <li><a href="34_ko.html">Hey</a></li> </ul> </div> + <div style="display: flex;flex-direction: column;justify-content: center;align-items: center;"> + <img style="display: block; margin: 0 auto;" src="/ajou.webp"></img><br/> + <p>이 컨텐츠는 2022년 과학기술정보통신부 및 정보통신기획평가원의 SW중심대학사업의 연구결과로 제작되었습니다.<br/>(2022-0-01077)</p> + </div> </div> </body> </html> \ No newline at end of file diff --git a/docs/chapter_2_ko.html b/docs/chapter_2_ko.html index b41042654d7be7b98a123735bab18c9f122fafd0..7cdd23f8a00cd1fe838c8f9ae180e07540ed3df3 100644 --- a/docs/chapter_2_ko.html +++ b/docs/chapter_2_ko.html @@ -54,7 +54,7 @@ <li><p>가비지 컬렉터가 메모리를 추적하고 회수하는 과정에서 시스템 리소스가 소모됩니다.</p></li> <li><p>가비지 컬렉션 동작 중에는 프로그램 실행이 일시 중단되거나 느려질 수 있어, 실시간 처리가 중요한 시스템에서는 문제가 될 수 있습니다.</p></li> </ul> -<p>이러한 문제들에 대한 해결책으로 Rust는 소유권, 빌림, 그리고 수명을 기반으로 한 메모리 관리 시스템을 도입하였습니다. +<p>이러한 문제들에 대한 해결책으로 Rust는 소유권, 빌림, 그리고 수명을 기반으로 한 메모리 관리 시스템을 도입하였습니다.<br /> 이를 통해 컴파일 시간에 메모리 안전성을 보장하며, 가비지 컬렉터의 성능 오버헤드를 피할 수 있습니다.</p> <div class="bottomnav"> <span class="back"><a href="19_ko.html" rel="prev">❮ 이전</a></span> diff --git a/docs/index.html b/docs/index.html index 1172aecb8b0b87de2e4d6e5f39cc0bcc12290fa0..afc2baaf4475d8a4a70d13d5028808dd7db62dd9 100644 --- a/docs/index.html +++ b/docs/index.html @@ -37,14 +37,17 @@ <div class="page"> <h1>Hello World!</h1> <p><img src="/intro.webp" alt="Welcome to Rust" style="width: 100%; margin-bottom: 20px; border-radius: 10px;"></p> +<p><strong>튜토리얼 소개 🎉</strong></p> +<p>Rust 튜토리얼 기본편 영상을 위한 웹사이트입니다.</p> +<p>키보드 <span class="emoji">⬅️</span>/<span class="emoji">➡️</span> 버튼으로 페이지를 이동할 수 있습니다.</p> +<p>프로그래밍 기초 지식이 있는 분들을 대상으로 만들었습니다. (C, Python, Java 등)</p> +<p>X분짜리 영상 총 Y편으로 구성되어 있고, 튜토리얼의 콘텐츠는 아래 링크들로 볼 수 있습니다.</p> <p>Mirror 1: <a href="http://rust-study.ajousw.kr/index.html" target="_blank" rel="noopener">http://rust-study.ajousw.kr/</a></p> <p>Mirror 2: <a href="https://hi-rust.github.io/index.html" target="_blank" rel="noopener">https://hi-rust.github.io/</a></p> <p>Binary: Windows/Mac/Ubuntu22.04 <a href="https://github.com/Hi-Rust/hi-rust.github.io/releases" target="_blank" rel="noopener">@다운로드</a></p> -<p><strong>자기주도프로젝트 🎉</strong></p> -<p>안녕하세요. 자기주도프로젝트 Rust 튜토리얼 영상을 위한 웹사이트입니다.</p> -<p><code>프로그래밍 기초 지식이 있는 분들을 타겟</code>으로 만들었습니다. (C & Python)</p> -<p>키보드 <span class="emoji">⬅️</span>/<span class="emoji">➡️</span> 버튼으로 페이지를 이동할 수 있습니다.</p> <p>질문이 있다면 <code>ikr@kakao.com</code> 로 메일 남겨주세요.</p> +<hr /> +<p><strong>챕터 🎯</strong></p> <ul> <li>Rust 언어 소개</li> <li>Rust 언어 기본 문법</li> @@ -53,6 +56,9 @@ <li>Rust 언어로 Python 언어 라이브러리 제작</li> <li>Rust 언어 웹 프레임워크를 이용한 카카오톡 챗봇 서버 제작</li> </ul> +<blockquote> + <p>이 컨텐츠는 2022년 과학기술정보통신부 및 정보통신기획평가원의 SW중심대학사업의 연구결과로 제작되었습니다. (2022-0-01077)</p> +</blockquote> <div class="bottomnav"> <span class="next"><a href="01_ko.html" rel="next">다음 ❯</a></span> diff --git a/docs/tour.css b/docs/tour.css index 78f8133a00afa50d5b5fc6622c9bba1966719f99..07b322d3e707c415bd5ed44035f3c4cfc401f14d 100644 --- a/docs/tour.css +++ b/docs/tour.css @@ -12,7 +12,6 @@ a:focus { } pre > code, -code, .code-badge { font-family: "Fira Code", monospace; } @@ -64,7 +63,7 @@ blockquote { } code { - /* font-family: Consolas, monospace; */ + font-family: "Noto Sans KR", sans-serif; font-size: 1.1em; font-weight: 500; padding: 0.3em; diff --git a/docs/tour.js b/docs/tour.js index f7ca1489c29ade267c563ae3fff07308acaba934..ff1e295d260d631fad0cd2bb843544ece9501dc9 100644 --- a/docs/tour.js +++ b/docs/tour.js @@ -1,18 +1,3 @@ -// var page = document.querySelector("div.tour"); - -// console.log(page); - -// var hammer = new Hammer(document.body); - -// hammer.on("swipeleft", function () { -// console.log("Left"); -// triggerLinkClick("next"); -// }); - -// hammer.on("swiperight", function () { -// triggerLinkClick("back"); -// }); - const triggerLinkClick = direction => { const link = document.querySelector(`.${direction} a`); if (link) { @@ -66,6 +51,15 @@ const handleTouchMove = evt => { } }; +let activeEl = null; +document.addEventListener( + "focus", + event => { + activeEl = event.target; + }, + true +); + const setupKeys = () => { // PC document.body.addEventListener("keyup", e => { @@ -78,6 +72,20 @@ const setupKeys = () => { return; } + // check if the active element has a scrollable parent + const hasScrollableParent = el => el.scrollWidth > el.clientWidth; + let el = document.activeElement; + while (el) { + if (el === document.body) { + break; // stop checking if we reach the body element + } + if (hasScrollableParent(el) && el.tagName !== "A") { + e.preventDefault(); + return; + } + el = el.parentElement; + } + if (e.key === "Right" || e.key === "ArrowRight") { triggerLinkClick("next"); } diff --git a/frontend/.gitignore b/frontend/.gitignore index c4786b9d232f0c1486de74ac83ca8cd9c2be34a0..98907f32124fdbf94b0e0440fa5e573b2048e3ca 100644 --- a/frontend/.gitignore +++ b/frontend/.gitignore @@ -2,4 +2,5 @@ lessons.json docs/*.html node_modules .vscode -node_modules \ No newline at end of file +node_modules +__pycache__ \ No newline at end of file diff --git a/frontend/generate.js b/frontend/generate.js index 057b69894b1136a6f732678c620359226d151123..223fe4c21250f1b8375acb9e0bb0379ad1e56d63 100644 --- a/frontend/generate.js +++ b/frontend/generate.js @@ -136,6 +136,7 @@ const converter = new showdown.Converter({ }); converter.setOption("parseImgDimensions", true); +converter.setOption("simpleLineBreaks", true); /** * @param {string[]} words @@ -413,6 +414,10 @@ languages.forEach(lang => { .join("\n")} </ul> </div> + <div style="display: flex;flex-direction: column;justify-content: center;align-items: center;"> + <img style="display: block; margin: 0 auto;" src="/ajou.webp"></img><br/> + <p>이 컨텐츠는 2022년 과학기술정보통신부 및 정보통신기획평가원의 SW중심대학사업의 연구결과로 제작되었습니다.<br/>(2022-0-01077)</p> + </div> </div> </body> </html>` diff --git a/frontend/lessons/ko/chapter_0.yaml b/frontend/lessons/ko/chapter_0.yaml index 66762fd387cb7d0d91a5abf935fc990a4b98bd63..f66216931bd091fa7cf83518637d5ca727320ebe 100644 --- a/frontend/lessons/ko/chapter_0.yaml +++ b/frontend/lessons/ko/chapter_0.yaml @@ -5,29 +5,43 @@ content_markdown: | <img src="/intro.webp" alt="Welcome to Rust" style="width: 100%; margin-bottom: 20px; border-radius: 10px;"> - Mirror 1: [http://rust-study.ajousw.kr/](http://rust-study.ajousw.kr/index.html) + **튜토리얼 소개 🎉** - Mirror 2: [https://hi-rust.github.io/](https://hi-rust.github.io/index.html) - Binary: Windows/Mac/Ubuntu22.04 [@다운로드](https://github.com/Hi-Rust/hi-rust.github.io/releases) + Rust 튜토리얼 기본편 영상을 위한 웹사이트입니다. - **자기주도프로젝트 🎉** + 키보드 <span class="emoji">⬅️</span>/<span class="emoji">➡️</span> 버튼으로 페이지를 이동할 수 있습니다. - 안녕하세요. 자기주도프로젝트 Rust 튜토리얼 영상을 위한 웹사이트입니다. - `프로그래밍 기초 지식이 있는 분들을 타겟`으로 만들었습니다. (C & Python) + 프로그래밍 기초 지식이 있는 분들을 대상으로 만들었습니다. (C, Python, Java 등) - 키보드 <span class="emoji">⬅️</span>/<span class="emoji">➡️</span> 버튼으로 페이지를 이동할 수 있습니다. + + X분짜리 영상 총 Y편으로 구성되어 있고, 튜토리얼의 콘텐츠는 아래 링크들로 볼 수 있습니다. + + + Mirror 1: [http://rust-study.ajousw.kr/](http://rust-study.ajousw.kr/index.html) + + Mirror 2: [https://hi-rust.github.io/](https://hi-rust.github.io/index.html) + + Binary: Windows/Mac/Ubuntu22.04 [@다운로드](https://github.com/Hi-Rust/hi-rust.github.io/releases) 질문이 있다면 <code>ikr@kakao.com</code> 로 메일 남겨주세요. + --- + + **챕터 🎯** + - Rust 언어 소개 - Rust 언어 기본 문법 - Rust 언어 고급 (비동기, Unsafe, 매크로 등) - Rust 언어 간단한 유저 라이브러리 제작 및 업로드 - Rust 언어로 Python 언어 라이브러리 제작 - Rust 언어 웹 프레임워크를 이용한 카카오톡 챗봇 서버 제작 + + + + > 이 컨텐츠는 2022년 과학기술정보통신부 및 정보통신기획평가원의 SW중심대학사업의 연구결과로 제작되었습니다. (2022-0-01077) - title: >- Rust 언어 소개 code: >- @@ -72,7 +86,7 @@ <h3>Stackoverflow survey @ 2022</h3> </div> - 2022년 Stack Overflow 개발자 설문조사 기준으로 Rust는 "가장 사랑받는 언어" 부문에서 `7년 연속`으로 1위를 차지할 정도입니다. + 2022년 Stack Overflow 개발자 설문조사 기준으로<br/>Rust는 "가장 사랑받는 언어" 부문에서 `7년 연속`으로 1위를 차지할 정도입니다. 실제 예로 IT 대기업들 Facebook, Google, Mozilla 등이 Rust를 사용하고 있습니다. diff --git a/frontend/lessons/ko/chapter_1.yaml b/frontend/lessons/ko/chapter_1.yaml index 0b8e402e99afddb44d95b8916345d289e06fcb6a..8c0e32b22a5bd45f77e0b679aab3a8e300dd7700 100644 --- a/frontend/lessons/ko/chapter_1.yaml +++ b/frontend/lessons/ko/chapter_1.yaml @@ -83,7 +83,7 @@ - title: 변수 업데이트 code: >- - https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&code=fn%20main()%20%7B%0A%20%20%20%20let%20mut%20x%20%3D%2042%3B%0A%20%20%20%20println!(%22%7B%7D%22%2C%20x)%3B%0A%20%20%20%20x%20%3D%2013%3B%0A%20%20%20%20println!(%22%7B%7D%22%2C%20x)%3B%0A%7D%0A + https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&code=fn+main%28%29+%7B%0A++++let+mut+x+%3D+42%3B%0A++++println%21%28%22%7B%7D%22%2C+x%29%3B%0A++++x+%3D+13%3B%0A++++println%21%28%22%7B%7D%22%2C+x%29%3B%0A%0A++++let+y+%3D+23%3B%0A++++println%21%28%22%7B%7D%22%2C+y%29%3B%0A++++%2F%2F+y+%3D+9%3B++%2F%2F+%EC%97%90%EB%9F%AC%0A%7D%0A content_markdown: > Rust는 변수가 변경 가능한지 여부에 대해 많은 주의를 기울입니다. @@ -187,6 +187,24 @@ 힌트: 함수를 정의하는 경우, 해당 함수가 수신하는 데이터를 매개변수 (parameter)라고합니다. 그 함수를 호출하고 데이터를 전달하면 인수(argument)라고합니다. + + + ```python + + def add(x: int, y: int) -> int: + return x + y + + def subtract(x: int, y: int) -> int: + return x - y + + def main(): + print(f"42 + 13 = {add(42, 13)}") + print(f"42 - 13 = {subtract(42, 13)}") + + + if __name__ == "__main__": + main() + ``` - title: Multiple Return Values code: >- https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&code=fn%20swap(x%3A%20i32%2C%20y%3A%20i32)%20-%3E%20(i32%2C%20i32)%20%7B%0A%20%20%20%20return%20(y%2C%20x)%3B%0A%7D%0A%0Afn%20main()%20%7B%0A%20%20%20%20%2F%2F%20return%20a%20tuple%20of%20return%20values%0A%20%20%20%20let%20result%20%3D%20swap(123%2C%20321)%3B%0A%20%20%20%20println!(%22%7B%7D%20%7B%7D%22%2C%20result.0%2C%20result.1)%3B%0A%0A%20%20%20%20%2F%2F%20destructure%20the%20tuple%20into%20two%20variables%20names%0A%20%20%20%20let%20(a%2C%20b)%20%3D%20swap(result.0%2C%20result.1)%3B%0A%20%20%20%20println!(%22%7B%7D%20%7B%7D%22%2C%20a%2C%20b)%3B%0A%7D%0A @@ -270,7 +288,7 @@ name: String, age: u8, } - %end + %end% 구조체의 인스턴스를 생성하려면, 구조체 이름 뒤에 중괄호를 사용하고 필드에 값을 할당합니다.