diff --git a/404.html b/404.html index c68a2001..b731a35a 100644 --- a/404.html +++ b/404.html @@ -10,13 +10,13 @@ - +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- + \ No newline at end of file diff --git a/CONTRIBUTING.html b/CONTRIBUTING.html index 4b3701b2..8529517b 100644 --- a/CONTRIBUTING.html +++ b/CONTRIBUTING.html @@ -8,13 +8,13 @@ - + - +
Skip to main content

Contribution & Tech Stack

Ebook Dasar Pemrograman Rust adalah project open source. Siapapun bebas untuk berkontribusi di sini, bisa dalam bentuk perbaikan typo, update kalimat, maupun submit tulisan baru.

Bagi kawan-kawan yang berminat untuk berkontribusi, silakan fork github.com/novalagung/dasarpemrogramanrust, kemudian langsung saja cek/buat issue kemudian submit relevan pull request untuk issue tersebut 😊

Checkout project

git clone https://github.com/novalagung/dasarpemrogramanrust.git
git submodule update --init --recursive --remote

Maintainer

E-book ini di-inisialisasi dan di-maintain oleh Noval Agung Prayogo.

Contributors

Berikut merupakan hall of fame kontributor yang sudah berbaik hati menyisihkan waktunya untuk membantu pengembangan e-book ini.

  1. Acep Saepudin
  2. Afifurrohman
  3. Fal
  4. Fredianto
  5. I Putu Saputrayana
  6. Khisby Al Ghofari
  7. Lori
  8. M. Zakiyuddin Munziri
  9. Opa Kholis Majid
  10. Rian
  11. Shandy Siswandi
  12. Theis Andatu
  13. ... anda :-)

Ebook/webhook techstack & architecture

Jika pembaca tertarik untuk membuat konten ebook berbasis web sekaligus versi PDF file-nya, bisa menggunakan link berikut sebagai referensi:

https://medium.com/geekculture/serverless-e-book-web-book-using-docusaurus-v2-github-pages-actions-and-pdf-tools-4fef54847b85

Tools yang digunakan:

Desain arsitektur:

Dasar pemrograman python

- + \ No newline at end of file diff --git a/LICENSE.html b/LICENSE.html index 256ffc87..e95dc8e8 100644 --- a/LICENSE.html +++ b/LICENSE.html @@ -8,13 +8,13 @@ - + - +
Skip to main content

Lisensi & Distribusi Konten

Ebook Dasar Pemrograman Rust gratis untuk disebarluaskan secara bebas, dengan catatan sesuai dengan aturan lisensi CC BY-SA 4.0 yang kurang lebih sebagai berikut:

  • Diperbolehkan menyebar, mencetak, dan menduplikasi material dalam konten ini ke siapapun.
  • Diperbolehkan memodifikasi, mengubah, atau membuat konten baru menggunakan material yang ada dalam ebook ini untuk keperluan komersil maupun tidak.

Dengan catatan:

  • Harus ada credit sumber aslinya, yaitu Dasar Pemrograman Rust atau novalagung
  • Tidak mengubah lisensi aslinya, yaitu CC BY-SA 4.0
  • Tidak ditambahi restrictions baru
  • Lebih jelasnya silakan cek https://creativecommons.org/licenses/by-sa/4.0/.

FOSSA Status

- + \ No newline at end of file diff --git a/assets/js/496dcc30.2c33b3bd.js b/assets/js/496dcc30.2c33b3bd.js new file mode 100644 index 00000000..8685567c --- /dev/null +++ b/assets/js/496dcc30.2c33b3bd.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdasarpemrogramanrust=self.webpackChunkdasarpemrogramanrust||[]).push([[4738],{3905:(a,e,n)=>{n.d(e,{Zo:()=>s,kt:()=>k});var t=n(7294);function i(a,e,n){return e in a?Object.defineProperty(a,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):a[e]=n,a}function r(a,e){var n=Object.keys(a);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(a);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable}))),n.push.apply(n,t)}return n}function l(a){for(var e=1;e=0||(i[n]=a[n]);return i}(a,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(a);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(a,n)&&(i[n]=a[n])}return i}var o=t.createContext({}),u=function(a){var e=t.useContext(o),n=e;return a&&(n="function"==typeof a?a(e):l(l({},e),a)),n},s=function(a){var e=u(a.components);return t.createElement(o.Provider,{value:e},a.children)},d={inlineCode:"code",wrapper:function(a){var e=a.children;return t.createElement(t.Fragment,{},e)}},m=t.forwardRef((function(a,e){var n=a.components,i=a.mdxType,r=a.originalType,o=a.parentName,s=p(a,["components","mdxType","originalType","parentName"]),m=u(n),k=i,g=m["".concat(o,".").concat(k)]||m[k]||d[k]||r;return n?t.createElement(g,l(l({ref:e},s),{},{components:n})):t.createElement(g,l({ref:e},s))}));function k(a,e){var n=arguments,i=e&&e.mdxType;if("string"==typeof a||i){var r=n.length,l=new Array(r);l[0]=m;var p={};for(var o in e)hasOwnProperty.call(e,o)&&(p[o]=e[o]);p.originalType=a,p.mdxType="string"==typeof a?a:i,l[1]=p;for(var u=2;u{n.r(e),n.d(e,{assets:()=>o,contentTitle:()=>l,default:()=>d,frontMatter:()=>r,metadata:()=>p,toc:()=>u});var t=n(7462),i=(n(7294),n(3905));const r={sidebar_position:1,title:"A.1. Program Pertama \u279c Hello Rust",sidebar_label:"A.1. Program Pertama \u279c Hello Rust",description:"Belajar membuat program hello world di Rust, dimulai dengan pembuatan program Hello World sederhana.",keywords:["rust","belajar rust","hello world","hello rust"]},l=void 0,p={unversionedId:"basic/hello-rust",id:"basic/hello-rust",title:"A.1. Program Pertama \u279c Hello Rust",description:"Belajar membuat program hello world di Rust, dimulai dengan pembuatan program Hello World sederhana.",source:"@site/docs/basic/hello-rust.md",sourceDirName:"basic",slug:"/basic/hello-rust",permalink:"/basic/hello-rust",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1,title:"A.1. Program Pertama \u279c Hello Rust",sidebar_label:"A.1. Program Pertama \u279c Hello Rust",description:"Belajar membuat program hello world di Rust, dimulai dengan pembuatan program Hello World sederhana.",keywords:["rust","belajar rust","hello world","hello rust"]},sidebar:"tutorialSidebar",previous:{title:"Rust Editor & Plugin",permalink:"/installation/rust-editor-plugin"},next:{title:"A.2. Build dan Run Program Rust",permalink:"/basic/build-dan-run-program-rust"}},o={},u=[{value:"A.1.1. Pembuatan project/package",id:"a11-pembuatan-projectpackage",level:2},{value:"A.1.2. Run project Hello Rust",id:"a12-run-project-hello-rust",level:2},{value:"A.1.3. Penjelasan blok kode main.rs",id:"a13-penjelasan-blok-kode-mainrs",level:2},{value:"\u25c9 Notasi pendefinisian fungsi",id:"-notasi-pendefinisian-fungsi",level:3},{value:"\u25c9 Notasi pemanggilan fungsi",id:"-notasi-pemanggilan-fungsi",level:3},{value:"\u25c9 Macro println",id:"-macro-println",level:3},{value:"\u25c9 Notasi penulisan statement",id:"-notasi-penulisan-statement",level:3},{value:"\u25c9 Indentation",id:"-indentation",level:3},{value:"Catatan chapter \ud83d\udcd1",id:"catatan-chapter-",level:2},{value:"\u25c9 Source code praktik",id:"-source-code-praktik",level:3},{value:"\u25c9 Referensi",id:"-referensi",level:3}],s={toc:u};function d(a){let{components:e,...r}=a;return(0,i.kt)("wrapper",(0,t.Z)({},s,r,{components:e,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Seperti pada umumnya bahasa pemrograman, belajar membuat program pasti diawali dengan aplikasi ",(0,i.kt)("inlineCode",{parentName:"p"},"Hello World"),", dan pada chapter ini kita akan melakukannya. Kita akan buat program bernama ",(0,i.kt)("inlineCode",{parentName:"p"},"Hello Rust")," menggunakan pemrograman Rust."),(0,i.kt)("h2",{id:"a11-pembuatan-projectpackage"},"A.1.1. Pembuatan project/package"),(0,i.kt)("p",null,"Pembuatan project baru di Rust bisa dilakukan dengan 2 cara, dengan ",(0,i.kt)("inlineCode",{parentName:"p"},"cargo")," atau tanpanya. Di sini kita akan skip bagian pembuatan project tanpa ",(0,i.kt)("inlineCode",{parentName:"p"},"cargo"),", karena akan butuh effort lebih banyak nantinya dalam mengelola package dan manajemen build."),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"Di Rust istilah project lebih dikenal dengan ",(0,i.kt)("strong",{parentName:"p"},"package"),", dan pada ebook ini maknanya adalah sama.")),(0,i.kt)("p",null,"Ok langsung saja, buat project baru dengan mengeksekusi command berikut:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"cargo new hello_rust\ncd hello_rust\n")),(0,i.kt)("p",null,"Command di atas menghasilkan sebuah folder baru bernama ",(0,i.kt)("inlineCode",{parentName:"p"},"hello_rust")," dengan isi beberapa file:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"Cargo.toml")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},".gitignore")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"src/main.rs"))),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Struktur project hello_rust",src:n(4222).Z,width:"126",height:"129"})),(0,i.kt)("p",null,"File ",(0,i.kt)("inlineCode",{parentName:"p"},"src/main.rs")," adalah file penting dalam pemrograman Rust. File ",(0,i.kt)("inlineCode",{parentName:"p"},"main.rs")," merupakan file pertama yang dipanggil saat proses build program Rust (yang kemudian di-run). Source code program harus berada dalam folder ",(0,i.kt)("inlineCode",{parentName:"p"},"src"),"."),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"Pembahasan detail mengenai file ",(0,i.kt)("inlineCode",{parentName:"p"},"Cargo.toml")," nantinya ada pada chapter ",(0,i.kt)("a",{parentName:"p",href:"/basic/package-crate"},"Module System \u279c Package & Crate"),". Untuk sekarang penulis anjurkan untuk mengikuti pembelajaran tiap chapter secara urut.")),(0,i.kt)("h2",{id:"a12-run-project-hello-rust"},"A.1.2. Run project ",(0,i.kt)("inlineCode",{parentName:"h2"},"Hello Rust")),(0,i.kt)("p",null,"Sebelum membahas isi kode program dalam ",(0,i.kt)("inlineCode",{parentName:"p"},"main.rs"),", ada baiknya kita run terlebih dahulu program ini untuk melihat hasilnya. Jalankan command berikut untuk run program."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"cargo run\n")),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Run project hello_rust",src:n(5872).Z,width:"470",height:"315"})),(0,i.kt)("p",null,"Bisa dilihat pada gambar di atas pesan ",(0,i.kt)("inlineCode",{parentName:"p"},"Hello, world!")," yang ada dalam file ",(0,i.kt)("inlineCode",{parentName:"p"},"main.rs")," muncul, menandakan proses eksekusi program sukses."),(0,i.kt)("p",null,"Command ",(0,i.kt)("inlineCode",{parentName:"p"},"cargo run")," digunakan untuk menjalankan aplikasi saat proses development. Perlu diingat bahwa Rust merupakan bahasa pemrograman yang kategorinya ",(0,i.kt)("inlineCode",{parentName:"p"},"compiled language")," yang artinya kode program akan dikompilasi terlebih dahulu untuk menghasilkan file binary, dan kemudian file binary itulah yang dijalankan."),(0,i.kt)("p",null,"Command ",(0,i.kt)("inlineCode",{parentName:"p"},"cargo run")," merupakan shorthand untuk memperpendek proses kompilasi dan eksekusi. Dalam command tersebut, kode program akan di-compile terlebih dahulu, dan hasilnya adalah file executable binary bernama ",(0,i.kt)("inlineCode",{parentName:"p"},"hello_rust.exe")," (karena penulis menggunakan windows). File binary tersebut berada dalam project dalam path ",(0,i.kt)("inlineCode",{parentName:"p"},"hello_rust/target/debug/hello_rust.exe"),". Setelah proses kompilasi, file binary tersebut dijalankan, dan hasilnya adalah pesan ",(0,i.kt)("inlineCode",{parentName:"p"},"Hello, world!")," yang muncul di layar"),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"Untuk pengguna windows, file binary akan ber-ekstensi ",(0,i.kt)("inlineCode",{parentName:"p"},".exe")," seperti pada contoh yaitu ",(0,i.kt)("inlineCode",{parentName:"p"},"hello_rust.exe"),". Sedangkan untuk non-windows, file tidak mempunyai ekstensi, ",(0,i.kt)("inlineCode",{parentName:"p"},"hello_rust"),".")),(0,i.kt)("p",null,"Command ",(0,i.kt)("inlineCode",{parentName:"p"},"cargo run")," akan sering kita pakai dalam proses development."),(0,i.kt)("h2",{id:"a13-penjelasan-blok-kode-mainrs"},"A.1.3. Penjelasan blok kode ",(0,i.kt)("inlineCode",{parentName:"h2"},"main.rs")),(0,i.kt)("p",null,"Berikut adalah isi (default) dari file ",(0,i.kt)("inlineCode",{parentName:"p"},"main.rs"),", dan kita akan bahas setiap barisnya (hanya 3 baris)."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-rust",metastring:'title="src/main.rs"',title:'"src/main.rs"'},'fn main() {\n println!("Hello, world!");\n}\n')),(0,i.kt)("h3",{id:"-notasi-pendefinisian-fungsi"},"\u25c9 Notasi pendefinisian fungsi"),(0,i.kt)("p",null,"Pembuatan fungsi di Rust menggunakan keyword ",(0,i.kt)("inlineCode",{parentName:"p"},"fn")," dengan notasi penulisan sebagai berikut, contoh:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"fn nama_fungsi() {\n\n}\n")),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"nama_fungsi")," di atas adalah nama fungsi. Pada program yang sudah kita buat, fungsi bernama ",(0,i.kt)("inlineCode",{parentName:"p"},"main"),". Penulisan nama fungsi diikuti dengan ",(0,i.kt)("inlineCode",{parentName:"p"},"()")," kemudian kurung kurawal ",(0,i.kt)("inlineCode",{parentName:"p"},"{ }"),"."),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Sintaks ",(0,i.kt)("inlineCode",{parentName:"li"},"()")," nantinya bisa diisi dengan definisi parameter. Pada contoh ini tidak ada parameter yang ditulis."),(0,i.kt)("li",{parentName:"ul"},"Sintaks ",(0,i.kt)("inlineCode",{parentName:"li"},"{}")," dituliskan dalam baris berbeda, isinya adalah kode program.")),(0,i.kt)("h3",{id:"-notasi-pemanggilan-fungsi"},"\u25c9 Notasi pemanggilan fungsi"),(0,i.kt)("p",null,"Notasi penulisan pemanggilan fungsi adalah cukup dengan menuliskan nama fungsinya kemudian diikuti dengan ",(0,i.kt)("inlineCode",{parentName:"p"},"()"),", seperti berikut:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"nama_fungsi();\n")),(0,i.kt)("p",null,"Jika ada argument parameter yang perlu disisipkan saat pemanggilan fungsi, dituliskan di antara kurung ",(0,i.kt)("inlineCode",{parentName:"p"},"()"),". Contoh pemanggilan ",(0,i.kt)("inlineCode",{parentName:"p"},"sebuahFungsi")," dengan argument berupa string ",(0,i.kt)("inlineCode",{parentName:"p"},'"sebuah argument"'),"."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},'sebuahFungsi("sebuah argument");\n')),(0,i.kt)("p",null,"Ok, sampai sini penulis rasa cukup jelas. Sekarang kita fokus ke ",(0,i.kt)("inlineCode",{parentName:"p"},"println"),", ada yang aneh dengan pemanggilan fungsi ini. Kenapa ",(0,i.kt)("inlineCode",{parentName:"p"},"println")," tidak dituliskan dalam bentuk ",(0,i.kt)("inlineCode",{parentName:"p"},'println("Hello, world!")')," melainkan ",(0,i.kt)("inlineCode",{parentName:"p"},'println!("Hello, world!")'),"?"),(0,i.kt)("p",null,"Sekadar informasi saja, berdasarkan versi Rust terbaru, tidak ada fungsi bernama ",(0,i.kt)("inlineCode",{parentName:"p"},"println"),", yang ada adalah macro bernama ",(0,i.kt)("inlineCode",{parentName:"p"},"println"),"."),(0,i.kt)("h3",{id:"-macro-println"},"\u25c9 Macro ",(0,i.kt)("inlineCode",{parentName:"h3"},"println")),(0,i.kt)("p",null,"Agar pembaca tidak bertambah bingung, setidaknya untuk sekarang pada chapter awal ini anggap saja macro adalah fungsi ... tapi sedikit berbeda. Yang paling terlihat bedanya secara sintaktis adalah tanda ",(0,i.kt)("inlineCode",{parentName:"p"},"!"),". Pemanggilan macro pasti diikuti tanda ",(0,i.kt)("inlineCode",{parentName:"p"},"!")," sebelum ",(0,i.kt)("inlineCode",{parentName:"p"},"()"),". Contoh:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-rust"},'println!("Hello, world!");\n')),(0,i.kt)("p",null,"Macro ",(0,i.kt)("inlineCode",{parentName:"p"},"println")," digunakan untuk menampilkan string atau pesan ke console output (",(0,i.kt)("inlineCode",{parentName:"p"},"stdout"),") dan diikuti oleh baris baru (newline/enter). Agar lebih jelas jalankan kode berikut:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-rust",metastring:'title="src/main.rs"',title:'"src/main.rs"'},'fn main() {\n println!("Hello, world!");\n println!("How");\n println!("are");\n println!("you?");\n}\n')),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"println macro",src:n(7465).Z,width:"514",height:"401"})),(0,i.kt)("p",null,"Bisa dilihat, setiap pesan yang ditampilkan menggunakan macro ",(0,i.kt)("inlineCode",{parentName:"p"},"println")," muncul di baris baru."),(0,i.kt)("h3",{id:"-notasi-penulisan-statement"},"\u25c9 Notasi penulisan statement"),(0,i.kt)("p",null,"Di Rust, statement harus diikuti dengan tanda ",(0,i.kt)("inlineCode",{parentName:"p"},";")," atau titik koma. Wajib hukumnya. Tanpa tanda ",(0,i.kt)("inlineCode",{parentName:"p"},";")," maka beberapa statement akan dianggap 1 baris dan kemungkinan menghasilkan error jika sintaks dianggap tidak valid. Tanda ",(0,i.kt)("inlineCode",{parentName:"p"},";")," adalah penanda akhir statement. Contoh ",(0,i.kt)("inlineCode",{parentName:"p"},'println!("Hello, world!");'),"."),(0,i.kt)("h3",{id:"-indentation"},"\u25c9 Indentation"),(0,i.kt)("p",null,"Mengacu ke keterangan pada dokumentasi Rust, standar indentasi untuk kode program Rust adalah ",(0,i.kt)("inlineCode",{parentName:"p"},"4 space characters")," atau 4 karakter space."),(0,i.kt)("hr",null),(0,i.kt)("p",null,"Ok, penulis rasa cukup untuk program pertama ini, semoga tidak membingungkan. Silakan diulang-ulang jika perlu. Jika sudah siap, kita akan lanjut ke pembahasan dasar pemrograman Rust pada chapter berikutnya."),(0,i.kt)("p",null,"Selamat! Anda telah menjadi programmer Rust!"),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"catatan-chapter-"},"Catatan chapter \ud83d\udcd1"),(0,i.kt)("h3",{id:"-source-code-praktik"},"\u25c9 Source code praktik"),(0,i.kt)("pre",null,(0,i.kt)("a",{href:"https://github.com/novalagung/dasarpemrogramanrust-example/tree/master/hello_rust"},"github.com/novalagung/dasarpemrogramanrust-example/../hello_rust")),(0,i.kt)("h3",{id:"-referensi"},"\u25c9 Referensi"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"https://doc.rust-lang.org/book/ch01-03-hello-cargo.html"},"https://doc.rust-lang.org/book/ch01-03-hello-cargo.html")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"https://doc.rust-lang.org/std/macro.println.html"},"https://doc.rust-lang.org/std/macro.println.html")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"https://doc.rust-lang.org/rust-by-example/hello/print.html"},"https://doc.rust-lang.org/rust-by-example/hello/print.html"))))}d.isMDXComponent=!0},4222:(a,e,n)=>{n.d(e,{Z:()=>t});const t="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAH4AAACBCAIAAACJhZkTAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAFGGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNy4xLWMwMDAgMTE2LjM5YWJhZjcsIDIwMjIvMDIvMjUtMjE6NTc6MjEgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kY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(e,{Z:()=>t});const t=n.p+"assets/images/hello-rust-2-275752b62e2a0b25dbf8ee21f9817ea0.png"},7465:(a,e,n)=>{n.d(e,{Z:()=>t});const t=n.p+"assets/images/hello-rust-3-6c6265ba2c94ac92baf92b864094ca1c.png"}}]); \ No newline at end of file diff --git a/assets/js/496dcc30.a168eb53.js b/assets/js/496dcc30.a168eb53.js deleted file mode 100644 index 454f3a57..00000000 --- a/assets/js/496dcc30.a168eb53.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdasarpemrogramanrust=self.webpackChunkdasarpemrogramanrust||[]).push([[4738],{3905:(a,e,n)=>{n.d(e,{Zo:()=>s,kt:()=>k});var t=n(7294);function i(a,e,n){return e in a?Object.defineProperty(a,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):a[e]=n,a}function r(a,e){var n=Object.keys(a);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(a);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable}))),n.push.apply(n,t)}return n}function l(a){for(var e=1;e=0||(i[n]=a[n]);return i}(a,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(a);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(a,n)&&(i[n]=a[n])}return i}var o=t.createContext({}),u=function(a){var e=t.useContext(o),n=e;return a&&(n="function"==typeof a?a(e):l(l({},e),a)),n},s=function(a){var e=u(a.components);return t.createElement(o.Provider,{value:e},a.children)},d={inlineCode:"code",wrapper:function(a){var e=a.children;return t.createElement(t.Fragment,{},e)}},m=t.forwardRef((function(a,e){var n=a.components,i=a.mdxType,r=a.originalType,o=a.parentName,s=p(a,["components","mdxType","originalType","parentName"]),m=u(n),k=i,g=m["".concat(o,".").concat(k)]||m[k]||d[k]||r;return n?t.createElement(g,l(l({ref:e},s),{},{components:n})):t.createElement(g,l({ref:e},s))}));function k(a,e){var n=arguments,i=e&&e.mdxType;if("string"==typeof a||i){var r=n.length,l=new Array(r);l[0]=m;var p={};for(var o in e)hasOwnProperty.call(e,o)&&(p[o]=e[o]);p.originalType=a,p.mdxType="string"==typeof a?a:i,l[1]=p;for(var u=2;u{n.r(e),n.d(e,{assets:()=>o,contentTitle:()=>l,default:()=>d,frontMatter:()=>r,metadata:()=>p,toc:()=>u});var t=n(7462),i=(n(7294),n(3905));const r={sidebar_position:1,title:"A.1. Program Pertama \u279c Hello Rust",sidebar_label:"A.1. Program Pertama \u279c Hello Rust",description:"Belajar membuat program hello world di Rust, dimulai dengan pembuatan program Hello World sederhana.",keywords:["rust","belajar rust","hello world","hello rust"]},l=void 0,p={unversionedId:"basic/hello-rust",id:"basic/hello-rust",title:"A.1. Program Pertama \u279c Hello Rust",description:"Belajar membuat program hello world di Rust, dimulai dengan pembuatan program Hello World sederhana.",source:"@site/docs/basic/hello-rust.md",sourceDirName:"basic",slug:"/basic/hello-rust",permalink:"/basic/hello-rust",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1,title:"A.1. Program Pertama \u279c Hello Rust",sidebar_label:"A.1. Program Pertama \u279c Hello Rust",description:"Belajar membuat program hello world di Rust, dimulai dengan pembuatan program Hello World sederhana.",keywords:["rust","belajar rust","hello world","hello rust"]},sidebar:"tutorialSidebar",previous:{title:"Rust Editor & Plugin",permalink:"/installation/rust-editor-plugin"},next:{title:"A.2. Build dan Run Program Rust",permalink:"/basic/build-dan-run-program-rust"}},o={},u=[{value:"A.1.1. Pembuatan project/package",id:"a11-pembuatan-projectpackage",level:2},{value:"A.1.2. Run project Hello Rust",id:"a12-run-project-hello-rust",level:2},{value:"A.1.3. Penjelasan blok kode main.rs",id:"a13-penjelasan-blok-kode-mainrs",level:2},{value:"\u25c9 Notasi pendefinisian fungsi",id:"-notasi-pendefinisian-fungsi",level:3},{value:"\u25c9 Notasi pemanggilan fungsi",id:"-notasi-pemanggilan-fungsi",level:3},{value:"\u25c9 Macro println",id:"-macro-println",level:3},{value:"\u25c9 Notasi penulisan statement",id:"-notasi-penulisan-statement",level:3},{value:"\u25c9 Indentation",id:"-indentation",level:3},{value:"Catatan chapter \ud83d\udcd1",id:"catatan-chapter-",level:2},{value:"\u25c9 Source code praktik",id:"-source-code-praktik",level:3},{value:"\u25c9 Referensi",id:"-referensi",level:3}],s={toc:u};function d(a){let{components:e,...r}=a;return(0,i.kt)("wrapper",(0,t.Z)({},s,r,{components:e,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Seperti pada umumnya bahasa pemrograman, belajar membuat program pasti diawali dengan aplikasi ",(0,i.kt)("inlineCode",{parentName:"p"},"Hello World"),", dan pada chapter ini kita akan melakukannya. Kita akan buat program bernama ",(0,i.kt)("inlineCode",{parentName:"p"},"Hello Rust")," menggunakan pemrograman Rust."),(0,i.kt)("h2",{id:"a11-pembuatan-projectpackage"},"A.1.1. Pembuatan project/package"),(0,i.kt)("p",null,"Pembuatan project baru di Rust bisa dilakukan dengan 2 cara, dengan ",(0,i.kt)("inlineCode",{parentName:"p"},"cargo")," atau tanpanya. Di sini kita akan skip bagian pembuatan project tanpa ",(0,i.kt)("inlineCode",{parentName:"p"},"cargo"),", karena akan butuh effort lebih banyak nantinya dalam mengelola package dan manajemen build."),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"Di Rust istilah project lebih dikenal dengan ",(0,i.kt)("strong",{parentName:"p"},"package"),", dan pada ebook ini maknanya adalah sama.")),(0,i.kt)("p",null,"Ok langsung saja, buat project baru dengan mengeksekusi command berikut:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"cargo new hello_rust\ncd hello_rust\n")),(0,i.kt)("p",null,"Command di atas menghasilkan sebuah folder baru bernama ",(0,i.kt)("inlineCode",{parentName:"p"},"hello_rust")," dengan isi beberapa file:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"Cargo.toml")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},".gitignore")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"src/main.rs"))),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Struktur project hello_rust",src:n(4222).Z,width:"126",height:"129"})),(0,i.kt)("p",null,"File ",(0,i.kt)("inlineCode",{parentName:"p"},"src/main.rs")," adalah file penting dalam pemrograman Rust. File ",(0,i.kt)("inlineCode",{parentName:"p"},"main.rs")," merupakan file pertama yang dipanggil saat proses build program Rust (yang kemudian di-run). Source code program harus berada dalam folder ",(0,i.kt)("inlineCode",{parentName:"p"},"src"),"."),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"Pembahasan detail mengenai file ",(0,i.kt)("inlineCode",{parentName:"p"},"Cargo.toml")," nantinya ada pada chapter ",(0,i.kt)("a",{parentName:"p",href:"/basic/package-crate"},"Module System \u279c Package & Crate"),". Untuk sekarang penulis anjurkan untuk mengikuti pembelajaran tiap chapter secara urut.")),(0,i.kt)("h2",{id:"a12-run-project-hello-rust"},"A.1.2. Run project ",(0,i.kt)("inlineCode",{parentName:"h2"},"Hello Rust")),(0,i.kt)("p",null,"Sebelum membahas isi kode program dalam ",(0,i.kt)("inlineCode",{parentName:"p"},"main.rs"),", ada baiknya kita run terlebih dahulu program ini untuk melihat hasilnya. Jalankan command berikut untuk run program."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"cargo run\n")),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Run project hello_rust",src:n(5872).Z,width:"470",height:"315"})),(0,i.kt)("p",null,"Bisa dilihat pada gambar di atas pesan ",(0,i.kt)("inlineCode",{parentName:"p"},"Hello, world!")," yang ada dalam file ",(0,i.kt)("inlineCode",{parentName:"p"},"main.rs")," muncul, menandakan proses eksekusi program sukses."),(0,i.kt)("p",null,"Command ",(0,i.kt)("inlineCode",{parentName:"p"},"cargo run")," digunakan untuk menjalankan aplikasi saat proses development. Perlu diingat bahwa Rust merupakan bahasa pemrograman yang kategorinya ",(0,i.kt)("inlineCode",{parentName:"p"},"compiled language")," yang artinya kode program akan dikompilasi terlebih dahulu untuk menghasilkan file binary, dan kemudian file binary itulah yang dijalankan."),(0,i.kt)("p",null,"Command ",(0,i.kt)("inlineCode",{parentName:"p"},"cargo run")," merupakan shorthand untuk memperpendek proses kompilasi dan eksekusi. Dalam command tersebut, kode program akan di-compile terlebih dahulu, dan hasilnya adalah file executable binary bernama ",(0,i.kt)("inlineCode",{parentName:"p"},"hello_rust.exe")," (karena penulis menggunakan windows). File binary tersebut berada dalam project dalam path ",(0,i.kt)("inlineCode",{parentName:"p"},"hello_rust/target/debug/hello_rust.exe"),". Setelah proses kompilasi, file binary tersebut dijalankan, dan hasilnya adalah pesan ",(0,i.kt)("inlineCode",{parentName:"p"},"Hello, world!")," yang muncul di layar"),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"Untuk pengguna windows, file binary akan ber-ekstensi ",(0,i.kt)("inlineCode",{parentName:"p"},".exe")," seperti pada contoh yaitu ",(0,i.kt)("inlineCode",{parentName:"p"},"hello_rust.exe"),". Sedangkan untuk non-windows, file tidak mempunyai ekstensi, ",(0,i.kt)("inlineCode",{parentName:"p"},"hello_rust"),".")),(0,i.kt)("p",null,"Command ",(0,i.kt)("inlineCode",{parentName:"p"},"cargo run")," akan sering kita pakai dalam proses development."),(0,i.kt)("h2",{id:"a13-penjelasan-blok-kode-mainrs"},"A.1.3. Penjelasan blok kode ",(0,i.kt)("inlineCode",{parentName:"h2"},"main.rs")),(0,i.kt)("p",null,"Berikut adalah isi (default) dari file ",(0,i.kt)("inlineCode",{parentName:"p"},"main.rs"),", dan kita akan bahas setiap barisnya (hanya 3 baris)."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-rust",metastring:'title="src/main.rs"',title:'"src/main.rs"'},'fn main() {\n println!("Hello, world!");\n}\n')),(0,i.kt)("h3",{id:"-notasi-pendefinisian-fungsi"},"\u25c9 Notasi pendefinisian fungsi"),(0,i.kt)("p",null,"Pembuatan fungsi di Rust menggunakan keyword ",(0,i.kt)("inlineCode",{parentName:"p"},"fn")," dengan notasi penulisan sebagai berikut, contoh:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"fn namaFungsi() {\n\n}\n")),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"namaFungsi")," di atas adalah nama fungsi. Pada program yang sudah kita buat, fungsi bernama ",(0,i.kt)("inlineCode",{parentName:"p"},"main"),". Penulisan nama fungsi diikuti dengan ",(0,i.kt)("inlineCode",{parentName:"p"},"()")," kemudian kurung kurawal ",(0,i.kt)("inlineCode",{parentName:"p"},"{ }"),"."),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Sintaks ",(0,i.kt)("inlineCode",{parentName:"li"},"()")," nantinya bisa diisi dengan definisi parameter. Pada contoh ini tidak ada parameter yang ditulis."),(0,i.kt)("li",{parentName:"ul"},"Sintaks ",(0,i.kt)("inlineCode",{parentName:"li"},"{}")," dituliskan dalam baris berbeda, isinya adalah kode program.")),(0,i.kt)("h3",{id:"-notasi-pemanggilan-fungsi"},"\u25c9 Notasi pemanggilan fungsi"),(0,i.kt)("p",null,"Notasi penulisan pemanggilan fungsi adalah cukup dengan menuliskan nama fungsinya kemudian diikuti dengan ",(0,i.kt)("inlineCode",{parentName:"p"},"()"),", seperti berikut:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"namaFungsi();\n")),(0,i.kt)("p",null,"Jika ada argument parameter yang perlu disisipkan saat pemanggilan fungsi, dituliskan di antara kurung ",(0,i.kt)("inlineCode",{parentName:"p"},"()"),". Contoh pemanggilan ",(0,i.kt)("inlineCode",{parentName:"p"},"sebuahFungsi")," dengan argument berupa string ",(0,i.kt)("inlineCode",{parentName:"p"},'"sebuah argument"'),"."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},'sebuahFungsi("sebuah argument");\n')),(0,i.kt)("p",null,"Ok, sampai sini penulis rasa cukup jelas. Sekarang kita fokus ke ",(0,i.kt)("inlineCode",{parentName:"p"},"println"),", ada yang aneh dengan pemanggilan fungsi ini. Kenapa ",(0,i.kt)("inlineCode",{parentName:"p"},"println")," tidak dituliskan dalam bentuk ",(0,i.kt)("inlineCode",{parentName:"p"},'println("Hello, world!")')," melainkan ",(0,i.kt)("inlineCode",{parentName:"p"},'println!("Hello, world!")'),"?"),(0,i.kt)("p",null,"Sekadar informasi saja, berdasarkan versi Rust terbaru, tidak ada fungsi bernama ",(0,i.kt)("inlineCode",{parentName:"p"},"println"),", yang ada adalah macro bernama ",(0,i.kt)("inlineCode",{parentName:"p"},"println"),"."),(0,i.kt)("h3",{id:"-macro-println"},"\u25c9 Macro ",(0,i.kt)("inlineCode",{parentName:"h3"},"println")),(0,i.kt)("p",null,"Agar pembaca tidak bertambah bingung, setidaknya untuk sekarang pada chapter awal ini anggap saja macro adalah fungsi ... tapi sedikit berbeda. Yang paling terlihat bedanya secara sintaktis adalah tanda ",(0,i.kt)("inlineCode",{parentName:"p"},"!"),". Pemanggilan macro pasti diikuti tanda ",(0,i.kt)("inlineCode",{parentName:"p"},"!")," sebelum ",(0,i.kt)("inlineCode",{parentName:"p"},"()"),". Contoh:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-rust"},'println!("Hello, world!");\n')),(0,i.kt)("p",null,"Macro ",(0,i.kt)("inlineCode",{parentName:"p"},"println")," digunakan untuk menampilkan string atau pesan ke console output (",(0,i.kt)("inlineCode",{parentName:"p"},"stdout"),") dan diikuti oleh baris baru (newline/enter). Agar lebih jelas jalankan kode berikut:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-rust",metastring:'title="src/main.rs"',title:'"src/main.rs"'},'fn main() {\n println!("Hello, world!");\n println!("How");\n println!("are");\n println!("you?");\n}\n')),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"println macro",src:n(7465).Z,width:"514",height:"401"})),(0,i.kt)("p",null,"Bisa dilihat, setiap pesan yang ditampilkan menggunakan macro ",(0,i.kt)("inlineCode",{parentName:"p"},"println")," muncul di baris baru."),(0,i.kt)("h3",{id:"-notasi-penulisan-statement"},"\u25c9 Notasi penulisan statement"),(0,i.kt)("p",null,"Di Rust, statement harus diikuti dengan tanda ",(0,i.kt)("inlineCode",{parentName:"p"},";")," atau titik koma. Wajib hukumnya. Tanpa tanda ",(0,i.kt)("inlineCode",{parentName:"p"},";")," maka beberapa statement akan dianggap 1 baris dan kemungkinan menghasilkan error jika sintaks dianggap tidak valid. Tanda ",(0,i.kt)("inlineCode",{parentName:"p"},";")," adalah penanda akhir statement. Contoh ",(0,i.kt)("inlineCode",{parentName:"p"},'println!("Hello, world!");'),"."),(0,i.kt)("h3",{id:"-indentation"},"\u25c9 Indentation"),(0,i.kt)("p",null,"Mengacu ke keterangan pada dokumentasi Rust, standar indentasi untuk kode program Rust adalah ",(0,i.kt)("inlineCode",{parentName:"p"},"4 space characters")," atau 4 karakter space."),(0,i.kt)("hr",null),(0,i.kt)("p",null,"Ok, penulis rasa cukup untuk program pertama ini, semoga tidak membingungkan. Silakan diulang-ulang jika perlu. Jika sudah siap, kita akan lanjut ke pembahasan dasar pemrograman Rust pada chapter berikutnya."),(0,i.kt)("p",null,"Selamat! Anda telah menjadi programmer Rust!"),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"catatan-chapter-"},"Catatan chapter \ud83d\udcd1"),(0,i.kt)("h3",{id:"-source-code-praktik"},"\u25c9 Source code praktik"),(0,i.kt)("pre",null,(0,i.kt)("a",{href:"https://github.com/novalagung/dasarpemrogramanrust-example/tree/master/hello_rust"},"github.com/novalagung/dasarpemrogramanrust-example/../hello_rust")),(0,i.kt)("h3",{id:"-referensi"},"\u25c9 Referensi"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"https://doc.rust-lang.org/book/ch01-03-hello-cargo.html"},"https://doc.rust-lang.org/book/ch01-03-hello-cargo.html")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"https://doc.rust-lang.org/std/macro.println.html"},"https://doc.rust-lang.org/std/macro.println.html")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"https://doc.rust-lang.org/rust-by-example/hello/print.html"},"https://doc.rust-lang.org/rust-by-example/hello/print.html"))))}d.isMDXComponent=!0},4222:(a,e,n)=>{n.d(e,{Z:()=>t});const t="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAH4AAACBCAIAAACJhZkTAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAFGGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNy4xLWMwMDAgMTE2LjM5YWJhZjcsIDIwMjIvMDIvMjUtMjE6NTc6MjEgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIiB4bWxuczpwaG90b3Nob3A9Imh0dHA6Ly9ucy5hZG9iZS5jb20vcGhvdG9zaG9wLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdEV2dD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL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/H6svXmOvduWTpu3vvu3oHc3PHYBXj6xn/Tvb1SvT4PieYr8cyl205Ev3/UvG2n4+9o7ctdmOUPRykc6Lo4aA7HWk7HLyHg21Rotg+RbmdxikZSEBhFdb3r6hFXIw3fMaYfxEOF12tC9AX9me1mMdcsb0bDBqDAHpADwLoAT0IoAf0gB7QVzD6uvaergddjXT6srfLP+a6frUOKJcDvWcixLwpuDYeDA/MJdiXNINtVYdMsQ6qEdC3DI/K3smPz3taLJZWbdtHJyhKPFyuxzrJBkPvDEwk10NJnngoNu+Lrc9IdZC449RaW1cap5R2nwb0+UlbYF2k3H/Lyl1svBWcEOhPDDlyzIYrby/v0AFppB4fiZMNZBI2yiZlZufIMllpSC6VxYfnDGb1lx1d8yzlSD/iWyyeCMt99HqBNhjIbCMbhUsTVcTQAXS3eDQwjRRSgH0jObNMm1Kz4Xy9fTShhj46P2y7rII+5z2IedRDB8Q5VTkUpX4EvVpmcWZYLW0s9PahhLbDCQW8hXleJOxJBT0hFkEevqGct8LREzNXGHqmmUU6Nlgzm1yfSa71eswF+Hq0SvKxevLOA6fD6k0mq6XVWtfS74vLFnyKd7fn6i3gEOkejtyPE9BrxCKQ3TdPEK3UnJkrBD0n3v4VzuqjA6E49/dKxd5VfAvPBYkz2CZavUosAt5pQQMRBIJ8KWUPh5S5ktA3WK4/6J2L3rTT6VbHaMDjvFqmqd0K3FCmCobPKi8WobLRV3QsAgwaA3pAD+gBPaAHAfSAHgTQA3oQQA/oQQA9oAcB9IAeRCb/A8d3FqM8+LSSAAAAAElFTkSuQmCC"},5872:(a,e,n)=>{n.d(e,{Z:()=>t});const t=n.p+"assets/images/hello-rust-2-275752b62e2a0b25dbf8ee21f9817ea0.png"},7465:(a,e,n)=>{n.d(e,{Z:()=>t});const t=n.p+"assets/images/hello-rust-3-6c6265ba2c94ac92baf92b864094ca1c.png"}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.d4337db1.js b/assets/js/runtime~main.36445933.js similarity index 99% rename from assets/js/runtime~main.d4337db1.js rename to assets/js/runtime~main.36445933.js index fb9ec8c2..9e2cdc04 100644 --- a/assets/js/runtime~main.d4337db1.js +++ b/assets/js/runtime~main.36445933.js @@ -1 +1 @@ -(()=>{"use strict";var e,a,c,d,r,b={},t={};function f(e){var a=t[e];if(void 0!==a)return a.exports;var c=t[e]={exports:{}};return b[e].call(c.exports,c,c.exports,f),c.exports}f.m=b,e=[],f.O=(a,c,d,r)=>{if(!c){var b=1/0;for(i=0;i=r)&&Object.keys(f.O).every((e=>f.O[e](c[o])))?c.splice(o--,1):(t=!1,r0&&e[i-1][2]>r;i--)e[i]=e[i-1];e[i]=[c,d,r]},f.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return f.d(a,{a:a}),a},c=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,f.t=function(e,d){if(1&d&&(e=this(e)),8&d)return e;if("object"==typeof e&&e){if(4&d&&e.__esModule)return e;if(16&d&&"function"==typeof e.then)return e}var r=Object.create(null);f.r(r);var b={};a=a||[null,c({}),c([]),c(c)];for(var t=2&d&&e;"object"==typeof t&&!~a.indexOf(t);t=c(t))Object.getOwnPropertyNames(t).forEach((a=>b[a]=()=>e[a]));return b.default=()=>e,f.d(r,b),r},f.d=(e,a)=>{for(var c in a)f.o(a,c)&&!f.o(e,c)&&Object.defineProperty(e,c,{enumerable:!0,get:a[c]})},f.f={},f.e=e=>Promise.all(Object.keys(f.f).reduce(((a,c)=>(f.f[c](e,a),a)),[])),f.u=e=>"assets/js/"+({53:"935f2afb",274:"016a0787",620:"2bc2e36b",623:"9e6fe7cf",740:"f8d4e457",909:"bd9b9d52",1059:"7d03ccaf",1422:"62b99870",2089:"0ae704f7",2107:"8e991452",2359:"48e2ebd6",2399:"8ad68633",2706:"4c7e7ada",2870:"5f289fb7",2959:"68ec37cc",3007:"04da11da",3257:"82a9b669",3306:"164327b9",4197:"7a2568c4",4248:"8333c691",4274:"7390b81e",4452:"bc4edc5c",4622:"d8837387",4729:"c76cc2e3",4738:"496dcc30",4758:"68e1906b",4790:"b97d8256",4861:"db8ccf76",4943:"dabee7bd",5572:"be3f5c40",5673:"fef7d16c",5729:"4513d9f5",5751:"fd4f5a0c",5758:"71880105",5989:"2452d5f5",6161:"3b1dfe68",6345:"a2bea3ed",6388:"eb2a6637",6403:"475d163e",6477:"05cc1716",6531:"c01cce30",6691:"cb962766",6794:"b28a365a",6971:"c377a04b",7310:"fb18633e",7386:"3aa512bf",7505:"8d193b98",7539:"e7bd9b37",7720:"bdfc7662",7742:"87499f15",7865:"9a3629a6",7918:"17896441",7920:"1a4e3797",7949:"0e6b6dd1",8051:"dadaca00",8308:"4232c3ed",8358:"7794a932",8469:"93422b31",8732:"e4904969",8784:"d47a3664",8794:"af6aab29",9157:"c526a898",9323:"8333ea4d",9514:"1be78505",9831:"5925ce9f",9886:"8b55bf27"}[e]||e)+"."+{53:"13143cb2",205:"e9ca4e1a",274:"0ab1d3ab",620:"876e08c0",623:"c549f588",740:"88f7a231",909:"8d109af6",1059:"46ca6fcc",1422:"4801cdae",2089:"5940e697",2107:"9f077664",2359:"0b6ce575",2399:"0a69a909",2706:"f4643a6f",2870:"e0fc9497",2959:"d3961cb0",3007:"b3ba07e3",3257:"bb49d726",3306:"ce557677",4197:"cb80d87b",4248:"54569977",4274:"686f428e",4452:"f0b380ec",4622:"e6bc9bd5",4729:"c1ae2c67",4738:"a168eb53",4758:"f87d9410",4790:"7eff2a81",4861:"f925a746",4943:"9e39dc43",4972:"ea87a18a",5572:"4baec74d",5673:"7198ddd5",5729:"6ce8fc47",5751:"7de9809a",5758:"a92b59bc",5989:"c8d9088c",6161:"84da4a4d",6345:"c14ec614",6388:"01009699",6403:"4cbfe654",6477:"272262df",6531:"1810b6cb",6691:"fe11400b",6780:"3e547342",6794:"28a71aca",6945:"19e06702",6971:"753abc35",7310:"b4caf1fa",7386:"a1c7a02b",7505:"c7232d69",7539:"38bdc3e5",7720:"e5ac5751",7742:"679ef493",7865:"fcabd2cf",7918:"062de7c5",7920:"615c0dbb",7949:"a5062737",8051:"d3047a10",8308:"0eade53f",8358:"0807e2e7",8469:"7d2d5eae",8732:"2c9c10d1",8784:"2e54129a",8794:"fff2a138",8894:"7d968ee6",9157:"e25aff7f",9323:"d3688653",9514:"fa7071eb",9831:"d25861ea",9886:"a01d27dd"}[e]+".js",f.miniCssF=e=>{},f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),f.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),d={},r="dasarpemrogramanrust:",f.l=(e,a,c,b)=>{if(d[e])d[e].push(a);else{var t,o;if(void 0!==c)for(var n=document.getElementsByTagName("script"),i=0;i{t.onerror=t.onload=null,clearTimeout(s);var r=d[e];if(delete d[e],t.parentNode&&t.parentNode.removeChild(t),r&&r.forEach((e=>e(c))),a)return a(c)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=l.bind(null,t.onerror),t.onload=l.bind(null,t.onload),o&&document.head.appendChild(t)}},f.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.p="/",f.gca=function(e){return e={17896441:"7918",71880105:"5758","935f2afb":"53","016a0787":"274","2bc2e36b":"620","9e6fe7cf":"623",f8d4e457:"740",bd9b9d52:"909","7d03ccaf":"1059","62b99870":"1422","0ae704f7":"2089","8e991452":"2107","48e2ebd6":"2359","8ad68633":"2399","4c7e7ada":"2706","5f289fb7":"2870","68ec37cc":"2959","04da11da":"3007","82a9b669":"3257","164327b9":"3306","7a2568c4":"4197","8333c691":"4248","7390b81e":"4274",bc4edc5c:"4452",d8837387:"4622",c76cc2e3:"4729","496dcc30":"4738","68e1906b":"4758",b97d8256:"4790",db8ccf76:"4861",dabee7bd:"4943",be3f5c40:"5572",fef7d16c:"5673","4513d9f5":"5729",fd4f5a0c:"5751","2452d5f5":"5989","3b1dfe68":"6161",a2bea3ed:"6345",eb2a6637:"6388","475d163e":"6403","05cc1716":"6477",c01cce30:"6531",cb962766:"6691",b28a365a:"6794",c377a04b:"6971",fb18633e:"7310","3aa512bf":"7386","8d193b98":"7505",e7bd9b37:"7539",bdfc7662:"7720","87499f15":"7742","9a3629a6":"7865","1a4e3797":"7920","0e6b6dd1":"7949",dadaca00:"8051","4232c3ed":"8308","7794a932":"8358","93422b31":"8469",e4904969:"8732",d47a3664:"8784",af6aab29:"8794",c526a898:"9157","8333ea4d":"9323","1be78505":"9514","5925ce9f":"9831","8b55bf27":"9886"}[e]||e,f.p+f.u(e)},(()=>{var e={1303:0,532:0};f.f.j=(a,c)=>{var d=f.o(e,a)?e[a]:void 0;if(0!==d)if(d)c.push(d[2]);else if(/^(1303|532)$/.test(a))e[a]=0;else{var r=new Promise(((c,r)=>d=e[a]=[c,r]));c.push(d[2]=r);var b=f.p+f.u(a),t=new Error;f.l(b,(c=>{if(f.o(e,a)&&(0!==(d=e[a])&&(e[a]=void 0),d)){var r=c&&("load"===c.type?"missing":c.type),b=c&&c.target&&c.target.src;t.message="Loading chunk "+a+" failed.\n("+r+": "+b+")",t.name="ChunkLoadError",t.type=r,t.request=b,d[1](t)}}),"chunk-"+a,a)}},f.O.j=a=>0===e[a];var a=(a,c)=>{var d,r,b=c[0],t=c[1],o=c[2],n=0;if(b.some((a=>0!==e[a]))){for(d in t)f.o(t,d)&&(f.m[d]=t[d]);if(o)var i=o(f)}for(a&&a(c);n{"use strict";var e,a,c,d,r,b={},t={};function f(e){var a=t[e];if(void 0!==a)return a.exports;var c=t[e]={exports:{}};return b[e].call(c.exports,c,c.exports,f),c.exports}f.m=b,e=[],f.O=(a,c,d,r)=>{if(!c){var b=1/0;for(i=0;i=r)&&Object.keys(f.O).every((e=>f.O[e](c[o])))?c.splice(o--,1):(t=!1,r0&&e[i-1][2]>r;i--)e[i]=e[i-1];e[i]=[c,d,r]},f.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return f.d(a,{a:a}),a},c=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,f.t=function(e,d){if(1&d&&(e=this(e)),8&d)return e;if("object"==typeof e&&e){if(4&d&&e.__esModule)return e;if(16&d&&"function"==typeof e.then)return e}var r=Object.create(null);f.r(r);var b={};a=a||[null,c({}),c([]),c(c)];for(var t=2&d&&e;"object"==typeof t&&!~a.indexOf(t);t=c(t))Object.getOwnPropertyNames(t).forEach((a=>b[a]=()=>e[a]));return b.default=()=>e,f.d(r,b),r},f.d=(e,a)=>{for(var c in a)f.o(a,c)&&!f.o(e,c)&&Object.defineProperty(e,c,{enumerable:!0,get:a[c]})},f.f={},f.e=e=>Promise.all(Object.keys(f.f).reduce(((a,c)=>(f.f[c](e,a),a)),[])),f.u=e=>"assets/js/"+({53:"935f2afb",274:"016a0787",620:"2bc2e36b",623:"9e6fe7cf",740:"f8d4e457",909:"bd9b9d52",1059:"7d03ccaf",1422:"62b99870",2089:"0ae704f7",2107:"8e991452",2359:"48e2ebd6",2399:"8ad68633",2706:"4c7e7ada",2870:"5f289fb7",2959:"68ec37cc",3007:"04da11da",3257:"82a9b669",3306:"164327b9",4197:"7a2568c4",4248:"8333c691",4274:"7390b81e",4452:"bc4edc5c",4622:"d8837387",4729:"c76cc2e3",4738:"496dcc30",4758:"68e1906b",4790:"b97d8256",4861:"db8ccf76",4943:"dabee7bd",5572:"be3f5c40",5673:"fef7d16c",5729:"4513d9f5",5751:"fd4f5a0c",5758:"71880105",5989:"2452d5f5",6161:"3b1dfe68",6345:"a2bea3ed",6388:"eb2a6637",6403:"475d163e",6477:"05cc1716",6531:"c01cce30",6691:"cb962766",6794:"b28a365a",6971:"c377a04b",7310:"fb18633e",7386:"3aa512bf",7505:"8d193b98",7539:"e7bd9b37",7720:"bdfc7662",7742:"87499f15",7865:"9a3629a6",7918:"17896441",7920:"1a4e3797",7949:"0e6b6dd1",8051:"dadaca00",8308:"4232c3ed",8358:"7794a932",8469:"93422b31",8732:"e4904969",8784:"d47a3664",8794:"af6aab29",9157:"c526a898",9323:"8333ea4d",9514:"1be78505",9831:"5925ce9f",9886:"8b55bf27"}[e]||e)+"."+{53:"13143cb2",205:"e9ca4e1a",274:"0ab1d3ab",620:"876e08c0",623:"c549f588",740:"88f7a231",909:"8d109af6",1059:"46ca6fcc",1422:"4801cdae",2089:"5940e697",2107:"9f077664",2359:"0b6ce575",2399:"0a69a909",2706:"f4643a6f",2870:"e0fc9497",2959:"d3961cb0",3007:"b3ba07e3",3257:"bb49d726",3306:"ce557677",4197:"cb80d87b",4248:"54569977",4274:"686f428e",4452:"f0b380ec",4622:"e6bc9bd5",4729:"c1ae2c67",4738:"2c33b3bd",4758:"f87d9410",4790:"7eff2a81",4861:"f925a746",4943:"9e39dc43",4972:"ea87a18a",5572:"4baec74d",5673:"7198ddd5",5729:"6ce8fc47",5751:"7de9809a",5758:"a92b59bc",5989:"c8d9088c",6161:"84da4a4d",6345:"c14ec614",6388:"01009699",6403:"4cbfe654",6477:"272262df",6531:"1810b6cb",6691:"fe11400b",6780:"3e547342",6794:"28a71aca",6945:"19e06702",6971:"753abc35",7310:"b4caf1fa",7386:"a1c7a02b",7505:"c7232d69",7539:"38bdc3e5",7720:"e5ac5751",7742:"679ef493",7865:"fcabd2cf",7918:"062de7c5",7920:"615c0dbb",7949:"a5062737",8051:"d3047a10",8308:"0eade53f",8358:"0807e2e7",8469:"7d2d5eae",8732:"2c9c10d1",8784:"2e54129a",8794:"fff2a138",8894:"7d968ee6",9157:"e25aff7f",9323:"d3688653",9514:"fa7071eb",9831:"d25861ea",9886:"a01d27dd"}[e]+".js",f.miniCssF=e=>{},f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),f.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),d={},r="dasarpemrogramanrust:",f.l=(e,a,c,b)=>{if(d[e])d[e].push(a);else{var t,o;if(void 0!==c)for(var n=document.getElementsByTagName("script"),i=0;i{t.onerror=t.onload=null,clearTimeout(s);var r=d[e];if(delete d[e],t.parentNode&&t.parentNode.removeChild(t),r&&r.forEach((e=>e(c))),a)return a(c)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=l.bind(null,t.onerror),t.onload=l.bind(null,t.onload),o&&document.head.appendChild(t)}},f.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.p="/",f.gca=function(e){return e={17896441:"7918",71880105:"5758","935f2afb":"53","016a0787":"274","2bc2e36b":"620","9e6fe7cf":"623",f8d4e457:"740",bd9b9d52:"909","7d03ccaf":"1059","62b99870":"1422","0ae704f7":"2089","8e991452":"2107","48e2ebd6":"2359","8ad68633":"2399","4c7e7ada":"2706","5f289fb7":"2870","68ec37cc":"2959","04da11da":"3007","82a9b669":"3257","164327b9":"3306","7a2568c4":"4197","8333c691":"4248","7390b81e":"4274",bc4edc5c:"4452",d8837387:"4622",c76cc2e3:"4729","496dcc30":"4738","68e1906b":"4758",b97d8256:"4790",db8ccf76:"4861",dabee7bd:"4943",be3f5c40:"5572",fef7d16c:"5673","4513d9f5":"5729",fd4f5a0c:"5751","2452d5f5":"5989","3b1dfe68":"6161",a2bea3ed:"6345",eb2a6637:"6388","475d163e":"6403","05cc1716":"6477",c01cce30:"6531",cb962766:"6691",b28a365a:"6794",c377a04b:"6971",fb18633e:"7310","3aa512bf":"7386","8d193b98":"7505",e7bd9b37:"7539",bdfc7662:"7720","87499f15":"7742","9a3629a6":"7865","1a4e3797":"7920","0e6b6dd1":"7949",dadaca00:"8051","4232c3ed":"8308","7794a932":"8358","93422b31":"8469",e4904969:"8732",d47a3664:"8784",af6aab29:"8794",c526a898:"9157","8333ea4d":"9323","1be78505":"9514","5925ce9f":"9831","8b55bf27":"9886"}[e]||e,f.p+f.u(e)},(()=>{var e={1303:0,532:0};f.f.j=(a,c)=>{var d=f.o(e,a)?e[a]:void 0;if(0!==d)if(d)c.push(d[2]);else if(/^(1303|532)$/.test(a))e[a]=0;else{var r=new Promise(((c,r)=>d=e[a]=[c,r]));c.push(d[2]=r);var b=f.p+f.u(a),t=new Error;f.l(b,(c=>{if(f.o(e,a)&&(0!==(d=e[a])&&(e[a]=void 0),d)){var r=c&&("load"===c.type?"missing":c.type),b=c&&c.target&&c.target.src;t.message="Loading chunk "+a+" failed.\n("+r+": "+b+")",t.name="ChunkLoadError",t.type=r,t.request=b,d[1](t)}}),"chunk-"+a,a)}},f.O.j=a=>0===e[a];var a=(a,c)=>{var d,r,b=c[0],t=c[1],o=c[2],n=0;if(b.some((a=>0!==e[a]))){for(d in t)f.o(t,d)&&(f.m[d]=t[d]);if(o)var i=o(f)}for(a&&a(c);n