[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-sui-modern-move-syntax":3,"mdc--bfwajn-key":36,"related-org-sui-modern-move-syntax":1893,"related-repo-sui-modern-move-syntax":2057},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":25,"repoUrl":26,"updatedAt":27,"license":28,"forks":29,"topics":30,"repo":31,"sourceUrl":34,"mdContent":35},"modern-move-syntax","write Move 2024 edition code for Sui","Use when writing Move code on Sui to ensure 2024 edition syntax is used. Applies to method calls, string literals, vector operations, option handling, loops, and struct unpacking. Use whenever writing Move code to avoid legacy function-call syntax patterns.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"sui","Sui (Mysten Labs)","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fsui.png","MystenLabs",[13,16,19,22],{"name":14,"slug":8,"type":15},"Sui","tag",{"name":17,"slug":18,"type":15},"Web3","web3",{"name":20,"slug":21,"type":15},"Engineering","engineering",{"name":23,"slug":24,"type":15},"Smart Contracts","smart-contracts",9,"https:\u002F\u002Fgithub.com\u002FMystenLabs\u002Fskills","2026-07-16T06:02:43.277596",null,2,[],{"repoUrl":26,"stars":25,"forks":29,"topics":32,"description":33},[],"Sui development skills maintained by Mysten Labs","https:\u002F\u002Fgithub.com\u002FMystenLabs\u002Fskills\u002Ftree\u002FHEAD\u002Fmodern-move-syntax","---\nname: modern-move-syntax\ndescription: Use when writing Move code on Sui to ensure 2024 edition syntax is used. Applies to method calls, string literals, vector operations, option handling, loops, and struct unpacking. Use whenever writing Move code to avoid legacy function-call syntax patterns.\n---\n\n# modern-move-syntax\n\n> **MCP tool:** When available in your environment, also query the Sui documentation MCP server (`https:\u002F\u002Fsui.mcp.kapa.ai`) for up-to-date answers. Use it for verification and for details not covered by these reference files.\n\n## Overview\n\nThe Move 2024 edition introduced method syntax and several convenience features. AI agents frequently fall back to pre-2024 function-call patterns from training data. This skill covers every modern syntax pattern.\n\nAll patterns sourced from https:\u002F\u002Fmove-book.com\u002Fguides\u002Fcode-quality-checklist\n\n## Method Syntax for Common Operations\n\nUse method-call syntax (dot notation) instead of module function calls.\n\n### Coin and Balance\n\n```move\n\u002F\u002F WRONG — legacy function-call syntax\nlet value = coin::value(&payment);\nlet balance = coin::into_balance(payment);\nbalance::join(&mut pool.reserve, balance);\nlet coin = coin::from_balance(balance::split(&mut pool.reserve, amount), ctx);\n\n\u002F\u002F CORRECT — method syntax\nlet value = payment.value();\nlet balance = payment.into_balance();\npool.reserve.join(balance);\nlet coin = coin::from_balance(pool.reserve.split(amount), ctx);\n\n\u002F\u002F BEST — chained method calls\nlet balance = payment.split(amount, ctx).into_balance();\n```\n\n### TxContext\n\n```move\n\u002F\u002F WRONG\ntx_context::sender(ctx)\n\n\u002F\u002F CORRECT\nctx.sender()\n```\n\n### UID and Object\n\n```move\n\u002F\u002F WRONG\nobject::delete(id);\n\n\u002F\u002F CORRECT\nid.delete();\n```\n\n## String Literals\n\nUse quoted string literals directly, not `std::string::utf8()` or byte-string conversion.\n\n```move\n\u002F\u002F WRONG\nuse std::string;\nlet s = string::utf8(b\"hello\");\n\n\u002F\u002F ALSO WRONG — unnecessary conversion\nlet s = b\"hello\".to_string();\n\n\u002F\u002F CORRECT — direct string literals (2024 edition)\nlet s = \"hello\";                    \u002F\u002F String (UTF-8)\nlet ascii = \"hello\";                \u002F\u002F also works for ASCII strings\nlet s = b\"hello\".to_string();      \u002F\u002F still valid but prefer quoted form\nlet ascii = b\"hello\".to_ascii_string(); \u002F\u002F explicit ASCII when needed\n```\n\n## Vector Literals and Methods\n\nUse vector literal syntax and method calls instead of module functions.\n\n```move\n\u002F\u002F WRONG\nlet mut v = vector::empty();\nvector::push_back(&mut v, 10);\nlet first = vector::borrow(&v, 0);\nlet len = vector::length(&v);\n\n\u002F\u002F CORRECT\nlet mut v = vector[10];\nlet first = &v[0];\nlet len = v.length();\nv.push_back(20);\n```\n\n### Collection Index Syntax\n\n```move\n\u002F\u002F WRONG\nlet val = vec_map::get(&map, &key);\n\n\u002F\u002F CORRECT\nlet val = &map[&key];\n```\n\n## Option Macros\n\nUse macros instead of manual `is_some` \u002F `destroy_some` patterns.\n\n```move\n\u002F\u002F WRONG\nif (opt.is_some()) {\n    let value = opt.destroy_some();\n    call_function(value);\n};\n\n\u002F\u002F CORRECT\nopt.do!(|value| call_function(value));\n```\n\n### Default values\n\n```move\n\u002F\u002F WRONG\nlet value = if (opt.is_some()) { opt.destroy_some() } else { default };\n\n\u002F\u002F CORRECT\nlet value = opt.destroy_or!(default);\n```\n\n## Loop Macros\n\n```move\n\u002F\u002F WRONG — manual counter loop\nlet mut i = 0;\nwhile (i \u003C 32) {\n    do_action();\n    i = i + 1;\n};\n\n\u002F\u002F CORRECT — do! macro\n32u8.do!(|_| do_action());\n```\n\n### Range-based loops\n\n```move\n\u002F\u002F Iterate over a numeric range\nlet mut sum = 0;\n10u64.do!(|i| { sum = sum + i });  \u002F\u002F i goes 0..9\n\n\u002F\u002F With index for more complex logic\nlet mut results = vector[];\n5u64.do!(|i| results.push_back(i * i));  \u002F\u002F [0, 1, 4, 9, 16]\n```\n\n### Vector iteration\n\n```move\n\u002F\u002F WRONG\nlet mut i = 0;\nwhile (i \u003C vec.length()) {\n    call_function(&vec[i]);\n    i = i + 1;\n};\n\n\u002F\u002F CORRECT\nvec.do_ref!(|e| call_function(e));\n```\n\n### Vector creation from range\n\n```move\n\u002F\u002F WRONG\nlet mut v = vector[];\nlet mut i = 0;\nwhile (i \u003C 32) { v.push_back(i); i = i + 1; };\n\n\u002F\u002F CORRECT\nlet v = vector::tabulate!(32, |i| i);\n```\n\n### Fold and filter\n\n```move\n\u002F\u002F fold\nlet sum = source.fold!(0, |acc, v| { acc + v });\n\n\u002F\u002F filter (requires T: drop)\nlet filtered = source.filter!(|e| e > 10);\n```\n\n## Struct Unpacking: `..` Syntax\n\nUse `..` to ignore unused fields when destructuring in 2024 edition.\n\n```move\n\u002F\u002F WRONG\nlet MyStruct { id, field_1: _, field_2: _, field_3: _ } = value;\n\n\u002F\u002F CORRECT\nlet MyStruct { id, .. } = value;\n```\n\n## Renamed Standard Library Functions\n\nSome standard library functions have been renamed. Using the old name produces a deprecation warning or compile error.\n\n```move\n\u002F\u002F WRONG — deprecated, renamed\ndynamic_field::exists_(&id, key)\n\n\u002F\u002F CORRECT\ndynamic_field::exists(&id, key)\n```\n\n## Positional Fields (Tuple Structs)\n\nStructs can use positional fields instead of named fields:\n\n```move\n\u002F\u002F Named fields (traditional)\npublic struct Wrapper has copy, drop, store { value: u64 }\n\n\u002F\u002F Positional fields (2024 edition)\npublic struct Wrapper(u64) has copy, drop, store;\n\n\u002F\u002F Access by position\nlet w = Wrapper(42);\nlet val = w.0;\n```\n\nPositional structs are useful for newtype wrappers and dynamic field keys (see `naming-conventions` skill).\n\n## Public Structs\n\nThe `public` keyword on structs controls visibility of the struct's fields. Without `public`, fields are module-private — only the defining module can construct or destructure the struct.\n\n```move\n\u002F\u002F Fields visible only within this module\nstruct Config has key { id: UID, admin: address }\n\n\u002F\u002F Fields visible to other modules\npublic struct Token has key, store { id: UID, value: u64 }\n```\n\nUse `public` when other modules need to read fields or construct\u002Fdestructure the struct. Omit it for encapsulation.\n\n## Enums\n\nMove 2024 supports enum types:\n\n```move\npublic enum Color {\n    Red,\n    Green,\n    Blue,\n    Custom(u8, u8, u8),\n}\n\npublic fun is_red(c: &Color): bool {\n    match (c) {\n        Color::Red => true,\n        _ => false,\n    }\n}\n```\n\nEnums can have variants with positional fields, named fields, or no fields. Use `match` expressions for exhaustive pattern matching. Enums cannot have the `key` ability — they cannot be objects directly, but they can be stored as fields inside objects.\n\n## Quick Reference\n\n| Legacy Pattern | Modern 2024 Syntax |\n|---|---|\n| `coin::value(&c)` | `c.value()` |\n| `coin::into_balance(c)` | `c.into_balance()` |\n| `balance::join(&mut b, v)` | `b.join(v)` |\n| `balance::split(&mut b, n)` | `b.split(n)` |\n| `tx_context::sender(ctx)` | `ctx.sender()` |\n| `object::delete(id)` | `id.delete()` |\n| `string::utf8(b\"x\")` | `\"x\"` (or `b\"x\".to_string()`) |\n| `vector::empty()` | `vector[]` |\n| `vector::push_back(&mut v, x)` | `v.push_back(x)` |\n| `vector::length(&v)` | `v.length()` |\n| `opt.is_some() + destroy_some` | `opt.do!(\\|v\\| ...)` |\n| `while (i \u003C n) { ... i++ }` | `n.do!(\\|_\\| ...)` |\n| `let S { a, b: _ } = x` | `let S { a, .. } = x` |\n",{"data":37,"body":38},{"name":4,"description":6},{"type":39,"children":40},"root",[41,48,73,80,85,98,104,109,116,253,259,305,311,355,361,374,474,480,485,577,583,627,633,654,722,728,772,778,855,861,923,929,1002,1008,1067,1073,1119,1133,1145,1189,1195,1200,1245,1251,1256,1333,1346,1352,1372,1418,1429,1435,1440,1549,1570,1576,1887],{"type":42,"tag":43,"props":44,"children":45},"element","h1",{"id":4},[46],{"type":47,"value":4},"text",{"type":42,"tag":49,"props":50,"children":51},"blockquote",{},[52],{"type":42,"tag":53,"props":54,"children":55},"p",{},[56,62,64,71],{"type":42,"tag":57,"props":58,"children":59},"strong",{},[60],{"type":47,"value":61},"MCP tool:",{"type":47,"value":63}," When available in your environment, also query the Sui documentation MCP server (",{"type":42,"tag":65,"props":66,"children":68},"code",{"className":67},[],[69],{"type":47,"value":70},"https:\u002F\u002Fsui.mcp.kapa.ai",{"type":47,"value":72},") for up-to-date answers. Use it for verification and for details not covered by these reference files.",{"type":42,"tag":74,"props":75,"children":77},"h2",{"id":76},"overview",[78],{"type":47,"value":79},"Overview",{"type":42,"tag":53,"props":81,"children":82},{},[83],{"type":47,"value":84},"The Move 2024 edition introduced method syntax and several convenience features. AI agents frequently fall back to pre-2024 function-call patterns from training data. This skill covers every modern syntax pattern.",{"type":42,"tag":53,"props":86,"children":87},{},[88,90],{"type":47,"value":89},"All patterns sourced from ",{"type":42,"tag":91,"props":92,"children":96},"a",{"href":93,"rel":94},"https:\u002F\u002Fmove-book.com\u002Fguides\u002Fcode-quality-checklist",[95],"nofollow",[97],{"type":47,"value":93},{"type":42,"tag":74,"props":99,"children":101},{"id":100},"method-syntax-for-common-operations",[102],{"type":47,"value":103},"Method Syntax for Common Operations",{"type":42,"tag":53,"props":105,"children":106},{},[107],{"type":47,"value":108},"Use method-call syntax (dot notation) instead of module function calls.",{"type":42,"tag":110,"props":111,"children":113},"h3",{"id":112},"coin-and-balance",[114],{"type":47,"value":115},"Coin and Balance",{"type":42,"tag":117,"props":118,"children":123},"pre",{"className":119,"code":120,"language":121,"meta":122,"style":122},"language-move shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F WRONG — legacy function-call syntax\nlet value = coin::value(&payment);\nlet balance = coin::into_balance(payment);\nbalance::join(&mut pool.reserve, balance);\nlet coin = coin::from_balance(balance::split(&mut pool.reserve, amount), ctx);\n\n\u002F\u002F CORRECT — method syntax\nlet value = payment.value();\nlet balance = payment.into_balance();\npool.reserve.join(balance);\nlet coin = coin::from_balance(pool.reserve.split(amount), ctx);\n\n\u002F\u002F BEST — chained method calls\nlet balance = payment.split(amount, ctx).into_balance();\n","move","",[124],{"type":42,"tag":65,"props":125,"children":126},{"__ignoreMap":122},[127,138,146,155,164,173,183,192,201,209,218,227,235,244],{"type":42,"tag":128,"props":129,"children":132},"span",{"class":130,"line":131},"line",1,[133],{"type":42,"tag":128,"props":134,"children":135},{},[136],{"type":47,"value":137},"\u002F\u002F WRONG — legacy function-call syntax\n",{"type":42,"tag":128,"props":139,"children":140},{"class":130,"line":29},[141],{"type":42,"tag":128,"props":142,"children":143},{},[144],{"type":47,"value":145},"let value = coin::value(&payment);\n",{"type":42,"tag":128,"props":147,"children":149},{"class":130,"line":148},3,[150],{"type":42,"tag":128,"props":151,"children":152},{},[153],{"type":47,"value":154},"let balance = coin::into_balance(payment);\n",{"type":42,"tag":128,"props":156,"children":158},{"class":130,"line":157},4,[159],{"type":42,"tag":128,"props":160,"children":161},{},[162],{"type":47,"value":163},"balance::join(&mut pool.reserve, balance);\n",{"type":42,"tag":128,"props":165,"children":167},{"class":130,"line":166},5,[168],{"type":42,"tag":128,"props":169,"children":170},{},[171],{"type":47,"value":172},"let coin = coin::from_balance(balance::split(&mut pool.reserve, amount), ctx);\n",{"type":42,"tag":128,"props":174,"children":176},{"class":130,"line":175},6,[177],{"type":42,"tag":128,"props":178,"children":180},{"emptyLinePlaceholder":179},true,[181],{"type":47,"value":182},"\n",{"type":42,"tag":128,"props":184,"children":186},{"class":130,"line":185},7,[187],{"type":42,"tag":128,"props":188,"children":189},{},[190],{"type":47,"value":191},"\u002F\u002F CORRECT — method syntax\n",{"type":42,"tag":128,"props":193,"children":195},{"class":130,"line":194},8,[196],{"type":42,"tag":128,"props":197,"children":198},{},[199],{"type":47,"value":200},"let value = payment.value();\n",{"type":42,"tag":128,"props":202,"children":203},{"class":130,"line":25},[204],{"type":42,"tag":128,"props":205,"children":206},{},[207],{"type":47,"value":208},"let balance = payment.into_balance();\n",{"type":42,"tag":128,"props":210,"children":212},{"class":130,"line":211},10,[213],{"type":42,"tag":128,"props":214,"children":215},{},[216],{"type":47,"value":217},"pool.reserve.join(balance);\n",{"type":42,"tag":128,"props":219,"children":221},{"class":130,"line":220},11,[222],{"type":42,"tag":128,"props":223,"children":224},{},[225],{"type":47,"value":226},"let coin = coin::from_balance(pool.reserve.split(amount), ctx);\n",{"type":42,"tag":128,"props":228,"children":230},{"class":130,"line":229},12,[231],{"type":42,"tag":128,"props":232,"children":233},{"emptyLinePlaceholder":179},[234],{"type":47,"value":182},{"type":42,"tag":128,"props":236,"children":238},{"class":130,"line":237},13,[239],{"type":42,"tag":128,"props":240,"children":241},{},[242],{"type":47,"value":243},"\u002F\u002F BEST — chained method calls\n",{"type":42,"tag":128,"props":245,"children":247},{"class":130,"line":246},14,[248],{"type":42,"tag":128,"props":249,"children":250},{},[251],{"type":47,"value":252},"let balance = payment.split(amount, ctx).into_balance();\n",{"type":42,"tag":110,"props":254,"children":256},{"id":255},"txcontext",[257],{"type":47,"value":258},"TxContext",{"type":42,"tag":117,"props":260,"children":262},{"className":119,"code":261,"language":121,"meta":122,"style":122},"\u002F\u002F WRONG\ntx_context::sender(ctx)\n\n\u002F\u002F CORRECT\nctx.sender()\n",[263],{"type":42,"tag":65,"props":264,"children":265},{"__ignoreMap":122},[266,274,282,289,297],{"type":42,"tag":128,"props":267,"children":268},{"class":130,"line":131},[269],{"type":42,"tag":128,"props":270,"children":271},{},[272],{"type":47,"value":273},"\u002F\u002F WRONG\n",{"type":42,"tag":128,"props":275,"children":276},{"class":130,"line":29},[277],{"type":42,"tag":128,"props":278,"children":279},{},[280],{"type":47,"value":281},"tx_context::sender(ctx)\n",{"type":42,"tag":128,"props":283,"children":284},{"class":130,"line":148},[285],{"type":42,"tag":128,"props":286,"children":287},{"emptyLinePlaceholder":179},[288],{"type":47,"value":182},{"type":42,"tag":128,"props":290,"children":291},{"class":130,"line":157},[292],{"type":42,"tag":128,"props":293,"children":294},{},[295],{"type":47,"value":296},"\u002F\u002F CORRECT\n",{"type":42,"tag":128,"props":298,"children":299},{"class":130,"line":166},[300],{"type":42,"tag":128,"props":301,"children":302},{},[303],{"type":47,"value":304},"ctx.sender()\n",{"type":42,"tag":110,"props":306,"children":308},{"id":307},"uid-and-object",[309],{"type":47,"value":310},"UID and Object",{"type":42,"tag":117,"props":312,"children":314},{"className":119,"code":313,"language":121,"meta":122,"style":122},"\u002F\u002F WRONG\nobject::delete(id);\n\n\u002F\u002F CORRECT\nid.delete();\n",[315],{"type":42,"tag":65,"props":316,"children":317},{"__ignoreMap":122},[318,325,333,340,347],{"type":42,"tag":128,"props":319,"children":320},{"class":130,"line":131},[321],{"type":42,"tag":128,"props":322,"children":323},{},[324],{"type":47,"value":273},{"type":42,"tag":128,"props":326,"children":327},{"class":130,"line":29},[328],{"type":42,"tag":128,"props":329,"children":330},{},[331],{"type":47,"value":332},"object::delete(id);\n",{"type":42,"tag":128,"props":334,"children":335},{"class":130,"line":148},[336],{"type":42,"tag":128,"props":337,"children":338},{"emptyLinePlaceholder":179},[339],{"type":47,"value":182},{"type":42,"tag":128,"props":341,"children":342},{"class":130,"line":157},[343],{"type":42,"tag":128,"props":344,"children":345},{},[346],{"type":47,"value":296},{"type":42,"tag":128,"props":348,"children":349},{"class":130,"line":166},[350],{"type":42,"tag":128,"props":351,"children":352},{},[353],{"type":47,"value":354},"id.delete();\n",{"type":42,"tag":74,"props":356,"children":358},{"id":357},"string-literals",[359],{"type":47,"value":360},"String Literals",{"type":42,"tag":53,"props":362,"children":363},{},[364,366,372],{"type":47,"value":365},"Use quoted string literals directly, not ",{"type":42,"tag":65,"props":367,"children":369},{"className":368},[],[370],{"type":47,"value":371},"std::string::utf8()",{"type":47,"value":373}," or byte-string conversion.",{"type":42,"tag":117,"props":375,"children":377},{"className":119,"code":376,"language":121,"meta":122,"style":122},"\u002F\u002F WRONG\nuse std::string;\nlet s = string::utf8(b\"hello\");\n\n\u002F\u002F ALSO WRONG — unnecessary conversion\nlet s = b\"hello\".to_string();\n\n\u002F\u002F CORRECT — direct string literals (2024 edition)\nlet s = \"hello\";                    \u002F\u002F String (UTF-8)\nlet ascii = \"hello\";                \u002F\u002F also works for ASCII strings\nlet s = b\"hello\".to_string();      \u002F\u002F still valid but prefer quoted form\nlet ascii = b\"hello\".to_ascii_string(); \u002F\u002F explicit ASCII when needed\n",[378],{"type":42,"tag":65,"props":379,"children":380},{"__ignoreMap":122},[381,388,396,404,411,419,427,434,442,450,458,466],{"type":42,"tag":128,"props":382,"children":383},{"class":130,"line":131},[384],{"type":42,"tag":128,"props":385,"children":386},{},[387],{"type":47,"value":273},{"type":42,"tag":128,"props":389,"children":390},{"class":130,"line":29},[391],{"type":42,"tag":128,"props":392,"children":393},{},[394],{"type":47,"value":395},"use std::string;\n",{"type":42,"tag":128,"props":397,"children":398},{"class":130,"line":148},[399],{"type":42,"tag":128,"props":400,"children":401},{},[402],{"type":47,"value":403},"let s = string::utf8(b\"hello\");\n",{"type":42,"tag":128,"props":405,"children":406},{"class":130,"line":157},[407],{"type":42,"tag":128,"props":408,"children":409},{"emptyLinePlaceholder":179},[410],{"type":47,"value":182},{"type":42,"tag":128,"props":412,"children":413},{"class":130,"line":166},[414],{"type":42,"tag":128,"props":415,"children":416},{},[417],{"type":47,"value":418},"\u002F\u002F ALSO WRONG — unnecessary conversion\n",{"type":42,"tag":128,"props":420,"children":421},{"class":130,"line":175},[422],{"type":42,"tag":128,"props":423,"children":424},{},[425],{"type":47,"value":426},"let s = b\"hello\".to_string();\n",{"type":42,"tag":128,"props":428,"children":429},{"class":130,"line":185},[430],{"type":42,"tag":128,"props":431,"children":432},{"emptyLinePlaceholder":179},[433],{"type":47,"value":182},{"type":42,"tag":128,"props":435,"children":436},{"class":130,"line":194},[437],{"type":42,"tag":128,"props":438,"children":439},{},[440],{"type":47,"value":441},"\u002F\u002F CORRECT — direct string literals (2024 edition)\n",{"type":42,"tag":128,"props":443,"children":444},{"class":130,"line":25},[445],{"type":42,"tag":128,"props":446,"children":447},{},[448],{"type":47,"value":449},"let s = \"hello\";                    \u002F\u002F String (UTF-8)\n",{"type":42,"tag":128,"props":451,"children":452},{"class":130,"line":211},[453],{"type":42,"tag":128,"props":454,"children":455},{},[456],{"type":47,"value":457},"let ascii = \"hello\";                \u002F\u002F also works for ASCII strings\n",{"type":42,"tag":128,"props":459,"children":460},{"class":130,"line":220},[461],{"type":42,"tag":128,"props":462,"children":463},{},[464],{"type":47,"value":465},"let s = b\"hello\".to_string();      \u002F\u002F still valid but prefer quoted form\n",{"type":42,"tag":128,"props":467,"children":468},{"class":130,"line":229},[469],{"type":42,"tag":128,"props":470,"children":471},{},[472],{"type":47,"value":473},"let ascii = b\"hello\".to_ascii_string(); \u002F\u002F explicit ASCII when needed\n",{"type":42,"tag":74,"props":475,"children":477},{"id":476},"vector-literals-and-methods",[478],{"type":47,"value":479},"Vector Literals and Methods",{"type":42,"tag":53,"props":481,"children":482},{},[483],{"type":47,"value":484},"Use vector literal syntax and method calls instead of module functions.",{"type":42,"tag":117,"props":486,"children":488},{"className":119,"code":487,"language":121,"meta":122,"style":122},"\u002F\u002F WRONG\nlet mut v = vector::empty();\nvector::push_back(&mut v, 10);\nlet first = vector::borrow(&v, 0);\nlet len = vector::length(&v);\n\n\u002F\u002F CORRECT\nlet mut v = vector[10];\nlet first = &v[0];\nlet len = v.length();\nv.push_back(20);\n",[489],{"type":42,"tag":65,"props":490,"children":491},{"__ignoreMap":122},[492,499,507,515,523,531,538,545,553,561,569],{"type":42,"tag":128,"props":493,"children":494},{"class":130,"line":131},[495],{"type":42,"tag":128,"props":496,"children":497},{},[498],{"type":47,"value":273},{"type":42,"tag":128,"props":500,"children":501},{"class":130,"line":29},[502],{"type":42,"tag":128,"props":503,"children":504},{},[505],{"type":47,"value":506},"let mut v = vector::empty();\n",{"type":42,"tag":128,"props":508,"children":509},{"class":130,"line":148},[510],{"type":42,"tag":128,"props":511,"children":512},{},[513],{"type":47,"value":514},"vector::push_back(&mut v, 10);\n",{"type":42,"tag":128,"props":516,"children":517},{"class":130,"line":157},[518],{"type":42,"tag":128,"props":519,"children":520},{},[521],{"type":47,"value":522},"let first = vector::borrow(&v, 0);\n",{"type":42,"tag":128,"props":524,"children":525},{"class":130,"line":166},[526],{"type":42,"tag":128,"props":527,"children":528},{},[529],{"type":47,"value":530},"let len = vector::length(&v);\n",{"type":42,"tag":128,"props":532,"children":533},{"class":130,"line":175},[534],{"type":42,"tag":128,"props":535,"children":536},{"emptyLinePlaceholder":179},[537],{"type":47,"value":182},{"type":42,"tag":128,"props":539,"children":540},{"class":130,"line":185},[541],{"type":42,"tag":128,"props":542,"children":543},{},[544],{"type":47,"value":296},{"type":42,"tag":128,"props":546,"children":547},{"class":130,"line":194},[548],{"type":42,"tag":128,"props":549,"children":550},{},[551],{"type":47,"value":552},"let mut v = vector[10];\n",{"type":42,"tag":128,"props":554,"children":555},{"class":130,"line":25},[556],{"type":42,"tag":128,"props":557,"children":558},{},[559],{"type":47,"value":560},"let first = &v[0];\n",{"type":42,"tag":128,"props":562,"children":563},{"class":130,"line":211},[564],{"type":42,"tag":128,"props":565,"children":566},{},[567],{"type":47,"value":568},"let len = v.length();\n",{"type":42,"tag":128,"props":570,"children":571},{"class":130,"line":220},[572],{"type":42,"tag":128,"props":573,"children":574},{},[575],{"type":47,"value":576},"v.push_back(20);\n",{"type":42,"tag":110,"props":578,"children":580},{"id":579},"collection-index-syntax",[581],{"type":47,"value":582},"Collection Index Syntax",{"type":42,"tag":117,"props":584,"children":586},{"className":119,"code":585,"language":121,"meta":122,"style":122},"\u002F\u002F WRONG\nlet val = vec_map::get(&map, &key);\n\n\u002F\u002F CORRECT\nlet val = &map[&key];\n",[587],{"type":42,"tag":65,"props":588,"children":589},{"__ignoreMap":122},[590,597,605,612,619],{"type":42,"tag":128,"props":591,"children":592},{"class":130,"line":131},[593],{"type":42,"tag":128,"props":594,"children":595},{},[596],{"type":47,"value":273},{"type":42,"tag":128,"props":598,"children":599},{"class":130,"line":29},[600],{"type":42,"tag":128,"props":601,"children":602},{},[603],{"type":47,"value":604},"let val = vec_map::get(&map, &key);\n",{"type":42,"tag":128,"props":606,"children":607},{"class":130,"line":148},[608],{"type":42,"tag":128,"props":609,"children":610},{"emptyLinePlaceholder":179},[611],{"type":47,"value":182},{"type":42,"tag":128,"props":613,"children":614},{"class":130,"line":157},[615],{"type":42,"tag":128,"props":616,"children":617},{},[618],{"type":47,"value":296},{"type":42,"tag":128,"props":620,"children":621},{"class":130,"line":166},[622],{"type":42,"tag":128,"props":623,"children":624},{},[625],{"type":47,"value":626},"let val = &map[&key];\n",{"type":42,"tag":74,"props":628,"children":630},{"id":629},"option-macros",[631],{"type":47,"value":632},"Option Macros",{"type":42,"tag":53,"props":634,"children":635},{},[636,638,644,646,652],{"type":47,"value":637},"Use macros instead of manual ",{"type":42,"tag":65,"props":639,"children":641},{"className":640},[],[642],{"type":47,"value":643},"is_some",{"type":47,"value":645}," \u002F ",{"type":42,"tag":65,"props":647,"children":649},{"className":648},[],[650],{"type":47,"value":651},"destroy_some",{"type":47,"value":653}," patterns.",{"type":42,"tag":117,"props":655,"children":657},{"className":119,"code":656,"language":121,"meta":122,"style":122},"\u002F\u002F WRONG\nif (opt.is_some()) {\n    let value = opt.destroy_some();\n    call_function(value);\n};\n\n\u002F\u002F CORRECT\nopt.do!(|value| call_function(value));\n",[658],{"type":42,"tag":65,"props":659,"children":660},{"__ignoreMap":122},[661,668,676,684,692,700,707,714],{"type":42,"tag":128,"props":662,"children":663},{"class":130,"line":131},[664],{"type":42,"tag":128,"props":665,"children":666},{},[667],{"type":47,"value":273},{"type":42,"tag":128,"props":669,"children":670},{"class":130,"line":29},[671],{"type":42,"tag":128,"props":672,"children":673},{},[674],{"type":47,"value":675},"if (opt.is_some()) {\n",{"type":42,"tag":128,"props":677,"children":678},{"class":130,"line":148},[679],{"type":42,"tag":128,"props":680,"children":681},{},[682],{"type":47,"value":683},"    let value = opt.destroy_some();\n",{"type":42,"tag":128,"props":685,"children":686},{"class":130,"line":157},[687],{"type":42,"tag":128,"props":688,"children":689},{},[690],{"type":47,"value":691},"    call_function(value);\n",{"type":42,"tag":128,"props":693,"children":694},{"class":130,"line":166},[695],{"type":42,"tag":128,"props":696,"children":697},{},[698],{"type":47,"value":699},"};\n",{"type":42,"tag":128,"props":701,"children":702},{"class":130,"line":175},[703],{"type":42,"tag":128,"props":704,"children":705},{"emptyLinePlaceholder":179},[706],{"type":47,"value":182},{"type":42,"tag":128,"props":708,"children":709},{"class":130,"line":185},[710],{"type":42,"tag":128,"props":711,"children":712},{},[713],{"type":47,"value":296},{"type":42,"tag":128,"props":715,"children":716},{"class":130,"line":194},[717],{"type":42,"tag":128,"props":718,"children":719},{},[720],{"type":47,"value":721},"opt.do!(|value| call_function(value));\n",{"type":42,"tag":110,"props":723,"children":725},{"id":724},"default-values",[726],{"type":47,"value":727},"Default values",{"type":42,"tag":117,"props":729,"children":731},{"className":119,"code":730,"language":121,"meta":122,"style":122},"\u002F\u002F WRONG\nlet value = if (opt.is_some()) { opt.destroy_some() } else { default };\n\n\u002F\u002F CORRECT\nlet value = opt.destroy_or!(default);\n",[732],{"type":42,"tag":65,"props":733,"children":734},{"__ignoreMap":122},[735,742,750,757,764],{"type":42,"tag":128,"props":736,"children":737},{"class":130,"line":131},[738],{"type":42,"tag":128,"props":739,"children":740},{},[741],{"type":47,"value":273},{"type":42,"tag":128,"props":743,"children":744},{"class":130,"line":29},[745],{"type":42,"tag":128,"props":746,"children":747},{},[748],{"type":47,"value":749},"let value = if (opt.is_some()) { opt.destroy_some() } else { default };\n",{"type":42,"tag":128,"props":751,"children":752},{"class":130,"line":148},[753],{"type":42,"tag":128,"props":754,"children":755},{"emptyLinePlaceholder":179},[756],{"type":47,"value":182},{"type":42,"tag":128,"props":758,"children":759},{"class":130,"line":157},[760],{"type":42,"tag":128,"props":761,"children":762},{},[763],{"type":47,"value":296},{"type":42,"tag":128,"props":765,"children":766},{"class":130,"line":166},[767],{"type":42,"tag":128,"props":768,"children":769},{},[770],{"type":47,"value":771},"let value = opt.destroy_or!(default);\n",{"type":42,"tag":74,"props":773,"children":775},{"id":774},"loop-macros",[776],{"type":47,"value":777},"Loop Macros",{"type":42,"tag":117,"props":779,"children":781},{"className":119,"code":780,"language":121,"meta":122,"style":122},"\u002F\u002F WRONG — manual counter loop\nlet mut i = 0;\nwhile (i \u003C 32) {\n    do_action();\n    i = i + 1;\n};\n\n\u002F\u002F CORRECT — do! macro\n32u8.do!(|_| do_action());\n",[782],{"type":42,"tag":65,"props":783,"children":784},{"__ignoreMap":122},[785,793,801,809,817,825,832,839,847],{"type":42,"tag":128,"props":786,"children":787},{"class":130,"line":131},[788],{"type":42,"tag":128,"props":789,"children":790},{},[791],{"type":47,"value":792},"\u002F\u002F WRONG — manual counter loop\n",{"type":42,"tag":128,"props":794,"children":795},{"class":130,"line":29},[796],{"type":42,"tag":128,"props":797,"children":798},{},[799],{"type":47,"value":800},"let mut i = 0;\n",{"type":42,"tag":128,"props":802,"children":803},{"class":130,"line":148},[804],{"type":42,"tag":128,"props":805,"children":806},{},[807],{"type":47,"value":808},"while (i \u003C 32) {\n",{"type":42,"tag":128,"props":810,"children":811},{"class":130,"line":157},[812],{"type":42,"tag":128,"props":813,"children":814},{},[815],{"type":47,"value":816},"    do_action();\n",{"type":42,"tag":128,"props":818,"children":819},{"class":130,"line":166},[820],{"type":42,"tag":128,"props":821,"children":822},{},[823],{"type":47,"value":824},"    i = i + 1;\n",{"type":42,"tag":128,"props":826,"children":827},{"class":130,"line":175},[828],{"type":42,"tag":128,"props":829,"children":830},{},[831],{"type":47,"value":699},{"type":42,"tag":128,"props":833,"children":834},{"class":130,"line":185},[835],{"type":42,"tag":128,"props":836,"children":837},{"emptyLinePlaceholder":179},[838],{"type":47,"value":182},{"type":42,"tag":128,"props":840,"children":841},{"class":130,"line":194},[842],{"type":42,"tag":128,"props":843,"children":844},{},[845],{"type":47,"value":846},"\u002F\u002F CORRECT — do! macro\n",{"type":42,"tag":128,"props":848,"children":849},{"class":130,"line":25},[850],{"type":42,"tag":128,"props":851,"children":852},{},[853],{"type":47,"value":854},"32u8.do!(|_| do_action());\n",{"type":42,"tag":110,"props":856,"children":858},{"id":857},"range-based-loops",[859],{"type":47,"value":860},"Range-based loops",{"type":42,"tag":117,"props":862,"children":864},{"className":119,"code":863,"language":121,"meta":122,"style":122},"\u002F\u002F Iterate over a numeric range\nlet mut sum = 0;\n10u64.do!(|i| { sum = sum + i });  \u002F\u002F i goes 0..9\n\n\u002F\u002F With index for more complex logic\nlet mut results = vector[];\n5u64.do!(|i| results.push_back(i * i));  \u002F\u002F [0, 1, 4, 9, 16]\n",[865],{"type":42,"tag":65,"props":866,"children":867},{"__ignoreMap":122},[868,876,884,892,899,907,915],{"type":42,"tag":128,"props":869,"children":870},{"class":130,"line":131},[871],{"type":42,"tag":128,"props":872,"children":873},{},[874],{"type":47,"value":875},"\u002F\u002F Iterate over a numeric range\n",{"type":42,"tag":128,"props":877,"children":878},{"class":130,"line":29},[879],{"type":42,"tag":128,"props":880,"children":881},{},[882],{"type":47,"value":883},"let mut sum = 0;\n",{"type":42,"tag":128,"props":885,"children":886},{"class":130,"line":148},[887],{"type":42,"tag":128,"props":888,"children":889},{},[890],{"type":47,"value":891},"10u64.do!(|i| { sum = sum + i });  \u002F\u002F i goes 0..9\n",{"type":42,"tag":128,"props":893,"children":894},{"class":130,"line":157},[895],{"type":42,"tag":128,"props":896,"children":897},{"emptyLinePlaceholder":179},[898],{"type":47,"value":182},{"type":42,"tag":128,"props":900,"children":901},{"class":130,"line":166},[902],{"type":42,"tag":128,"props":903,"children":904},{},[905],{"type":47,"value":906},"\u002F\u002F With index for more complex logic\n",{"type":42,"tag":128,"props":908,"children":909},{"class":130,"line":175},[910],{"type":42,"tag":128,"props":911,"children":912},{},[913],{"type":47,"value":914},"let mut results = vector[];\n",{"type":42,"tag":128,"props":916,"children":917},{"class":130,"line":185},[918],{"type":42,"tag":128,"props":919,"children":920},{},[921],{"type":47,"value":922},"5u64.do!(|i| results.push_back(i * i));  \u002F\u002F [0, 1, 4, 9, 16]\n",{"type":42,"tag":110,"props":924,"children":926},{"id":925},"vector-iteration",[927],{"type":47,"value":928},"Vector iteration",{"type":42,"tag":117,"props":930,"children":932},{"className":119,"code":931,"language":121,"meta":122,"style":122},"\u002F\u002F WRONG\nlet mut i = 0;\nwhile (i \u003C vec.length()) {\n    call_function(&vec[i]);\n    i = i + 1;\n};\n\n\u002F\u002F CORRECT\nvec.do_ref!(|e| call_function(e));\n",[933],{"type":42,"tag":65,"props":934,"children":935},{"__ignoreMap":122},[936,943,950,958,966,973,980,987,994],{"type":42,"tag":128,"props":937,"children":938},{"class":130,"line":131},[939],{"type":42,"tag":128,"props":940,"children":941},{},[942],{"type":47,"value":273},{"type":42,"tag":128,"props":944,"children":945},{"class":130,"line":29},[946],{"type":42,"tag":128,"props":947,"children":948},{},[949],{"type":47,"value":800},{"type":42,"tag":128,"props":951,"children":952},{"class":130,"line":148},[953],{"type":42,"tag":128,"props":954,"children":955},{},[956],{"type":47,"value":957},"while (i \u003C vec.length()) {\n",{"type":42,"tag":128,"props":959,"children":960},{"class":130,"line":157},[961],{"type":42,"tag":128,"props":962,"children":963},{},[964],{"type":47,"value":965},"    call_function(&vec[i]);\n",{"type":42,"tag":128,"props":967,"children":968},{"class":130,"line":166},[969],{"type":42,"tag":128,"props":970,"children":971},{},[972],{"type":47,"value":824},{"type":42,"tag":128,"props":974,"children":975},{"class":130,"line":175},[976],{"type":42,"tag":128,"props":977,"children":978},{},[979],{"type":47,"value":699},{"type":42,"tag":128,"props":981,"children":982},{"class":130,"line":185},[983],{"type":42,"tag":128,"props":984,"children":985},{"emptyLinePlaceholder":179},[986],{"type":47,"value":182},{"type":42,"tag":128,"props":988,"children":989},{"class":130,"line":194},[990],{"type":42,"tag":128,"props":991,"children":992},{},[993],{"type":47,"value":296},{"type":42,"tag":128,"props":995,"children":996},{"class":130,"line":25},[997],{"type":42,"tag":128,"props":998,"children":999},{},[1000],{"type":47,"value":1001},"vec.do_ref!(|e| call_function(e));\n",{"type":42,"tag":110,"props":1003,"children":1005},{"id":1004},"vector-creation-from-range",[1006],{"type":47,"value":1007},"Vector creation from range",{"type":42,"tag":117,"props":1009,"children":1011},{"className":119,"code":1010,"language":121,"meta":122,"style":122},"\u002F\u002F WRONG\nlet mut v = vector[];\nlet mut i = 0;\nwhile (i \u003C 32) { v.push_back(i); i = i + 1; };\n\n\u002F\u002F CORRECT\nlet v = vector::tabulate!(32, |i| i);\n",[1012],{"type":42,"tag":65,"props":1013,"children":1014},{"__ignoreMap":122},[1015,1022,1030,1037,1045,1052,1059],{"type":42,"tag":128,"props":1016,"children":1017},{"class":130,"line":131},[1018],{"type":42,"tag":128,"props":1019,"children":1020},{},[1021],{"type":47,"value":273},{"type":42,"tag":128,"props":1023,"children":1024},{"class":130,"line":29},[1025],{"type":42,"tag":128,"props":1026,"children":1027},{},[1028],{"type":47,"value":1029},"let mut v = vector[];\n",{"type":42,"tag":128,"props":1031,"children":1032},{"class":130,"line":148},[1033],{"type":42,"tag":128,"props":1034,"children":1035},{},[1036],{"type":47,"value":800},{"type":42,"tag":128,"props":1038,"children":1039},{"class":130,"line":157},[1040],{"type":42,"tag":128,"props":1041,"children":1042},{},[1043],{"type":47,"value":1044},"while (i \u003C 32) { v.push_back(i); i = i + 1; };\n",{"type":42,"tag":128,"props":1046,"children":1047},{"class":130,"line":166},[1048],{"type":42,"tag":128,"props":1049,"children":1050},{"emptyLinePlaceholder":179},[1051],{"type":47,"value":182},{"type":42,"tag":128,"props":1053,"children":1054},{"class":130,"line":175},[1055],{"type":42,"tag":128,"props":1056,"children":1057},{},[1058],{"type":47,"value":296},{"type":42,"tag":128,"props":1060,"children":1061},{"class":130,"line":185},[1062],{"type":42,"tag":128,"props":1063,"children":1064},{},[1065],{"type":47,"value":1066},"let v = vector::tabulate!(32, |i| i);\n",{"type":42,"tag":110,"props":1068,"children":1070},{"id":1069},"fold-and-filter",[1071],{"type":47,"value":1072},"Fold and filter",{"type":42,"tag":117,"props":1074,"children":1076},{"className":119,"code":1075,"language":121,"meta":122,"style":122},"\u002F\u002F fold\nlet sum = source.fold!(0, |acc, v| { acc + v });\n\n\u002F\u002F filter (requires T: drop)\nlet filtered = source.filter!(|e| e > 10);\n",[1077],{"type":42,"tag":65,"props":1078,"children":1079},{"__ignoreMap":122},[1080,1088,1096,1103,1111],{"type":42,"tag":128,"props":1081,"children":1082},{"class":130,"line":131},[1083],{"type":42,"tag":128,"props":1084,"children":1085},{},[1086],{"type":47,"value":1087},"\u002F\u002F fold\n",{"type":42,"tag":128,"props":1089,"children":1090},{"class":130,"line":29},[1091],{"type":42,"tag":128,"props":1092,"children":1093},{},[1094],{"type":47,"value":1095},"let sum = source.fold!(0, |acc, v| { acc + v });\n",{"type":42,"tag":128,"props":1097,"children":1098},{"class":130,"line":148},[1099],{"type":42,"tag":128,"props":1100,"children":1101},{"emptyLinePlaceholder":179},[1102],{"type":47,"value":182},{"type":42,"tag":128,"props":1104,"children":1105},{"class":130,"line":157},[1106],{"type":42,"tag":128,"props":1107,"children":1108},{},[1109],{"type":47,"value":1110},"\u002F\u002F filter (requires T: drop)\n",{"type":42,"tag":128,"props":1112,"children":1113},{"class":130,"line":166},[1114],{"type":42,"tag":128,"props":1115,"children":1116},{},[1117],{"type":47,"value":1118},"let filtered = source.filter!(|e| e > 10);\n",{"type":42,"tag":74,"props":1120,"children":1122},{"id":1121},"struct-unpacking-syntax",[1123,1125,1131],{"type":47,"value":1124},"Struct Unpacking: ",{"type":42,"tag":65,"props":1126,"children":1128},{"className":1127},[],[1129],{"type":47,"value":1130},"..",{"type":47,"value":1132}," Syntax",{"type":42,"tag":53,"props":1134,"children":1135},{},[1136,1138,1143],{"type":47,"value":1137},"Use ",{"type":42,"tag":65,"props":1139,"children":1141},{"className":1140},[],[1142],{"type":47,"value":1130},{"type":47,"value":1144}," to ignore unused fields when destructuring in 2024 edition.",{"type":42,"tag":117,"props":1146,"children":1148},{"className":119,"code":1147,"language":121,"meta":122,"style":122},"\u002F\u002F WRONG\nlet MyStruct { id, field_1: _, field_2: _, field_3: _ } = value;\n\n\u002F\u002F CORRECT\nlet MyStruct { id, .. } = value;\n",[1149],{"type":42,"tag":65,"props":1150,"children":1151},{"__ignoreMap":122},[1152,1159,1167,1174,1181],{"type":42,"tag":128,"props":1153,"children":1154},{"class":130,"line":131},[1155],{"type":42,"tag":128,"props":1156,"children":1157},{},[1158],{"type":47,"value":273},{"type":42,"tag":128,"props":1160,"children":1161},{"class":130,"line":29},[1162],{"type":42,"tag":128,"props":1163,"children":1164},{},[1165],{"type":47,"value":1166},"let MyStruct { id, field_1: _, field_2: _, field_3: _ } = value;\n",{"type":42,"tag":128,"props":1168,"children":1169},{"class":130,"line":148},[1170],{"type":42,"tag":128,"props":1171,"children":1172},{"emptyLinePlaceholder":179},[1173],{"type":47,"value":182},{"type":42,"tag":128,"props":1175,"children":1176},{"class":130,"line":157},[1177],{"type":42,"tag":128,"props":1178,"children":1179},{},[1180],{"type":47,"value":296},{"type":42,"tag":128,"props":1182,"children":1183},{"class":130,"line":166},[1184],{"type":42,"tag":128,"props":1185,"children":1186},{},[1187],{"type":47,"value":1188},"let MyStruct { id, .. } = value;\n",{"type":42,"tag":74,"props":1190,"children":1192},{"id":1191},"renamed-standard-library-functions",[1193],{"type":47,"value":1194},"Renamed Standard Library Functions",{"type":42,"tag":53,"props":1196,"children":1197},{},[1198],{"type":47,"value":1199},"Some standard library functions have been renamed. Using the old name produces a deprecation warning or compile error.",{"type":42,"tag":117,"props":1201,"children":1203},{"className":119,"code":1202,"language":121,"meta":122,"style":122},"\u002F\u002F WRONG — deprecated, renamed\ndynamic_field::exists_(&id, key)\n\n\u002F\u002F CORRECT\ndynamic_field::exists(&id, key)\n",[1204],{"type":42,"tag":65,"props":1205,"children":1206},{"__ignoreMap":122},[1207,1215,1223,1230,1237],{"type":42,"tag":128,"props":1208,"children":1209},{"class":130,"line":131},[1210],{"type":42,"tag":128,"props":1211,"children":1212},{},[1213],{"type":47,"value":1214},"\u002F\u002F WRONG — deprecated, renamed\n",{"type":42,"tag":128,"props":1216,"children":1217},{"class":130,"line":29},[1218],{"type":42,"tag":128,"props":1219,"children":1220},{},[1221],{"type":47,"value":1222},"dynamic_field::exists_(&id, key)\n",{"type":42,"tag":128,"props":1224,"children":1225},{"class":130,"line":148},[1226],{"type":42,"tag":128,"props":1227,"children":1228},{"emptyLinePlaceholder":179},[1229],{"type":47,"value":182},{"type":42,"tag":128,"props":1231,"children":1232},{"class":130,"line":157},[1233],{"type":42,"tag":128,"props":1234,"children":1235},{},[1236],{"type":47,"value":296},{"type":42,"tag":128,"props":1238,"children":1239},{"class":130,"line":166},[1240],{"type":42,"tag":128,"props":1241,"children":1242},{},[1243],{"type":47,"value":1244},"dynamic_field::exists(&id, key)\n",{"type":42,"tag":74,"props":1246,"children":1248},{"id":1247},"positional-fields-tuple-structs",[1249],{"type":47,"value":1250},"Positional Fields (Tuple Structs)",{"type":42,"tag":53,"props":1252,"children":1253},{},[1254],{"type":47,"value":1255},"Structs can use positional fields instead of named fields:",{"type":42,"tag":117,"props":1257,"children":1259},{"className":119,"code":1258,"language":121,"meta":122,"style":122},"\u002F\u002F Named fields (traditional)\npublic struct Wrapper has copy, drop, store { value: u64 }\n\n\u002F\u002F Positional fields (2024 edition)\npublic struct Wrapper(u64) has copy, drop, store;\n\n\u002F\u002F Access by position\nlet w = Wrapper(42);\nlet val = w.0;\n",[1260],{"type":42,"tag":65,"props":1261,"children":1262},{"__ignoreMap":122},[1263,1271,1279,1286,1294,1302,1309,1317,1325],{"type":42,"tag":128,"props":1264,"children":1265},{"class":130,"line":131},[1266],{"type":42,"tag":128,"props":1267,"children":1268},{},[1269],{"type":47,"value":1270},"\u002F\u002F Named fields (traditional)\n",{"type":42,"tag":128,"props":1272,"children":1273},{"class":130,"line":29},[1274],{"type":42,"tag":128,"props":1275,"children":1276},{},[1277],{"type":47,"value":1278},"public struct Wrapper has copy, drop, store { value: u64 }\n",{"type":42,"tag":128,"props":1280,"children":1281},{"class":130,"line":148},[1282],{"type":42,"tag":128,"props":1283,"children":1284},{"emptyLinePlaceholder":179},[1285],{"type":47,"value":182},{"type":42,"tag":128,"props":1287,"children":1288},{"class":130,"line":157},[1289],{"type":42,"tag":128,"props":1290,"children":1291},{},[1292],{"type":47,"value":1293},"\u002F\u002F Positional fields (2024 edition)\n",{"type":42,"tag":128,"props":1295,"children":1296},{"class":130,"line":166},[1297],{"type":42,"tag":128,"props":1298,"children":1299},{},[1300],{"type":47,"value":1301},"public struct Wrapper(u64) has copy, drop, store;\n",{"type":42,"tag":128,"props":1303,"children":1304},{"class":130,"line":175},[1305],{"type":42,"tag":128,"props":1306,"children":1307},{"emptyLinePlaceholder":179},[1308],{"type":47,"value":182},{"type":42,"tag":128,"props":1310,"children":1311},{"class":130,"line":185},[1312],{"type":42,"tag":128,"props":1313,"children":1314},{},[1315],{"type":47,"value":1316},"\u002F\u002F Access by position\n",{"type":42,"tag":128,"props":1318,"children":1319},{"class":130,"line":194},[1320],{"type":42,"tag":128,"props":1321,"children":1322},{},[1323],{"type":47,"value":1324},"let w = Wrapper(42);\n",{"type":42,"tag":128,"props":1326,"children":1327},{"class":130,"line":25},[1328],{"type":42,"tag":128,"props":1329,"children":1330},{},[1331],{"type":47,"value":1332},"let val = w.0;\n",{"type":42,"tag":53,"props":1334,"children":1335},{},[1336,1338,1344],{"type":47,"value":1337},"Positional structs are useful for newtype wrappers and dynamic field keys (see ",{"type":42,"tag":65,"props":1339,"children":1341},{"className":1340},[],[1342],{"type":47,"value":1343},"naming-conventions",{"type":47,"value":1345}," skill).",{"type":42,"tag":74,"props":1347,"children":1349},{"id":1348},"public-structs",[1350],{"type":47,"value":1351},"Public Structs",{"type":42,"tag":53,"props":1353,"children":1354},{},[1355,1357,1363,1365,1370],{"type":47,"value":1356},"The ",{"type":42,"tag":65,"props":1358,"children":1360},{"className":1359},[],[1361],{"type":47,"value":1362},"public",{"type":47,"value":1364}," keyword on structs controls visibility of the struct's fields. Without ",{"type":42,"tag":65,"props":1366,"children":1368},{"className":1367},[],[1369],{"type":47,"value":1362},{"type":47,"value":1371},", fields are module-private — only the defining module can construct or destructure the struct.",{"type":42,"tag":117,"props":1373,"children":1375},{"className":119,"code":1374,"language":121,"meta":122,"style":122},"\u002F\u002F Fields visible only within this module\nstruct Config has key { id: UID, admin: address }\n\n\u002F\u002F Fields visible to other modules\npublic struct Token has key, store { id: UID, value: u64 }\n",[1376],{"type":42,"tag":65,"props":1377,"children":1378},{"__ignoreMap":122},[1379,1387,1395,1402,1410],{"type":42,"tag":128,"props":1380,"children":1381},{"class":130,"line":131},[1382],{"type":42,"tag":128,"props":1383,"children":1384},{},[1385],{"type":47,"value":1386},"\u002F\u002F Fields visible only within this module\n",{"type":42,"tag":128,"props":1388,"children":1389},{"class":130,"line":29},[1390],{"type":42,"tag":128,"props":1391,"children":1392},{},[1393],{"type":47,"value":1394},"struct Config has key { id: UID, admin: address }\n",{"type":42,"tag":128,"props":1396,"children":1397},{"class":130,"line":148},[1398],{"type":42,"tag":128,"props":1399,"children":1400},{"emptyLinePlaceholder":179},[1401],{"type":47,"value":182},{"type":42,"tag":128,"props":1403,"children":1404},{"class":130,"line":157},[1405],{"type":42,"tag":128,"props":1406,"children":1407},{},[1408],{"type":47,"value":1409},"\u002F\u002F Fields visible to other modules\n",{"type":42,"tag":128,"props":1411,"children":1412},{"class":130,"line":166},[1413],{"type":42,"tag":128,"props":1414,"children":1415},{},[1416],{"type":47,"value":1417},"public struct Token has key, store { id: UID, value: u64 }\n",{"type":42,"tag":53,"props":1419,"children":1420},{},[1421,1422,1427],{"type":47,"value":1137},{"type":42,"tag":65,"props":1423,"children":1425},{"className":1424},[],[1426],{"type":47,"value":1362},{"type":47,"value":1428}," when other modules need to read fields or construct\u002Fdestructure the struct. Omit it for encapsulation.",{"type":42,"tag":74,"props":1430,"children":1432},{"id":1431},"enums",[1433],{"type":47,"value":1434},"Enums",{"type":42,"tag":53,"props":1436,"children":1437},{},[1438],{"type":47,"value":1439},"Move 2024 supports enum types:",{"type":42,"tag":117,"props":1441,"children":1443},{"className":119,"code":1442,"language":121,"meta":122,"style":122},"public enum Color {\n    Red,\n    Green,\n    Blue,\n    Custom(u8, u8, u8),\n}\n\npublic fun is_red(c: &Color): bool {\n    match (c) {\n        Color::Red => true,\n        _ => false,\n    }\n}\n",[1444],{"type":42,"tag":65,"props":1445,"children":1446},{"__ignoreMap":122},[1447,1455,1463,1471,1479,1487,1495,1502,1510,1518,1526,1534,1542],{"type":42,"tag":128,"props":1448,"children":1449},{"class":130,"line":131},[1450],{"type":42,"tag":128,"props":1451,"children":1452},{},[1453],{"type":47,"value":1454},"public enum Color {\n",{"type":42,"tag":128,"props":1456,"children":1457},{"class":130,"line":29},[1458],{"type":42,"tag":128,"props":1459,"children":1460},{},[1461],{"type":47,"value":1462},"    Red,\n",{"type":42,"tag":128,"props":1464,"children":1465},{"class":130,"line":148},[1466],{"type":42,"tag":128,"props":1467,"children":1468},{},[1469],{"type":47,"value":1470},"    Green,\n",{"type":42,"tag":128,"props":1472,"children":1473},{"class":130,"line":157},[1474],{"type":42,"tag":128,"props":1475,"children":1476},{},[1477],{"type":47,"value":1478},"    Blue,\n",{"type":42,"tag":128,"props":1480,"children":1481},{"class":130,"line":166},[1482],{"type":42,"tag":128,"props":1483,"children":1484},{},[1485],{"type":47,"value":1486},"    Custom(u8, u8, u8),\n",{"type":42,"tag":128,"props":1488,"children":1489},{"class":130,"line":175},[1490],{"type":42,"tag":128,"props":1491,"children":1492},{},[1493],{"type":47,"value":1494},"}\n",{"type":42,"tag":128,"props":1496,"children":1497},{"class":130,"line":185},[1498],{"type":42,"tag":128,"props":1499,"children":1500},{"emptyLinePlaceholder":179},[1501],{"type":47,"value":182},{"type":42,"tag":128,"props":1503,"children":1504},{"class":130,"line":194},[1505],{"type":42,"tag":128,"props":1506,"children":1507},{},[1508],{"type":47,"value":1509},"public fun is_red(c: &Color): bool {\n",{"type":42,"tag":128,"props":1511,"children":1512},{"class":130,"line":25},[1513],{"type":42,"tag":128,"props":1514,"children":1515},{},[1516],{"type":47,"value":1517},"    match (c) {\n",{"type":42,"tag":128,"props":1519,"children":1520},{"class":130,"line":211},[1521],{"type":42,"tag":128,"props":1522,"children":1523},{},[1524],{"type":47,"value":1525},"        Color::Red => true,\n",{"type":42,"tag":128,"props":1527,"children":1528},{"class":130,"line":220},[1529],{"type":42,"tag":128,"props":1530,"children":1531},{},[1532],{"type":47,"value":1533},"        _ => false,\n",{"type":42,"tag":128,"props":1535,"children":1536},{"class":130,"line":229},[1537],{"type":42,"tag":128,"props":1538,"children":1539},{},[1540],{"type":47,"value":1541},"    }\n",{"type":42,"tag":128,"props":1543,"children":1544},{"class":130,"line":237},[1545],{"type":42,"tag":128,"props":1546,"children":1547},{},[1548],{"type":47,"value":1494},{"type":42,"tag":53,"props":1550,"children":1551},{},[1552,1554,1560,1562,1568],{"type":47,"value":1553},"Enums can have variants with positional fields, named fields, or no fields. Use ",{"type":42,"tag":65,"props":1555,"children":1557},{"className":1556},[],[1558],{"type":47,"value":1559},"match",{"type":47,"value":1561}," expressions for exhaustive pattern matching. Enums cannot have the ",{"type":42,"tag":65,"props":1563,"children":1565},{"className":1564},[],[1566],{"type":47,"value":1567},"key",{"type":47,"value":1569}," ability — they cannot be objects directly, but they can be stored as fields inside objects.",{"type":42,"tag":74,"props":1571,"children":1573},{"id":1572},"quick-reference",[1574],{"type":47,"value":1575},"Quick Reference",{"type":42,"tag":1577,"props":1578,"children":1579},"table",{},[1580,1599],{"type":42,"tag":1581,"props":1582,"children":1583},"thead",{},[1584],{"type":42,"tag":1585,"props":1586,"children":1587},"tr",{},[1588,1594],{"type":42,"tag":1589,"props":1590,"children":1591},"th",{},[1592],{"type":47,"value":1593},"Legacy Pattern",{"type":42,"tag":1589,"props":1595,"children":1596},{},[1597],{"type":47,"value":1598},"Modern 2024 Syntax",{"type":42,"tag":1600,"props":1601,"children":1602},"tbody",{},[1603,1625,1646,1667,1688,1709,1730,1761,1782,1803,1824,1845,1866],{"type":42,"tag":1585,"props":1604,"children":1605},{},[1606,1616],{"type":42,"tag":1607,"props":1608,"children":1609},"td",{},[1610],{"type":42,"tag":65,"props":1611,"children":1613},{"className":1612},[],[1614],{"type":47,"value":1615},"coin::value(&c)",{"type":42,"tag":1607,"props":1617,"children":1618},{},[1619],{"type":42,"tag":65,"props":1620,"children":1622},{"className":1621},[],[1623],{"type":47,"value":1624},"c.value()",{"type":42,"tag":1585,"props":1626,"children":1627},{},[1628,1637],{"type":42,"tag":1607,"props":1629,"children":1630},{},[1631],{"type":42,"tag":65,"props":1632,"children":1634},{"className":1633},[],[1635],{"type":47,"value":1636},"coin::into_balance(c)",{"type":42,"tag":1607,"props":1638,"children":1639},{},[1640],{"type":42,"tag":65,"props":1641,"children":1643},{"className":1642},[],[1644],{"type":47,"value":1645},"c.into_balance()",{"type":42,"tag":1585,"props":1647,"children":1648},{},[1649,1658],{"type":42,"tag":1607,"props":1650,"children":1651},{},[1652],{"type":42,"tag":65,"props":1653,"children":1655},{"className":1654},[],[1656],{"type":47,"value":1657},"balance::join(&mut b, v)",{"type":42,"tag":1607,"props":1659,"children":1660},{},[1661],{"type":42,"tag":65,"props":1662,"children":1664},{"className":1663},[],[1665],{"type":47,"value":1666},"b.join(v)",{"type":42,"tag":1585,"props":1668,"children":1669},{},[1670,1679],{"type":42,"tag":1607,"props":1671,"children":1672},{},[1673],{"type":42,"tag":65,"props":1674,"children":1676},{"className":1675},[],[1677],{"type":47,"value":1678},"balance::split(&mut b, n)",{"type":42,"tag":1607,"props":1680,"children":1681},{},[1682],{"type":42,"tag":65,"props":1683,"children":1685},{"className":1684},[],[1686],{"type":47,"value":1687},"b.split(n)",{"type":42,"tag":1585,"props":1689,"children":1690},{},[1691,1700],{"type":42,"tag":1607,"props":1692,"children":1693},{},[1694],{"type":42,"tag":65,"props":1695,"children":1697},{"className":1696},[],[1698],{"type":47,"value":1699},"tx_context::sender(ctx)",{"type":42,"tag":1607,"props":1701,"children":1702},{},[1703],{"type":42,"tag":65,"props":1704,"children":1706},{"className":1705},[],[1707],{"type":47,"value":1708},"ctx.sender()",{"type":42,"tag":1585,"props":1710,"children":1711},{},[1712,1721],{"type":42,"tag":1607,"props":1713,"children":1714},{},[1715],{"type":42,"tag":65,"props":1716,"children":1718},{"className":1717},[],[1719],{"type":47,"value":1720},"object::delete(id)",{"type":42,"tag":1607,"props":1722,"children":1723},{},[1724],{"type":42,"tag":65,"props":1725,"children":1727},{"className":1726},[],[1728],{"type":47,"value":1729},"id.delete()",{"type":42,"tag":1585,"props":1731,"children":1732},{},[1733,1742],{"type":42,"tag":1607,"props":1734,"children":1735},{},[1736],{"type":42,"tag":65,"props":1737,"children":1739},{"className":1738},[],[1740],{"type":47,"value":1741},"string::utf8(b\"x\")",{"type":42,"tag":1607,"props":1743,"children":1744},{},[1745,1751,1753,1759],{"type":42,"tag":65,"props":1746,"children":1748},{"className":1747},[],[1749],{"type":47,"value":1750},"\"x\"",{"type":47,"value":1752}," (or ",{"type":42,"tag":65,"props":1754,"children":1756},{"className":1755},[],[1757],{"type":47,"value":1758},"b\"x\".to_string()",{"type":47,"value":1760},")",{"type":42,"tag":1585,"props":1762,"children":1763},{},[1764,1773],{"type":42,"tag":1607,"props":1765,"children":1766},{},[1767],{"type":42,"tag":65,"props":1768,"children":1770},{"className":1769},[],[1771],{"type":47,"value":1772},"vector::empty()",{"type":42,"tag":1607,"props":1774,"children":1775},{},[1776],{"type":42,"tag":65,"props":1777,"children":1779},{"className":1778},[],[1780],{"type":47,"value":1781},"vector[]",{"type":42,"tag":1585,"props":1783,"children":1784},{},[1785,1794],{"type":42,"tag":1607,"props":1786,"children":1787},{},[1788],{"type":42,"tag":65,"props":1789,"children":1791},{"className":1790},[],[1792],{"type":47,"value":1793},"vector::push_back(&mut v, x)",{"type":42,"tag":1607,"props":1795,"children":1796},{},[1797],{"type":42,"tag":65,"props":1798,"children":1800},{"className":1799},[],[1801],{"type":47,"value":1802},"v.push_back(x)",{"type":42,"tag":1585,"props":1804,"children":1805},{},[1806,1815],{"type":42,"tag":1607,"props":1807,"children":1808},{},[1809],{"type":42,"tag":65,"props":1810,"children":1812},{"className":1811},[],[1813],{"type":47,"value":1814},"vector::length(&v)",{"type":42,"tag":1607,"props":1816,"children":1817},{},[1818],{"type":42,"tag":65,"props":1819,"children":1821},{"className":1820},[],[1822],{"type":47,"value":1823},"v.length()",{"type":42,"tag":1585,"props":1825,"children":1826},{},[1827,1836],{"type":42,"tag":1607,"props":1828,"children":1829},{},[1830],{"type":42,"tag":65,"props":1831,"children":1833},{"className":1832},[],[1834],{"type":47,"value":1835},"opt.is_some() + destroy_some",{"type":42,"tag":1607,"props":1837,"children":1838},{},[1839],{"type":42,"tag":65,"props":1840,"children":1842},{"className":1841},[],[1843],{"type":47,"value":1844},"opt.do!(|v| ...)",{"type":42,"tag":1585,"props":1846,"children":1847},{},[1848,1857],{"type":42,"tag":1607,"props":1849,"children":1850},{},[1851],{"type":42,"tag":65,"props":1852,"children":1854},{"className":1853},[],[1855],{"type":47,"value":1856},"while (i \u003C n) { ... i++ }",{"type":42,"tag":1607,"props":1858,"children":1859},{},[1860],{"type":42,"tag":65,"props":1861,"children":1863},{"className":1862},[],[1864],{"type":47,"value":1865},"n.do!(|_| ...)",{"type":42,"tag":1585,"props":1867,"children":1868},{},[1869,1878],{"type":42,"tag":1607,"props":1870,"children":1871},{},[1872],{"type":42,"tag":65,"props":1873,"children":1875},{"className":1874},[],[1876],{"type":47,"value":1877},"let S { a, b: _ } = x",{"type":42,"tag":1607,"props":1879,"children":1880},{},[1881],{"type":42,"tag":65,"props":1882,"children":1884},{"className":1883},[],[1885],{"type":47,"value":1886},"let S { a, .. } = x",{"type":42,"tag":1888,"props":1889,"children":1890},"style",{},[1891],{"type":47,"value":1892},"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);}",{"items":1894,"total":2056},[1895,1909,1920,1930,1945,1963,1975,1988,2009,2021,2028,2044],{"slug":1896,"name":1896,"fn":1897,"description":1898,"org":1899,"tags":1900,"stars":1906,"repoUrl":1907,"updatedAt":1908},"move-bytecode-comprehension","analyze and disassemble Move bytecode","Use when reading or reasoning about compiled Move bytecode or `sui move disassemble` output. Mental model for the binary format, what survives compilation (and what's lost), and how to read disassembly soundly. Trigger on \"what does this package do?\", \"read this .mv module\", \"interpret this disassembly\", or whenever an analysis needs to interpret bytecode faithfully.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1901,1904,1905],{"name":1902,"slug":1903,"type":15},"Code Analysis","code-analysis",{"name":20,"slug":21,"type":15},{"name":14,"slug":8,"type":15},7724,"https:\u002F\u002Fgithub.com\u002FMystenLabs\u002Fsui","2026-07-16T05:59:32.904886",{"slug":1910,"name":1910,"fn":1911,"description":1912,"org":1913,"tags":1914,"stars":1906,"repoUrl":1907,"updatedAt":1919},"official-sui-skills","access official Sui development resources","Pointer to the official Mysten Labs skills for building on Sui — language fundamentals, object model, PTBs, SDKs, publishing, upgrades, frontend integration, accessing on-chain data. Maintained upstream at github.com\u002FMystenLabs\u002Fskills; pinned to the same ref the audit catalog derives from (see maintenance\u002FUPSTREAMS.md). Trigger on \"build a contract\", \"publish a package\", \"upgrade a module or package\", \"use the TypeScript SDK\", \"write a PTB\", \"set up a Sui client\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1915,1918],{"name":1916,"slug":1917,"type":15},"Documentation","documentation",{"name":14,"slug":8,"type":15},"2026-07-16T06:00:59.641382",{"slug":1921,"name":1921,"fn":1922,"description":1923,"org":1924,"tags":1925,"stars":1906,"repoUrl":1907,"updatedAt":1929},"sui-and-move-tools","disassemble Sui Move bytecode","Use to get bytecode for a deployed Sui package and produce a disassembled working view. One GraphQL call fetches every module's raw bytecode bytes; `sui move disassemble` (already on the system, running `sui prompt`) produces `.asm` files for analysis. Trigger on \"fetch this package's bytecode\", \"get me the .mv for package X\", \"disassemble this package\", or \"I need to read a deployed Sui package\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1926,1927,1928],{"name":1902,"slug":1903,"type":15},{"name":20,"slug":21,"type":15},{"name":14,"slug":8,"type":15},"2026-07-16T06:02:25.3633",{"slug":1931,"name":1931,"fn":1932,"description":1933,"org":1934,"tags":1935,"stars":1906,"repoUrl":1907,"updatedAt":1944},"sui-move-security-review","audit Sui Move smart contracts","Use when auditing, reviewing, or hunting for vulnerabilities in Move code on Sui. Applies equally to source code (.move files) and to disassembly of compiled bytecode (on-chain packages). A checklist of invariants whose VIOLATION causes exploitable bugs: access control & capabilities, struct abilities & type safety, object lifecycle & ownership, shared-object and PTB attack surface, dynamic fields & collections, arithmetic & coins, init\u002FOTW\u002Fpackage upgrades, hot-potato composability, time & on-chain randomness, and test-only code leakage. Trigger on \"audit this Move code\", \"find vulnerabilities in this Sui contract\", \"security review\", \"is this package safe?\", \"I suspect there's a bug in X\", \"something is wrong with this contract\", or when reasoning about whether a Move function can be abused.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1936,1939,1942,1943],{"name":1937,"slug":1938,"type":15},"Code Review","code-review",{"name":1940,"slug":1941,"type":15},"Security","security",{"name":23,"slug":24,"type":15},{"name":14,"slug":8,"type":15},"2026-07-16T06:02:55.691149",{"slug":1946,"name":1946,"fn":1947,"description":1948,"org":1949,"tags":1950,"stars":1960,"repoUrl":1961,"updatedAt":1962},"memwal","integrate Walrus Memory SDK","Walrus Memory SDK — portable agent memory that works across apps, sessions, and workflows.\n\nUse when users say:\n- \"add memory to my app\"\n- \"portable agent memory\"\n- \"integrate Walrus Memory\"\n- \"AI agent memory\"\n- \"memory across agents\"\n- \"Walrus memory storage\"\n- \"setup Walrus Memory\"\n- \"recall memories\"\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1951,1954,1957],{"name":1952,"slug":1953,"type":15},"Agents","agents",{"name":1955,"slug":1956,"type":15},"Memory","memory",{"name":1958,"slug":1959,"type":15},"SDK","sdk",57,"https:\u002F\u002Fgithub.com\u002FMystenLabs\u002FMemWal","2026-07-16T06:02:39.838395",{"slug":1964,"name":1964,"fn":1965,"description":1966,"org":1967,"tags":1968,"stars":25,"repoUrl":26,"updatedAt":1974},"accessing-data","read data from the Sui network","How to read data from the Sui network. Use when choosing or implementing a data access strategy — queries for on-chain state, indexing pipelines, historical lookups, event subscriptions, cross-chain reads, or off-chain blob storage. Covers the two live Sui APIs (gRPC and GraphQL RPC), the Archival Store, the General-Purpose Indexer, the `sui-indexer-alt` custom indexing framework, and Walrus for off-chain blobs.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1969,1972,1973],{"name":1970,"slug":1971,"type":15},"Data Analysis","data-analysis",{"name":14,"slug":8,"type":15},{"name":17,"slug":18,"type":15},"2026-08-01T05:44:32.775598",{"slug":1976,"name":1976,"fn":1977,"description":1978,"org":1979,"tags":1980,"stars":25,"repoUrl":26,"updatedAt":1987},"composable-move-functions","design composable Sui Move functions","Use when writing Move functions on Sui, especially public APIs. Applies to function visibility (public vs entry), parameter ordering, and return patterns. Use whenever designing function signatures or deciding whether functions should transfer objects or return them.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1981,1984,1985,1986],{"name":1982,"slug":1983,"type":15},"API Development","api-development",{"name":23,"slug":24,"type":15},{"name":14,"slug":8,"type":15},{"name":17,"slug":18,"type":15},"2026-07-16T06:02:49.198495",{"slug":1989,"name":1989,"fn":1990,"description":1991,"org":1992,"tags":1993,"stars":25,"repoUrl":26,"updatedAt":2008},"frontend-apps","build Sui dApps with dapp-kit","Sui frontend \u002F dApp development with @mysten\u002Fdapp-kit-react (React) and @mysten\u002Fdapp-kit-core (Vue, vanilla JS, Svelte, Web Components, other frameworks). Use when building browser apps that connect Sui wallets, query on-chain state, or submit transactions. Covers wallet connection, network switching, transaction execution, query patterns with TanStack React Query, and the specific pitfalls of browser + wallet + async-indexer environments. Pair with the `sui-sdks` skill for @mysten\u002Fsui Transaction construction patterns and the `ptbs` skill for PTB semantics.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1994,1997,2000,2001,2004,2007],{"name":1995,"slug":1996,"type":15},"Frontend","frontend",{"name":1998,"slug":1999,"type":15},"React","react",{"name":14,"slug":8,"type":15},{"name":2002,"slug":2003,"type":15},"Svelte","svelte",{"name":2005,"slug":2006,"type":15},"Vue","vue",{"name":17,"slug":18,"type":15},"2026-08-01T05:44:28.958473",{"slug":2010,"name":2010,"fn":2011,"description":2012,"org":2013,"tags":2014,"stars":25,"repoUrl":26,"updatedAt":2020},"generate-sui-agent-config","generate configuration files for Sui projects","Generate a CLAUDE.md or AGENT.md configuration file for Sui projects. Use when setting up a new Sui project, when user mentions \"CLAUDE.md\", \"AGENT.md\", \"agent config\", or when working on a Sui project that does not already have a CLAUDE.md or AGENT.md in the project root.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2015,2018,2019],{"name":2016,"slug":2017,"type":15},"Configuration","configuration",{"name":1916,"slug":1917,"type":15},{"name":14,"slug":8,"type":15},"2026-07-16T06:00:59.981056",{"slug":4,"name":4,"fn":5,"description":6,"org":2022,"tags":2023,"stars":25,"repoUrl":26,"updatedAt":27},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2024,2025,2026,2027],{"name":20,"slug":21,"type":15},{"name":23,"slug":24,"type":15},{"name":14,"slug":8,"type":15},{"name":17,"slug":18,"type":15},{"slug":2029,"name":2029,"fn":2030,"description":2031,"org":2032,"tags":2033,"stars":25,"repoUrl":26,"updatedAt":2043},"move-unit-testing","write unit tests for Sui Move contracts","Use when writing unit tests for Move smart contracts on Sui. Applies to test function naming, assertions, test attributes, context usage, and cleanup patterns. Use whenever user asks to write tests, add tests, or test a Move module.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2034,2037,2038,2039,2042],{"name":2035,"slug":2036,"type":15},"QA","qa",{"name":23,"slug":24,"type":15},{"name":14,"slug":8,"type":15},{"name":2040,"slug":2041,"type":15},"Testing","testing",{"name":17,"slug":18,"type":15},"2026-08-01T05:44:30.788585",{"slug":1343,"name":1343,"fn":2045,"description":2046,"org":2047,"tags":2048,"stars":25,"repoUrl":26,"updatedAt":2055},"apply Sui Move naming conventions","Use when writing or reviewing Move smart contracts on Sui. Applies to naming structs, error constants, regular constants, events, getter functions, capability types, hot potato types, and dynamic field keys. Use whenever creating new types, functions, or constants in Move code.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2049,2052,2053,2054],{"name":2050,"slug":2051,"type":15},"Best Practices","best-practices",{"name":23,"slug":24,"type":15},{"name":14,"slug":8,"type":15},{"name":17,"slug":18,"type":15},"2026-07-16T06:02:48.830052",37,{"items":2058,"total":2109},[2059,2065,2072,2081,2087,2094,2102],{"slug":1964,"name":1964,"fn":1965,"description":1966,"org":2060,"tags":2061,"stars":25,"repoUrl":26,"updatedAt":1974},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2062,2063,2064],{"name":1970,"slug":1971,"type":15},{"name":14,"slug":8,"type":15},{"name":17,"slug":18,"type":15},{"slug":1976,"name":1976,"fn":1977,"description":1978,"org":2066,"tags":2067,"stars":25,"repoUrl":26,"updatedAt":1987},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2068,2069,2070,2071],{"name":1982,"slug":1983,"type":15},{"name":23,"slug":24,"type":15},{"name":14,"slug":8,"type":15},{"name":17,"slug":18,"type":15},{"slug":1989,"name":1989,"fn":1990,"description":1991,"org":2073,"tags":2074,"stars":25,"repoUrl":26,"updatedAt":2008},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2075,2076,2077,2078,2079,2080],{"name":1995,"slug":1996,"type":15},{"name":1998,"slug":1999,"type":15},{"name":14,"slug":8,"type":15},{"name":2002,"slug":2003,"type":15},{"name":2005,"slug":2006,"type":15},{"name":17,"slug":18,"type":15},{"slug":2010,"name":2010,"fn":2011,"description":2012,"org":2082,"tags":2083,"stars":25,"repoUrl":26,"updatedAt":2020},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2084,2085,2086],{"name":2016,"slug":2017,"type":15},{"name":1916,"slug":1917,"type":15},{"name":14,"slug":8,"type":15},{"slug":4,"name":4,"fn":5,"description":6,"org":2088,"tags":2089,"stars":25,"repoUrl":26,"updatedAt":27},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2090,2091,2092,2093],{"name":20,"slug":21,"type":15},{"name":23,"slug":24,"type":15},{"name":14,"slug":8,"type":15},{"name":17,"slug":18,"type":15},{"slug":2029,"name":2029,"fn":2030,"description":2031,"org":2095,"tags":2096,"stars":25,"repoUrl":26,"updatedAt":2043},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2097,2098,2099,2100,2101],{"name":2035,"slug":2036,"type":15},{"name":23,"slug":24,"type":15},{"name":14,"slug":8,"type":15},{"name":2040,"slug":2041,"type":15},{"name":17,"slug":18,"type":15},{"slug":1343,"name":1343,"fn":2045,"description":2046,"org":2103,"tags":2104,"stars":25,"repoUrl":26,"updatedAt":2055},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2105,2106,2107,2108],{"name":2050,"slug":2051,"type":15},{"name":23,"slug":24,"type":15},{"name":14,"slug":8,"type":15},{"name":17,"slug":18,"type":15},20]