diff --git a/src/icons/optimized/rust.svg b/src/icons/optimized/rust.svg new file mode 100644 index 0000000000..350ce08d06 --- /dev/null +++ b/src/icons/optimized/rust.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/output/_variables.scss b/src/icons/output/_variables.scss index dcaa908c0a..2a0a56c17d 100644 --- a/src/icons/output/_variables.scss +++ b/src/icons/output/_variables.scss @@ -5,63 +5,64 @@ $web-icon-refine: "\ea04"; $web-icon-microsoft: "\ea05"; $web-icon-platform: "\ea06"; $web-icon-vue: "\ea07"; -$web-icon-chevron-down: "\ea08"; -$web-icon-firebase: "\ea09"; -$web-icon-github: "\ea0a"; -$web-icon-ticket: "\ea0b"; -$web-icon-sparkle: "\ea0c"; -$web-icon-divider-vertical: "\ea0d"; -$web-icon-nuxt: "\ea0e"; -$web-icon-chevron-up: "\ea0f"; -$web-icon-ycombinator: "\ea10"; -$web-icon-x: "\ea11"; -$web-icon-textmagic: "\ea12"; -$web-icon-daily-dev: "\ea13"; -$web-icon-chevron-right: "\ea14"; -$web-icon-instagram: "\ea15"; -$web-icon-ext-link: "\ea16"; -$web-icon-arrow-right: "\ea17"; -$web-icon-edge: "\ea18"; -$web-icon-download: "\ea19"; -$web-icon-dark: "\ea1a"; -$web-icon-bluesky: "\ea1b"; -$web-icon-plus: "\ea1c"; -$web-icon-check: "\ea1d"; -$web-icon-close: "\ea1e"; -$web-icon-copy: "\ea1f"; -$web-icon-message: "\ea20"; -$web-icon-play: "\ea21"; -$web-icon-remix: "\ea22"; -$web-icon-skills: "\ea23"; -$web-icon-hamburger-menu: "\ea24"; -$web-icon-google: "\ea25"; -$web-icon-rest: "\ea26"; -$web-icon-star: "\ea27"; -$web-icon-mailgun: "\ea28"; -$web-icon-regions: "\ea29"; -$web-icon-youtube: "\ea2a"; -$web-icon-command: "\ea2b"; -$web-icon-logout-right: "\ea2c"; -$web-icon-tanstack: "\ea2d"; -$web-icon-location: "\ea2e"; -$web-icon-arrow-up: "\ea2f"; -$web-icon-linkedin: "\ea30"; -$web-icon-arena: "\ea31"; -$web-icon-twitter: "\ea32"; -$web-icon-customize: "\ea33"; -$web-icon-discord: "\ea34"; -$web-icon-calendar: "\ea35"; -$web-icon-arrow-left: "\ea36"; -$web-icon-sendgrid: "\ea37"; -$web-icon-pop-locations: "\ea38"; -$web-icon-product-hunt: "\ea39"; -$web-icon-appwrite: "\ea3a"; -$web-icon-arrow-ext-link: "\ea3b"; -$web-icon-logout-left: "\ea3c"; -$web-icon-external-icon: "\ea3d"; -$web-icon-apple: "\ea3e"; -$web-icon-tiktok: "\ea3f"; -$web-icon-minus: "\ea40"; -$web-icon-chevron-left: "\ea41"; -$web-icon-light: "\ea42"; -$web-icon-mcp: "\ea43"; +$web-icon-rust: "\ea08"; +$web-icon-chevron-down: "\ea09"; +$web-icon-firebase: "\ea0a"; +$web-icon-github: "\ea0b"; +$web-icon-ticket: "\ea0c"; +$web-icon-sparkle: "\ea0d"; +$web-icon-divider-vertical: "\ea0e"; +$web-icon-nuxt: "\ea0f"; +$web-icon-chevron-up: "\ea10"; +$web-icon-ycombinator: "\ea11"; +$web-icon-x: "\ea12"; +$web-icon-textmagic: "\ea13"; +$web-icon-daily-dev: "\ea14"; +$web-icon-chevron-right: "\ea15"; +$web-icon-instagram: "\ea16"; +$web-icon-ext-link: "\ea17"; +$web-icon-arrow-right: "\ea18"; +$web-icon-edge: "\ea19"; +$web-icon-download: "\ea1a"; +$web-icon-dark: "\ea1b"; +$web-icon-bluesky: "\ea1c"; +$web-icon-plus: "\ea1d"; +$web-icon-check: "\ea1e"; +$web-icon-close: "\ea1f"; +$web-icon-copy: "\ea20"; +$web-icon-message: "\ea21"; +$web-icon-play: "\ea22"; +$web-icon-remix: "\ea23"; +$web-icon-skills: "\ea24"; +$web-icon-hamburger-menu: "\ea25"; +$web-icon-google: "\ea26"; +$web-icon-rest: "\ea27"; +$web-icon-star: "\ea28"; +$web-icon-mailgun: "\ea29"; +$web-icon-regions: "\ea2a"; +$web-icon-youtube: "\ea2b"; +$web-icon-command: "\ea2c"; +$web-icon-logout-right: "\ea2d"; +$web-icon-tanstack: "\ea2e"; +$web-icon-location: "\ea2f"; +$web-icon-arrow-up: "\ea30"; +$web-icon-linkedin: "\ea31"; +$web-icon-arena: "\ea32"; +$web-icon-twitter: "\ea33"; +$web-icon-customize: "\ea34"; +$web-icon-discord: "\ea35"; +$web-icon-calendar: "\ea36"; +$web-icon-arrow-left: "\ea37"; +$web-icon-sendgrid: "\ea38"; +$web-icon-pop-locations: "\ea39"; +$web-icon-product-hunt: "\ea3a"; +$web-icon-appwrite: "\ea3b"; +$web-icon-arrow-ext-link: "\ea3c"; +$web-icon-logout-left: "\ea3d"; +$web-icon-external-icon: "\ea3e"; +$web-icon-apple: "\ea3f"; +$web-icon-tiktok: "\ea40"; +$web-icon-minus: "\ea41"; +$web-icon-chevron-left: "\ea42"; +$web-icon-light: "\ea43"; +$web-icon-mcp: "\ea44"; diff --git a/src/icons/output/info.json b/src/icons/output/info.json index d978b129ba..49f9c070ed 100644 --- a/src/icons/output/info.json +++ b/src/icons/output/info.json @@ -41,364 +41,370 @@ "className": "web-icon-vue", "unicode": "" }, - "chevron-down": { + "rust": { "encodedCode": "\\ea08", "prefix": "web-icon", - "className": "web-icon-chevron-down", + "className": "web-icon-rust", "unicode": "" }, - "firebase": { + "chevron-down": { "encodedCode": "\\ea09", "prefix": "web-icon", - "className": "web-icon-firebase", + "className": "web-icon-chevron-down", "unicode": "" }, - "github": { + "firebase": { "encodedCode": "\\ea0a", "prefix": "web-icon", - "className": "web-icon-github", + "className": "web-icon-firebase", "unicode": "" }, - "ticket": { + "github": { "encodedCode": "\\ea0b", "prefix": "web-icon", - "className": "web-icon-ticket", + "className": "web-icon-github", "unicode": "" }, - "sparkle": { + "ticket": { "encodedCode": "\\ea0c", "prefix": "web-icon", - "className": "web-icon-sparkle", + "className": "web-icon-ticket", "unicode": "" }, - "divider-vertical": { + "sparkle": { "encodedCode": "\\ea0d", "prefix": "web-icon", - "className": "web-icon-divider-vertical", + "className": "web-icon-sparkle", "unicode": "" }, - "nuxt": { + "divider-vertical": { "encodedCode": "\\ea0e", "prefix": "web-icon", - "className": "web-icon-nuxt", + "className": "web-icon-divider-vertical", "unicode": "" }, - "chevron-up": { + "nuxt": { "encodedCode": "\\ea0f", "prefix": "web-icon", - "className": "web-icon-chevron-up", + "className": "web-icon-nuxt", "unicode": "" }, - "ycombinator": { + "chevron-up": { "encodedCode": "\\ea10", "prefix": "web-icon", - "className": "web-icon-ycombinator", + "className": "web-icon-chevron-up", "unicode": "" }, - "x": { + "ycombinator": { "encodedCode": "\\ea11", "prefix": "web-icon", - "className": "web-icon-x", + "className": "web-icon-ycombinator", "unicode": "" }, - "textmagic": { + "x": { "encodedCode": "\\ea12", "prefix": "web-icon", - "className": "web-icon-textmagic", + "className": "web-icon-x", "unicode": "" }, - "daily-dev": { + "textmagic": { "encodedCode": "\\ea13", "prefix": "web-icon", - "className": "web-icon-daily-dev", + "className": "web-icon-textmagic", "unicode": "" }, - "chevron-right": { + "daily-dev": { "encodedCode": "\\ea14", "prefix": "web-icon", - "className": "web-icon-chevron-right", + "className": "web-icon-daily-dev", "unicode": "" }, - "instagram": { + "chevron-right": { "encodedCode": "\\ea15", "prefix": "web-icon", - "className": "web-icon-instagram", + "className": "web-icon-chevron-right", "unicode": "" }, - "ext-link": { + "instagram": { "encodedCode": "\\ea16", "prefix": "web-icon", - "className": "web-icon-ext-link", + "className": "web-icon-instagram", "unicode": "" }, - "arrow-right": { + "ext-link": { "encodedCode": "\\ea17", "prefix": "web-icon", - "className": "web-icon-arrow-right", + "className": "web-icon-ext-link", "unicode": "" }, - "edge": { + "arrow-right": { "encodedCode": "\\ea18", "prefix": "web-icon", - "className": "web-icon-edge", + "className": "web-icon-arrow-right", "unicode": "" }, - "download": { + "edge": { "encodedCode": "\\ea19", "prefix": "web-icon", - "className": "web-icon-download", + "className": "web-icon-edge", "unicode": "" }, - "dark": { + "download": { "encodedCode": "\\ea1a", "prefix": "web-icon", - "className": "web-icon-dark", + "className": "web-icon-download", "unicode": "" }, - "bluesky": { + "dark": { "encodedCode": "\\ea1b", "prefix": "web-icon", - "className": "web-icon-bluesky", + "className": "web-icon-dark", "unicode": "" }, - "plus": { + "bluesky": { "encodedCode": "\\ea1c", "prefix": "web-icon", - "className": "web-icon-plus", + "className": "web-icon-bluesky", "unicode": "" }, - "check": { + "plus": { "encodedCode": "\\ea1d", "prefix": "web-icon", - "className": "web-icon-check", + "className": "web-icon-plus", "unicode": "" }, - "close": { + "check": { "encodedCode": "\\ea1e", "prefix": "web-icon", - "className": "web-icon-close", + "className": "web-icon-check", "unicode": "" }, - "copy": { + "close": { "encodedCode": "\\ea1f", "prefix": "web-icon", - "className": "web-icon-copy", + "className": "web-icon-close", "unicode": "" }, - "message": { + "copy": { "encodedCode": "\\ea20", "prefix": "web-icon", - "className": "web-icon-message", + "className": "web-icon-copy", "unicode": "" }, - "play": { + "message": { "encodedCode": "\\ea21", "prefix": "web-icon", - "className": "web-icon-play", + "className": "web-icon-message", "unicode": "" }, - "remix": { + "play": { "encodedCode": "\\ea22", "prefix": "web-icon", - "className": "web-icon-remix", + "className": "web-icon-play", "unicode": "" }, - "skills": { + "remix": { "encodedCode": "\\ea23", "prefix": "web-icon", - "className": "web-icon-skills", + "className": "web-icon-remix", "unicode": "" }, - "hamburger-menu": { + "skills": { "encodedCode": "\\ea24", "prefix": "web-icon", - "className": "web-icon-hamburger-menu", + "className": "web-icon-skills", "unicode": "" }, - "google": { + "hamburger-menu": { "encodedCode": "\\ea25", "prefix": "web-icon", - "className": "web-icon-google", + "className": "web-icon-hamburger-menu", "unicode": "" }, - "rest": { + "google": { "encodedCode": "\\ea26", "prefix": "web-icon", - "className": "web-icon-rest", + "className": "web-icon-google", "unicode": "" }, - "star": { + "rest": { "encodedCode": "\\ea27", "prefix": "web-icon", - "className": "web-icon-star", + "className": "web-icon-rest", "unicode": "" }, - "mailgun": { + "star": { "encodedCode": "\\ea28", "prefix": "web-icon", - "className": "web-icon-mailgun", + "className": "web-icon-star", "unicode": "" }, - "regions": { + "mailgun": { "encodedCode": "\\ea29", "prefix": "web-icon", - "className": "web-icon-regions", + "className": "web-icon-mailgun", "unicode": "" }, - "youtube": { + "regions": { "encodedCode": "\\ea2a", "prefix": "web-icon", - "className": "web-icon-youtube", + "className": "web-icon-regions", "unicode": "" }, - "command": { + "youtube": { "encodedCode": "\\ea2b", "prefix": "web-icon", - "className": "web-icon-command", + "className": "web-icon-youtube", "unicode": "" }, - "logout-right": { + "command": { "encodedCode": "\\ea2c", "prefix": "web-icon", - "className": "web-icon-logout-right", + "className": "web-icon-command", "unicode": "" }, - "tanstack": { + "logout-right": { "encodedCode": "\\ea2d", "prefix": "web-icon", - "className": "web-icon-tanstack", + "className": "web-icon-logout-right", "unicode": "" }, - "location": { + "tanstack": { "encodedCode": "\\ea2e", "prefix": "web-icon", - "className": "web-icon-location", + "className": "web-icon-tanstack", "unicode": "" }, - "arrow-up": { + "location": { "encodedCode": "\\ea2f", "prefix": "web-icon", - "className": "web-icon-arrow-up", + "className": "web-icon-location", "unicode": "" }, - "linkedin": { + "arrow-up": { "encodedCode": "\\ea30", "prefix": "web-icon", - "className": "web-icon-linkedin", + "className": "web-icon-arrow-up", "unicode": "" }, - "arena": { + "linkedin": { "encodedCode": "\\ea31", "prefix": "web-icon", - "className": "web-icon-arena", + "className": "web-icon-linkedin", "unicode": "" }, - "twitter": { + "arena": { "encodedCode": "\\ea32", "prefix": "web-icon", - "className": "web-icon-twitter", + "className": "web-icon-arena", "unicode": "" }, - "customize": { + "twitter": { "encodedCode": "\\ea33", "prefix": "web-icon", - "className": "web-icon-customize", + "className": "web-icon-twitter", "unicode": "" }, - "discord": { + "customize": { "encodedCode": "\\ea34", "prefix": "web-icon", - "className": "web-icon-discord", + "className": "web-icon-customize", "unicode": "" }, - "calendar": { + "discord": { "encodedCode": "\\ea35", "prefix": "web-icon", - "className": "web-icon-calendar", + "className": "web-icon-discord", "unicode": "" }, - "arrow-left": { + "calendar": { "encodedCode": "\\ea36", "prefix": "web-icon", - "className": "web-icon-arrow-left", + "className": "web-icon-calendar", "unicode": "" }, - "sendgrid": { + "arrow-left": { "encodedCode": "\\ea37", "prefix": "web-icon", - "className": "web-icon-sendgrid", + "className": "web-icon-arrow-left", "unicode": "" }, - "pop-locations": { + "sendgrid": { "encodedCode": "\\ea38", "prefix": "web-icon", - "className": "web-icon-pop-locations", + "className": "web-icon-sendgrid", "unicode": "" }, - "product-hunt": { + "pop-locations": { "encodedCode": "\\ea39", "prefix": "web-icon", - "className": "web-icon-product-hunt", + "className": "web-icon-pop-locations", "unicode": "" }, - "appwrite": { + "product-hunt": { "encodedCode": "\\ea3a", "prefix": "web-icon", - "className": "web-icon-appwrite", + "className": "web-icon-product-hunt", "unicode": "" }, - "arrow-ext-link": { + "appwrite": { "encodedCode": "\\ea3b", "prefix": "web-icon", - "className": "web-icon-arrow-ext-link", + "className": "web-icon-appwrite", "unicode": "" }, - "logout-left": { + "arrow-ext-link": { "encodedCode": "\\ea3c", "prefix": "web-icon", - "className": "web-icon-logout-left", + "className": "web-icon-arrow-ext-link", "unicode": "" }, - "external-icon": { + "logout-left": { "encodedCode": "\\ea3d", "prefix": "web-icon", - "className": "web-icon-external-icon", + "className": "web-icon-logout-left", "unicode": "" }, - "apple": { + "external-icon": { "encodedCode": "\\ea3e", "prefix": "web-icon", - "className": "web-icon-apple", + "className": "web-icon-external-icon", "unicode": "" }, - "tiktok": { + "apple": { "encodedCode": "\\ea3f", "prefix": "web-icon", - "className": "web-icon-tiktok", + "className": "web-icon-apple", "unicode": "" }, - "minus": { + "tiktok": { "encodedCode": "\\ea40", "prefix": "web-icon", - "className": "web-icon-minus", + "className": "web-icon-tiktok", "unicode": "" }, - "chevron-left": { + "minus": { "encodedCode": "\\ea41", "prefix": "web-icon", - "className": "web-icon-chevron-left", + "className": "web-icon-minus", "unicode": "" }, - "light": { + "chevron-left": { "encodedCode": "\\ea42", "prefix": "web-icon", - "className": "web-icon-light", + "className": "web-icon-chevron-left", "unicode": "" }, - "mcp": { + "light": { "encodedCode": "\\ea43", "prefix": "web-icon", - "className": "web-icon-mcp", + "className": "web-icon-light", "unicode": "" + }, + "mcp": { + "encodedCode": "\\ea44", + "prefix": "web-icon", + "className": "web-icon-mcp", + "unicode": "" } } diff --git a/src/icons/output/web-icon.css b/src/icons/output/web-icon.css index 5ecbd31caa..914702986b 100644 --- a/src/icons/output/web-icon.css +++ b/src/icons/output/web-icon.css @@ -41,183 +41,186 @@ .web-icon-vue:before { content: '\ea07'; } -.web-icon-chevron-down:before { +.web-icon-rust:before { content: '\ea08'; } -.web-icon-firebase:before { +.web-icon-chevron-down:before { content: '\ea09'; } -.web-icon-github:before { +.web-icon-firebase:before { content: '\ea0a'; } -.web-icon-ticket:before { +.web-icon-github:before { content: '\ea0b'; } -.web-icon-sparkle:before { +.web-icon-ticket:before { content: '\ea0c'; } -.web-icon-divider-vertical:before { +.web-icon-sparkle:before { content: '\ea0d'; } -.web-icon-nuxt:before { +.web-icon-divider-vertical:before { content: '\ea0e'; } -.web-icon-chevron-up:before { +.web-icon-nuxt:before { content: '\ea0f'; } -.web-icon-ycombinator:before { +.web-icon-chevron-up:before { content: '\ea10'; } -.web-icon-x:before { +.web-icon-ycombinator:before { content: '\ea11'; } -.web-icon-textmagic:before { +.web-icon-x:before { content: '\ea12'; } -.web-icon-daily-dev:before { +.web-icon-textmagic:before { content: '\ea13'; } -.web-icon-chevron-right:before { +.web-icon-daily-dev:before { content: '\ea14'; } -.web-icon-instagram:before { +.web-icon-chevron-right:before { content: '\ea15'; } -.web-icon-ext-link:before { +.web-icon-instagram:before { content: '\ea16'; } -.web-icon-arrow-right:before { +.web-icon-ext-link:before { content: '\ea17'; } -.web-icon-edge:before { +.web-icon-arrow-right:before { content: '\ea18'; } -.web-icon-download:before { +.web-icon-edge:before { content: '\ea19'; } -.web-icon-dark:before { +.web-icon-download:before { content: '\ea1a'; } -.web-icon-bluesky:before { +.web-icon-dark:before { content: '\ea1b'; } -.web-icon-plus:before { +.web-icon-bluesky:before { content: '\ea1c'; } -.web-icon-check:before { +.web-icon-plus:before { content: '\ea1d'; } -.web-icon-close:before { +.web-icon-check:before { content: '\ea1e'; } -.web-icon-copy:before { +.web-icon-close:before { content: '\ea1f'; } -.web-icon-message:before { +.web-icon-copy:before { content: '\ea20'; } -.web-icon-play:before { +.web-icon-message:before { content: '\ea21'; } -.web-icon-remix:before { +.web-icon-play:before { content: '\ea22'; } -.web-icon-skills:before { +.web-icon-remix:before { content: '\ea23'; } -.web-icon-hamburger-menu:before { +.web-icon-skills:before { content: '\ea24'; } -.web-icon-google:before { +.web-icon-hamburger-menu:before { content: '\ea25'; } -.web-icon-rest:before { +.web-icon-google:before { content: '\ea26'; } -.web-icon-star:before { +.web-icon-rest:before { content: '\ea27'; } -.web-icon-mailgun:before { +.web-icon-star:before { content: '\ea28'; } -.web-icon-regions:before { +.web-icon-mailgun:before { content: '\ea29'; } -.web-icon-youtube:before { +.web-icon-regions:before { content: '\ea2a'; } -.web-icon-command:before { +.web-icon-youtube:before { content: '\ea2b'; } -.web-icon-logout-right:before { +.web-icon-command:before { content: '\ea2c'; } -.web-icon-tanstack:before { +.web-icon-logout-right:before { content: '\ea2d'; } -.web-icon-location:before { +.web-icon-tanstack:before { content: '\ea2e'; } -.web-icon-arrow-up:before { +.web-icon-location:before { content: '\ea2f'; } -.web-icon-linkedin:before { +.web-icon-arrow-up:before { content: '\ea30'; } -.web-icon-arena:before { +.web-icon-linkedin:before { content: '\ea31'; } -.web-icon-twitter:before { +.web-icon-arena:before { content: '\ea32'; } -.web-icon-customize:before { +.web-icon-twitter:before { content: '\ea33'; } -.web-icon-discord:before { +.web-icon-customize:before { content: '\ea34'; } -.web-icon-calendar:before { +.web-icon-discord:before { content: '\ea35'; } -.web-icon-arrow-left:before { +.web-icon-calendar:before { content: '\ea36'; } -.web-icon-sendgrid:before { +.web-icon-arrow-left:before { content: '\ea37'; } -.web-icon-pop-locations:before { +.web-icon-sendgrid:before { content: '\ea38'; } -.web-icon-product-hunt:before { +.web-icon-pop-locations:before { content: '\ea39'; } -.web-icon-appwrite:before { +.web-icon-product-hunt:before { content: '\ea3a'; } -.web-icon-arrow-ext-link:before { +.web-icon-appwrite:before { content: '\ea3b'; } -.web-icon-logout-left:before { +.web-icon-arrow-ext-link:before { content: '\ea3c'; } -.web-icon-external-icon:before { +.web-icon-logout-left:before { content: '\ea3d'; } -.web-icon-apple:before { +.web-icon-external-icon:before { content: '\ea3e'; } -.web-icon-tiktok:before { +.web-icon-apple:before { content: '\ea3f'; } -.web-icon-minus:before { +.web-icon-tiktok:before { content: '\ea40'; } -.web-icon-chevron-left:before { +.web-icon-minus:before { content: '\ea41'; } -.web-icon-light:before { +.web-icon-chevron-left:before { content: '\ea42'; } -.web-icon-mcp:before { +.web-icon-light:before { content: '\ea43'; } +.web-icon-mcp:before { + content: '\ea44'; +} diff --git a/src/icons/output/web-icon.eot b/src/icons/output/web-icon.eot index cc7fe4355c..428dc6f998 100644 Binary files a/src/icons/output/web-icon.eot and b/src/icons/output/web-icon.eot differ diff --git a/src/icons/output/web-icon.scss b/src/icons/output/web-icon.scss index 8e3eeef38b..0913ae9ad4 100644 --- a/src/icons/output/web-icon.scss +++ b/src/icons/output/web-icon.scss @@ -23,66 +23,67 @@ .web-icon-microsoft:before { content: "\ea05"; } .web-icon-platform:before { content: "\ea06"; } .web-icon-vue:before { content: "\ea07"; } -.web-icon-chevron-down:before { content: "\ea08"; } -.web-icon-firebase:before { content: "\ea09"; } -.web-icon-github:before { content: "\ea0a"; } -.web-icon-ticket:before { content: "\ea0b"; } -.web-icon-sparkle:before { content: "\ea0c"; } -.web-icon-divider-vertical:before { content: "\ea0d"; } -.web-icon-nuxt:before { content: "\ea0e"; } -.web-icon-chevron-up:before { content: "\ea0f"; } -.web-icon-ycombinator:before { content: "\ea10"; } -.web-icon-x:before { content: "\ea11"; } -.web-icon-textmagic:before { content: "\ea12"; } -.web-icon-daily-dev:before { content: "\ea13"; } -.web-icon-chevron-right:before { content: "\ea14"; } -.web-icon-instagram:before { content: "\ea15"; } -.web-icon-ext-link:before { content: "\ea16"; } -.web-icon-arrow-right:before { content: "\ea17"; } -.web-icon-edge:before { content: "\ea18"; } -.web-icon-download:before { content: "\ea19"; } -.web-icon-dark:before { content: "\ea1a"; } -.web-icon-bluesky:before { content: "\ea1b"; } -.web-icon-plus:before { content: "\ea1c"; } -.web-icon-check:before { content: "\ea1d"; } -.web-icon-close:before { content: "\ea1e"; } -.web-icon-copy:before { content: "\ea1f"; } -.web-icon-message:before { content: "\ea20"; } -.web-icon-play:before { content: "\ea21"; } -.web-icon-remix:before { content: "\ea22"; } -.web-icon-skills:before { content: "\ea23"; } -.web-icon-hamburger-menu:before { content: "\ea24"; } -.web-icon-google:before { content: "\ea25"; } -.web-icon-rest:before { content: "\ea26"; } -.web-icon-star:before { content: "\ea27"; } -.web-icon-mailgun:before { content: "\ea28"; } -.web-icon-regions:before { content: "\ea29"; } -.web-icon-youtube:before { content: "\ea2a"; } -.web-icon-command:before { content: "\ea2b"; } -.web-icon-logout-right:before { content: "\ea2c"; } -.web-icon-tanstack:before { content: "\ea2d"; } -.web-icon-location:before { content: "\ea2e"; } -.web-icon-arrow-up:before { content: "\ea2f"; } -.web-icon-linkedin:before { content: "\ea30"; } -.web-icon-arena:before { content: "\ea31"; } -.web-icon-twitter:before { content: "\ea32"; } -.web-icon-customize:before { content: "\ea33"; } -.web-icon-discord:before { content: "\ea34"; } -.web-icon-calendar:before { content: "\ea35"; } -.web-icon-arrow-left:before { content: "\ea36"; } -.web-icon-sendgrid:before { content: "\ea37"; } -.web-icon-pop-locations:before { content: "\ea38"; } -.web-icon-product-hunt:before { content: "\ea39"; } -.web-icon-appwrite:before { content: "\ea3a"; } -.web-icon-arrow-ext-link:before { content: "\ea3b"; } -.web-icon-logout-left:before { content: "\ea3c"; } -.web-icon-external-icon:before { content: "\ea3d"; } -.web-icon-apple:before { content: "\ea3e"; } -.web-icon-tiktok:before { content: "\ea3f"; } -.web-icon-minus:before { content: "\ea40"; } -.web-icon-chevron-left:before { content: "\ea41"; } -.web-icon-light:before { content: "\ea42"; } -.web-icon-mcp:before { content: "\ea43"; } +.web-icon-rust:before { content: "\ea08"; } +.web-icon-chevron-down:before { content: "\ea09"; } +.web-icon-firebase:before { content: "\ea0a"; } +.web-icon-github:before { content: "\ea0b"; } +.web-icon-ticket:before { content: "\ea0c"; } +.web-icon-sparkle:before { content: "\ea0d"; } +.web-icon-divider-vertical:before { content: "\ea0e"; } +.web-icon-nuxt:before { content: "\ea0f"; } +.web-icon-chevron-up:before { content: "\ea10"; } +.web-icon-ycombinator:before { content: "\ea11"; } +.web-icon-x:before { content: "\ea12"; } +.web-icon-textmagic:before { content: "\ea13"; } +.web-icon-daily-dev:before { content: "\ea14"; } +.web-icon-chevron-right:before { content: "\ea15"; } +.web-icon-instagram:before { content: "\ea16"; } +.web-icon-ext-link:before { content: "\ea17"; } +.web-icon-arrow-right:before { content: "\ea18"; } +.web-icon-edge:before { content: "\ea19"; } +.web-icon-download:before { content: "\ea1a"; } +.web-icon-dark:before { content: "\ea1b"; } +.web-icon-bluesky:before { content: "\ea1c"; } +.web-icon-plus:before { content: "\ea1d"; } +.web-icon-check:before { content: "\ea1e"; } +.web-icon-close:before { content: "\ea1f"; } +.web-icon-copy:before { content: "\ea20"; } +.web-icon-message:before { content: "\ea21"; } +.web-icon-play:before { content: "\ea22"; } +.web-icon-remix:before { content: "\ea23"; } +.web-icon-skills:before { content: "\ea24"; } +.web-icon-hamburger-menu:before { content: "\ea25"; } +.web-icon-google:before { content: "\ea26"; } +.web-icon-rest:before { content: "\ea27"; } +.web-icon-star:before { content: "\ea28"; } +.web-icon-mailgun:before { content: "\ea29"; } +.web-icon-regions:before { content: "\ea2a"; } +.web-icon-youtube:before { content: "\ea2b"; } +.web-icon-command:before { content: "\ea2c"; } +.web-icon-logout-right:before { content: "\ea2d"; } +.web-icon-tanstack:before { content: "\ea2e"; } +.web-icon-location:before { content: "\ea2f"; } +.web-icon-arrow-up:before { content: "\ea30"; } +.web-icon-linkedin:before { content: "\ea31"; } +.web-icon-arena:before { content: "\ea32"; } +.web-icon-twitter:before { content: "\ea33"; } +.web-icon-customize:before { content: "\ea34"; } +.web-icon-discord:before { content: "\ea35"; } +.web-icon-calendar:before { content: "\ea36"; } +.web-icon-arrow-left:before { content: "\ea37"; } +.web-icon-sendgrid:before { content: "\ea38"; } +.web-icon-pop-locations:before { content: "\ea39"; } +.web-icon-product-hunt:before { content: "\ea3a"; } +.web-icon-appwrite:before { content: "\ea3b"; } +.web-icon-arrow-ext-link:before { content: "\ea3c"; } +.web-icon-logout-left:before { content: "\ea3d"; } +.web-icon-external-icon:before { content: "\ea3e"; } +.web-icon-apple:before { content: "\ea3f"; } +.web-icon-tiktok:before { content: "\ea40"; } +.web-icon-minus:before { content: "\ea41"; } +.web-icon-chevron-left:before { content: "\ea42"; } +.web-icon-light:before { content: "\ea43"; } +.web-icon-mcp:before { content: "\ea44"; } $web-icon-search: "\ea01"; $web-icon-arrow-down: "\ea02"; @@ -91,63 +92,64 @@ $web-icon-refine: "\ea04"; $web-icon-microsoft: "\ea05"; $web-icon-platform: "\ea06"; $web-icon-vue: "\ea07"; -$web-icon-chevron-down: "\ea08"; -$web-icon-firebase: "\ea09"; -$web-icon-github: "\ea0a"; -$web-icon-ticket: "\ea0b"; -$web-icon-sparkle: "\ea0c"; -$web-icon-divider-vertical: "\ea0d"; -$web-icon-nuxt: "\ea0e"; -$web-icon-chevron-up: "\ea0f"; -$web-icon-ycombinator: "\ea10"; -$web-icon-x: "\ea11"; -$web-icon-textmagic: "\ea12"; -$web-icon-daily-dev: "\ea13"; -$web-icon-chevron-right: "\ea14"; -$web-icon-instagram: "\ea15"; -$web-icon-ext-link: "\ea16"; -$web-icon-arrow-right: "\ea17"; -$web-icon-edge: "\ea18"; -$web-icon-download: "\ea19"; -$web-icon-dark: "\ea1a"; -$web-icon-bluesky: "\ea1b"; -$web-icon-plus: "\ea1c"; -$web-icon-check: "\ea1d"; -$web-icon-close: "\ea1e"; -$web-icon-copy: "\ea1f"; -$web-icon-message: "\ea20"; -$web-icon-play: "\ea21"; -$web-icon-remix: "\ea22"; -$web-icon-skills: "\ea23"; -$web-icon-hamburger-menu: "\ea24"; -$web-icon-google: "\ea25"; -$web-icon-rest: "\ea26"; -$web-icon-star: "\ea27"; -$web-icon-mailgun: "\ea28"; -$web-icon-regions: "\ea29"; -$web-icon-youtube: "\ea2a"; -$web-icon-command: "\ea2b"; -$web-icon-logout-right: "\ea2c"; -$web-icon-tanstack: "\ea2d"; -$web-icon-location: "\ea2e"; -$web-icon-arrow-up: "\ea2f"; -$web-icon-linkedin: "\ea30"; -$web-icon-arena: "\ea31"; -$web-icon-twitter: "\ea32"; -$web-icon-customize: "\ea33"; -$web-icon-discord: "\ea34"; -$web-icon-calendar: "\ea35"; -$web-icon-arrow-left: "\ea36"; -$web-icon-sendgrid: "\ea37"; -$web-icon-pop-locations: "\ea38"; -$web-icon-product-hunt: "\ea39"; -$web-icon-appwrite: "\ea3a"; -$web-icon-arrow-ext-link: "\ea3b"; -$web-icon-logout-left: "\ea3c"; -$web-icon-external-icon: "\ea3d"; -$web-icon-apple: "\ea3e"; -$web-icon-tiktok: "\ea3f"; -$web-icon-minus: "\ea40"; -$web-icon-chevron-left: "\ea41"; -$web-icon-light: "\ea42"; -$web-icon-mcp: "\ea43"; +$web-icon-rust: "\ea08"; +$web-icon-chevron-down: "\ea09"; +$web-icon-firebase: "\ea0a"; +$web-icon-github: "\ea0b"; +$web-icon-ticket: "\ea0c"; +$web-icon-sparkle: "\ea0d"; +$web-icon-divider-vertical: "\ea0e"; +$web-icon-nuxt: "\ea0f"; +$web-icon-chevron-up: "\ea10"; +$web-icon-ycombinator: "\ea11"; +$web-icon-x: "\ea12"; +$web-icon-textmagic: "\ea13"; +$web-icon-daily-dev: "\ea14"; +$web-icon-chevron-right: "\ea15"; +$web-icon-instagram: "\ea16"; +$web-icon-ext-link: "\ea17"; +$web-icon-arrow-right: "\ea18"; +$web-icon-edge: "\ea19"; +$web-icon-download: "\ea1a"; +$web-icon-dark: "\ea1b"; +$web-icon-bluesky: "\ea1c"; +$web-icon-plus: "\ea1d"; +$web-icon-check: "\ea1e"; +$web-icon-close: "\ea1f"; +$web-icon-copy: "\ea20"; +$web-icon-message: "\ea21"; +$web-icon-play: "\ea22"; +$web-icon-remix: "\ea23"; +$web-icon-skills: "\ea24"; +$web-icon-hamburger-menu: "\ea25"; +$web-icon-google: "\ea26"; +$web-icon-rest: "\ea27"; +$web-icon-star: "\ea28"; +$web-icon-mailgun: "\ea29"; +$web-icon-regions: "\ea2a"; +$web-icon-youtube: "\ea2b"; +$web-icon-command: "\ea2c"; +$web-icon-logout-right: "\ea2d"; +$web-icon-tanstack: "\ea2e"; +$web-icon-location: "\ea2f"; +$web-icon-arrow-up: "\ea30"; +$web-icon-linkedin: "\ea31"; +$web-icon-arena: "\ea32"; +$web-icon-twitter: "\ea33"; +$web-icon-customize: "\ea34"; +$web-icon-discord: "\ea35"; +$web-icon-calendar: "\ea36"; +$web-icon-arrow-left: "\ea37"; +$web-icon-sendgrid: "\ea38"; +$web-icon-pop-locations: "\ea39"; +$web-icon-product-hunt: "\ea3a"; +$web-icon-appwrite: "\ea3b"; +$web-icon-arrow-ext-link: "\ea3c"; +$web-icon-logout-left: "\ea3d"; +$web-icon-external-icon: "\ea3e"; +$web-icon-apple: "\ea3f"; +$web-icon-tiktok: "\ea40"; +$web-icon-minus: "\ea41"; +$web-icon-chevron-left: "\ea42"; +$web-icon-light: "\ea43"; +$web-icon-mcp: "\ea44"; diff --git a/src/icons/output/web-icon.svg b/src/icons/output/web-icon.svg index b896fa4515..d8dd9ef6d6 100644 --- a/src/icons/output/web-icon.svg +++ b/src/icons/output/web-icon.svg @@ -28,185 +28,188 @@ - + diff --git a/src/icons/output/web-icon.symbol.svg b/src/icons/output/web-icon.symbol.svg index f8db3f3aa7..88d28b1b88 100644 --- a/src/icons/output/web-icon.symbol.svg +++ b/src/icons/output/web-icon.symbol.svg @@ -3,4 +3,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/src/icons/output/web-icon.ttf b/src/icons/output/web-icon.ttf index b08109fe00..f2ae1b364d 100644 Binary files a/src/icons/output/web-icon.ttf and b/src/icons/output/web-icon.ttf differ diff --git a/src/icons/output/web-icon.woff b/src/icons/output/web-icon.woff index dd1fb629d8..b82ea54832 100644 Binary files a/src/icons/output/web-icon.woff and b/src/icons/output/web-icon.woff differ diff --git a/src/icons/output/web-icon.woff2 b/src/icons/output/web-icon.woff2 index b8d37b9248..96501b8097 100644 Binary files a/src/icons/output/web-icon.woff2 and b/src/icons/output/web-icon.woff2 differ diff --git a/src/icons/svg/rust.svg b/src/icons/svg/rust.svg new file mode 100644 index 0000000000..1cf4dafe68 --- /dev/null +++ b/src/icons/svg/rust.svg @@ -0,0 +1 @@ + diff --git a/src/lib/components/ui/icon/sprite/sprite.svelte b/src/lib/components/ui/icon/sprite/sprite.svelte index 905b80b55f..2461ddf67f 100644 --- a/src/lib/components/ui/icon/sprite/sprite.svelte +++ b/src/lib/components/ui/icon/sprite/sprite.svelte @@ -57,6 +57,14 @@ fill="currentColor" > + + + = { [Platform.ServerGraphql]: 'graphql', [Platform.ServerRest]: 'http', [Platform.ServerGo]: 'go', + [Platform.ServerRust]: 'rust', vue: 'html', svelte: 'html' }; diff --git a/src/lib/utils/references.ts b/src/lib/utils/references.ts index be37059f1f..3a4fe4f3fd 100644 --- a/src/lib/utils/references.ts +++ b/src/lib/utils/references.ts @@ -61,6 +61,7 @@ export const Platform = { ServerGo: 'server-go', ServerSwift: 'server-swift', ServerKotlin: 'server-kotlin', + ServerRust: 'server-rust', ServerJava: 'server-java', ServerGraphql: 'server-graphql', ServerRest: 'server-rest' @@ -100,6 +101,7 @@ export const platformMap: Record = { [Platform.ServerJava]: 'Java', [Platform.ServerGraphql]: 'GraphQL', [Platform.ServerRest]: 'REST', + [Platform.ServerRust]: 'Rust', [Platform.ServerGo]: 'Go', sh: 'Shell', js: 'JavaScript', @@ -138,6 +140,7 @@ export const platformMap: Record = { svelte: 'Svelte', groovy: 'Groovy', go: 'Go', + rust: 'Rust', dockerfile: 'Dockerfile', docker: 'Dockerfile', ini: 'INI', diff --git a/src/routes/(marketing)/(assets)/icons/light/rust.svg b/src/routes/(marketing)/(assets)/icons/light/rust.svg new file mode 100644 index 0000000000..9367109a2e --- /dev/null +++ b/src/routes/(marketing)/(assets)/icons/light/rust.svg @@ -0,0 +1 @@ + diff --git a/src/routes/(marketing)/(assets)/icons/rust.svg b/src/routes/(marketing)/(assets)/icons/rust.svg new file mode 100644 index 0000000000..eb2b2d28a7 --- /dev/null +++ b/src/routes/(marketing)/(assets)/icons/rust.svg @@ -0,0 +1 @@ + diff --git a/src/routes/(marketing)/(components)/platforms.svelte b/src/routes/(marketing)/(components)/platforms.svelte index 5913dad655..70d7f6814e 100644 --- a/src/routes/(marketing)/(components)/platforms.svelte +++ b/src/routes/(marketing)/(components)/platforms.svelte @@ -25,6 +25,8 @@ import ReactNative from '../(assets)/icons/react-native.svg'; import TanStack from '../(assets)/icons/tanstack.svg'; import TanStackLight from '../(assets)/icons/light/tanstack.svg'; + import Rust from '../(assets)/icons/rust.svg'; + import RustLight from '../(assets)/icons/light/rust.svg'; import GradientText from '$lib/components/fancy/gradient-text.svelte'; import Noise from '$lib/components/fancy/noise.svelte'; import { Tooltip } from 'bits-ui'; @@ -115,6 +117,13 @@ href: '/docs/quick-starts/dart', primary: '#01579B', secondary: '#29B6F6' + }, + { + name: 'Rust', + dark: Rust, + light: RustLight, + href: '/docs/quick-starts/rust', + primary: '#CE422B' } ]; diff --git a/src/routes/docs/quick-starts/+page.svelte b/src/routes/docs/quick-starts/+page.svelte index a20ddb00f2..95009f50bd 100644 --- a/src/routes/docs/quick-starts/+page.svelte +++ b/src/routes/docs/quick-starts/+page.svelte @@ -172,6 +172,12 @@ icon: 'icon-kotlin', image: '/images/blog/placeholder.png', href: 'kotlin' + }, + { + title: 'Rust', + icon: 'web-icon-rust', + image: '/images/blog/placeholder.png', + href: 'rust' } ] } diff --git a/src/routes/docs/quick-starts/rust/+page.markdoc b/src/routes/docs/quick-starts/rust/+page.markdoc new file mode 100644 index 0000000000..6a38495796 --- /dev/null +++ b/src/routes/docs/quick-starts/rust/+page.markdoc @@ -0,0 +1,307 @@ +--- +layout: article +title: Start with Rust +description: Learn to get started with server integrations with Appwrite Rust SDK. +difficulty: beginner +readtime: 5 +back: /docs/quick-starts +--- +Learn how to setup your first Rust project powered by Appwrite. +{% section #step-1 step=1 title="Create project" %} +Head to the [Appwrite Console](https://cloud.appwrite.io/console). + +If this is your first time using Appwrite, create an account and create your first project. + +{% only_dark %} +![Create project screen](/images/docs/quick-starts/dark/create-project.png) +{% /only_dark %} +{% only_light %} +![Create project screen](/images/docs/quick-starts/create-project.png) +{% /only_light %} + +Then, under **Integrate with your server**, add an **API Key** with the following scopes. + +{% only_dark %} +![Server integrations](/images/docs/quick-starts/dark/integrate-server.png) +{% /only_dark %} +{% only_light %} +![Server integrations](/images/docs/quick-starts/integrate-server.png) +{% /only_light %} + +| Category {% width=120 %} | Required scopes | Purpose | +|-----------|-----------------------|---------| +| Database | `databases.write` | Allows API key to create, update, and delete [databases](/docs/products/databases/databases). | +| | `tables.write` | Allows API key to create, update, and delete [tables](/docs/products/databases/tables). | +| | `columns.write` | Allows API key to create, update, and delete [columns](/docs/products/databases/tables#columns). | +| | `rows.read` | Allows API key to read [rows](/docs/products/databases/rows). | +| | `rows.write` | Allows API key to create, update, and delete [rows](/docs/products/databases/rows). | + +Other scopes are optional. + +{% only_dark %} +![Project settings screen](/images/docs/quick-starts/dark/project-id.png) +{% /only_dark %} +{% only_light %} +![Project settings screen](/images/docs/quick-starts/project-id.png) +{% /only_light %} + +{% /section %} +{% section #step-2 step=2 title="Create Rust project" %} + +Create a new Rust application. + +```sh +cargo new my_app +cd my_app +``` + +{% /section %} +{% section #step-3 step=3 title="Install Appwrite" %} + +Install the Rust Appwrite SDK and its dependencies. + +```sh +cargo add appwrite +cargo add tokio -F full +cargo add serde_json +``` + +{% /section %} +{% section #step-4 step=4 title="Import Appwrite" %} + +Find your project ID in the **Settings** page. Also, click on the **View API Keys** button to find the API key that was created earlier. + +{% only_dark %} +![Project settings screen](/images/docs/quick-starts/dark/project-id.png) +{% /only_dark %} +{% only_light %} +![Project settings screen](/images/docs/quick-starts/project-id.png) +{% /only_light %} + +Open `src/main.rs` and initialize the Appwrite Client. Replace `` with your project ID and `` with your API key. + +```rust +use appwrite::Client; +use appwrite::services::tables_db::TablesDB; +use appwrite::id::ID; +use serde_json::json; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new() + .set_endpoint("https://.cloud.appwrite.io/v1") + .set_project("") + .set_key(""); + + Ok(()) +} +``` + +{% /section %} +{% section #step-5 step=5 title="Initialize database" %} + +Once the Appwrite Client is initialized, create a function to configure a todo table. + +```rust +async fn prepare_database( + tables_db: &TablesDB, +) -> Result<(String, String), Box> { + let todo_database = tables_db.create( + ID::unique(), + "TodosDB", + None, + ).await?; + + let todo_table = tables_db.create_table( + &todo_database.id, + ID::unique(), + "Todos", + None, None, None, None, None, + ).await?; + + tables_db.create_varchar_column( + &todo_database.id, + &todo_table.id, + "title", + 255, + true, + None, None, None, + ).await?; + + tables_db.create_text_column( + &todo_database.id, + &todo_table.id, + "description", + false, + Some("This is a test description."), + None, None, + ).await?; + + tables_db.create_boolean_column( + &todo_database.id, + &todo_table.id, + "isComplete", + true, + None, None, + ).await?; + + Ok((todo_database.id, todo_table.id)) +} +``` + +{% /section %} +{% section #step-6 step=6 title="Add rows" %} +Create a function to add some mock data into your new table. + +```rust +async fn seed_database( + tables_db: &TablesDB, + database_id: &str, + table_id: &str, +) -> Result<(), Box> { + tables_db.create_row( + database_id, + table_id, + ID::unique(), + json!({ + "title": "Buy apples", + "description": "At least 2KGs", + "isComplete": true + }), + None, None, + ).await?; + + tables_db.create_row( + database_id, + table_id, + ID::unique(), + json!({ + "title": "Wash the apples", + "isComplete": true + }), + None, None, + ).await?; + + tables_db.create_row( + database_id, + table_id, + ID::unique(), + json!({ + "title": "Cut the apples", + "description": "Don't forget to pack them in a box", + "isComplete": false + }), + None, None, + ).await?; + + Ok(()) +} +``` + +{% /section %} +{% section #step-7 step=7 title="Retrieve rows" %} + +Create a function to retrieve the mock todo data and execute the functions in `main`. + +```rust +use appwrite::query::Query; + +async fn get_todos( + tables_db: &TablesDB, + database_id: &str, + table_id: &str, +) -> Result<(), Box> { + // Retrieve rows (default limit is 25) + let todos = tables_db.list_rows( + database_id, + table_id, + None, None, None, None, + ).await?; + + println!("Todos:"); + for todo in &todos.rows { + println!("Title: {}\nDescription: {}\nIs Todo Complete: {}\n", + todo.get::("title").unwrap_or_default(), + todo.get::("description").unwrap_or_default(), + todo.get::("isComplete").unwrap_or_default(), + ); + } + + // Use queries to filter completed todos with pagination + let completed_todos = tables_db.list_rows( + database_id, + table_id, + Some(vec![ + Query::equal("isComplete", true).to_string(), + Query::order_desc("$createdAt").to_string(), + Query::limit(5).to_string(), + ]), + None, None, None, + ).await?; + + println!("Completed todos (limited to 5):"); + for todo in &completed_todos.rows { + println!("Title: {}\nDescription: {}\nIs Todo Complete: {}\n", + todo.get::("title").unwrap_or_default(), + todo.get::("description").unwrap_or_default(), + todo.get::("isComplete").unwrap_or_default(), + ); + } + + // Query for incomplete todos + let incomplete_todos = tables_db.list_rows( + database_id, + table_id, + Some(vec![ + Query::equal("isComplete", false).to_string(), + Query::order_asc("title").to_string(), + ]), + None, None, None, + ).await?; + + println!("Incomplete todos (ordered by title):"); + for todo in &incomplete_todos.rows { + println!("Title: {}\nDescription: {}\nIs Todo Complete: {}\n", + todo.get::("title").unwrap_or_default(), + todo.get::("description").unwrap_or_default(), + todo.get::("isComplete").unwrap_or_default(), + ); + } + + Ok(()) +} +``` + +Make sure to update `main()` with the functions you created. Your `main()` function should look something like this: + +```rust +use appwrite::Client; +use appwrite::services::tables_db::TablesDB; +use appwrite::id::ID; +use appwrite::query::Query; +use serde_json::json; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new() + .set_endpoint("https://.cloud.appwrite.io/v1") + .set_project("") + .set_key(""); + + let tables_db = TablesDB::new(&client); + + let (database_id, table_id) = prepare_database(&tables_db).await?; + seed_database(&tables_db, &database_id, &table_id).await?; + get_todos(&tables_db, &database_id, &table_id).await?; + + Ok(()) +} +``` + +{% /section %} + +{% section #step-8 step=8 title="All set" %} + +Run your project with `cargo run` and view the response in your console. + +{% /section %} diff --git a/src/routes/docs/quick-starts/rust/prompt.md b/src/routes/docs/quick-starts/rust/prompt.md new file mode 100644 index 0000000000..434cdd0261 --- /dev/null +++ b/src/routes/docs/quick-starts/rust/prompt.md @@ -0,0 +1,267 @@ +## Create a Rust app with Appwrite server integration + +Create a Rust app with Appwrite server integration that creates a todo database, seeds it with data, and retrieves rows. + +Do exactly these steps in order. Confirm each step succeeds before continuing. If any command fails, show the error and fix it automatically. + +## Step 1: Create project in Appwrite Console + +- If this is the user's first time using Appwrite, guide them to create an account and project at https://cloud.appwrite.io/console +- Under **Integrate with your server**, add an **API Key** with the following scopes: + +| Category | Required scopes | Purpose | +| -------- | ----------------- | ------------------------------------------------------ | +| Database | `databases.write` | Allows API key to create, update, and delete databases | +| | `tables.write` | Allows API key to create, update, and delete tables | +| | `columns.write` | Allows API key to create, update, and delete columns | +| | `rows.read` | Allows API key to read rows | +| | `rows.write` | Allows API key to create, update, and delete rows | + +- Other scopes are optional. + +## Step 2: Create Rust project + +- If you already have a Rust project open, stay in it and use it. +- Otherwise, run: + +```sh +cargo new my_app +cd my_app +``` + +## Step 3: Install Appwrite SDK + +- Run: + +```sh +cargo add appwrite +cargo add tokio -F full +cargo add serde_json +``` + +## Step 4: Import Appwrite and initialize client (ask user for details; never assume) + +- Ask the user for: + - Appwrite Cloud Region (e.g. `fra`, `nyc`) + - **Project ID** (from Console -> Settings) + - **API Key** (from Console -> View API Keys) +- Open `src/main.rs` and initialize the Appwrite Client: + +```rust +use appwrite::Client; +use appwrite::services::tables_db::TablesDB; +use appwrite::id::ID; +use serde_json::json; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new() + .set_endpoint("https://.cloud.appwrite.io/v1") + .set_project("") + .set_key(""); + + Ok(()) +} +``` + +## Step 5: Initialize database + +- Create a function to configure a todo table: + +```rust +async fn prepare_database( + tables_db: &TablesDB, +) -> Result<(String, String), Box> { + let todo_database = tables_db.create( + ID::unique(), + "TodosDB", + None, + ).await?; + + let todo_table = tables_db.create_table( + &todo_database.id, + ID::unique(), + "Todos", + None, None, None, None, None, + ).await?; + + tables_db.create_varchar_column( + &todo_database.id, + &todo_table.id, + "title", + 255, + true, + None, None, None, + ).await?; + + tables_db.create_text_column( + &todo_database.id, + &todo_table.id, + "description", + false, + Some("This is a test description."), + None, None, + ).await?; + + tables_db.create_boolean_column( + &todo_database.id, + &todo_table.id, + "isComplete", + true, + None, None, + ).await?; + + Ok((todo_database.id, todo_table.id)) +} +``` + +## Step 6: Add rows (seed database) + +- Create a function to add mock data into the table: + +```rust +async fn seed_database( + tables_db: &TablesDB, + database_id: &str, + table_id: &str, +) -> Result<(), Box> { + tables_db.create_row( + database_id, + table_id, + ID::unique(), + json!({ + "title": "Buy apples", + "description": "At least 2KGs", + "isComplete": true + }), + None, None, + ).await?; + + tables_db.create_row( + database_id, + table_id, + ID::unique(), + json!({ + "title": "Wash the apples", + "isComplete": true + }), + None, None, + ).await?; + + tables_db.create_row( + database_id, + table_id, + ID::unique(), + json!({ + "title": "Cut the apples", + "description": "Don't forget to pack them in a box", + "isComplete": false + }), + None, None, + ).await?; + + Ok(()) +} +``` + +## Step 7: Retrieve rows + +- Add the query import and create functions to retrieve todos: + +```rust +use appwrite::query::Query; + +async fn get_todos( + tables_db: &TablesDB, + database_id: &str, + table_id: &str, +) -> Result<(), Box> { + let todos = tables_db.list_rows( + database_id, + table_id, + None, None, None, None, + ).await?; + + println!("Todos:"); + for todo in &todos.rows { + println!("Title: {}\nDescription: {}\nIs Todo Complete: {}\n", + todo.get::("title").unwrap_or_default(), + todo.get::("description").unwrap_or_default(), + todo.get::("isComplete").unwrap_or_default(), + ); + } + + let completed_todos = tables_db.list_rows( + database_id, + table_id, + Some(vec![ + Query::equal("isComplete", true).to_string(), + Query::order_desc("$createdAt").to_string(), + Query::limit(5).to_string(), + ]), + None, None, None, + ).await?; + + println!("Completed todos (limited to 5):"); + for todo in &completed_todos.rows { + println!("Title: {}\nDescription: {}\nIs Todo Complete: {}\n", + todo.get::("title").unwrap_or_default(), + todo.get::("description").unwrap_or_default(), + todo.get::("isComplete").unwrap_or_default(), + ); + } + + let incomplete_todos = tables_db.list_rows( + database_id, + table_id, + Some(vec![ + Query::equal("isComplete", false).to_string(), + Query::order_asc("title").to_string(), + ]), + None, None, None, + ).await?; + + println!("Incomplete todos (ordered by title):"); + for todo in &incomplete_todos.rows { + println!("Title: {}\nDescription: {}\nIs Todo Complete: {}\n", + todo.get::("title").unwrap_or_default(), + todo.get::("description").unwrap_or_default(), + todo.get::("isComplete").unwrap_or_default(), + ); + } + + Ok(()) +} +``` + +## Step 8: Update main function and run + +- Update `main()` to call all functions: + +```rust +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new() + .set_endpoint("https://.cloud.appwrite.io/v1") + .set_project("") + .set_key(""); + + let tables_db = TablesDB::new(&client); + + let (database_id, table_id) = prepare_database(&tables_db).await?; + seed_database(&tables_db, &database_id, &table_id).await?; + get_todos(&tables_db, &database_id, &table_id).await?; + + Ok(()) +} +``` + +- Run: `cargo run` +- View the response in the console + +## Deliverables + +- A running Rust app with working Appwrite server integration +- Files created: `Cargo.toml`, `src/main.rs` +- A **TodosDB** database with a **Todos** table containing `title`, `description`, and `isComplete` columns +- Three seeded todo rows with the ability to query and filter them diff --git a/src/routes/docs/sdks/+page.markdoc b/src/routes/docs/sdks/+page.markdoc index be34b6aa3b..61340e024b 100644 --- a/src/routes/docs/sdks/+page.markdoc +++ b/src/routes/docs/sdks/+page.markdoc @@ -111,7 +111,13 @@ Server libraries for integrating with Appwrite to build server side integrations {% only_light %}{% icon_image src="/images/platforms/kotlin.svg" alt="Kotlin logo" size="m" /%}{% /only_light %} * Kotlin SDK `14.1.0` * [appwrite/sdk-for-kotlin](https://github.com/appwrite/sdk-for-kotlin) -* +* +--- +* {% only_dark %}{% icon_image src="/images/platforms/dark/rust.svg" alt="Rust logo" size="m" /%}{% /only_dark %} +{% only_light %}{% icon_image src="/images/platforms/rust.svg" alt="Rust logo" size="m" /%}{% /only_light %} +* Rust SDK `0.2.0` +* [appwrite/sdk-for-rust](https://github.com/appwrite/sdk-for-rust) +* {% /table %} If you would like to help us extend our platforms and SDKs stack, you are more than welcome to contact us or contribute to the [Appwrite SDK Generator](https://github.com/appwrite/sdk-generator) project GitHub repository and read our contribution guide. @@ -278,6 +284,15 @@ ID.unique() // Generate a custom ID ID.custom("my-custom-id") ``` +```rust +use appwrite::id::ID; + +// Generate a unique ID +ID::unique() + +// Generate a custom ID +ID::custom("my-custom-id") +``` {% /multicode %} {% /tabsitem %} {% /tabs %} @@ -397,6 +412,12 @@ You can discover the available enums in each SDK at the source. * Kotlin SDK `14.1.0` * [appwrite/sdk-for-kotlin](https://github.com/appwrite/sdk-for-kotlin/tree/dev/src/main/kotlin/io/appwrite/enums) * +--- +* {% only_dark %}{% icon_image src="/images/platforms/dark/rust.svg" alt="Rust logo" size="m" /%}{% /only_dark %} +{% only_light %}{% icon_image src="/images/platforms/rust.svg" alt="Rust logo" size="m" /%}{% /only_light %} +* Rust SDK `0.2.0` +* [appwrite/sdk-for-rust](https://github.com/appwrite/sdk-for-rust/tree/dev/src/enums) +* {% /table %} {% /tabsitem %} {% /tabs %} diff --git a/src/routes/docs/tooling/ai/+layout.svelte b/src/routes/docs/tooling/ai/+layout.svelte index f93b6106f1..8d8f89f405 100644 --- a/src/routes/docs/tooling/ai/+layout.svelte +++ b/src/routes/docs/tooling/ai/+layout.svelte @@ -210,6 +210,10 @@ { label: 'Kotlin', href: '/docs/tooling/ai/quickstart-prompts/kotlin' + }, + { + label: 'Rust', + href: '/docs/tooling/ai/quickstart-prompts/rust' } ] }, diff --git a/src/routes/docs/tooling/ai/quickstart-prompts/+page.markdoc b/src/routes/docs/tooling/ai/quickstart-prompts/+page.markdoc index 3f6ef4a975..e4d89499ea 100644 --- a/src/routes/docs/tooling/ai/quickstart-prompts/+page.markdoc +++ b/src/routes/docs/tooling/ai/quickstart-prompts/+page.markdoc @@ -119,4 +119,7 @@ Use the following quick start prompts with your preferred AI assistant to integr {% cards_item href="/docs/tooling/ai/quickstart-prompts/kotlin" title="Kotlin" icon="icon-kotlin" %} {% /cards_item %} +{% cards_item href="/docs/tooling/ai/quickstart-prompts/rust" title="Rust" icon="web-icon-rust" %} +{% /cards_item %} + {% /cards %} diff --git a/src/routes/docs/tooling/ai/quickstart-prompts/rust/+page.markdoc b/src/routes/docs/tooling/ai/quickstart-prompts/rust/+page.markdoc new file mode 100644 index 0000000000..28c2793318 --- /dev/null +++ b/src/routes/docs/tooling/ai/quickstart-prompts/rust/+page.markdoc @@ -0,0 +1,8 @@ +--- +layout: article +title: Rust +description: Quickstart prompt for integrating Appwrite with Rust. +prompt: /docs/quick-starts/rust +--- + +{% prompt_content /%} diff --git a/static/images/platforms/dark/rust.svg b/static/images/platforms/dark/rust.svg new file mode 100644 index 0000000000..56058cdb7a --- /dev/null +++ b/static/images/platforms/dark/rust.svg @@ -0,0 +1 @@ + diff --git a/static/images/platforms/light/rust.svg b/static/images/platforms/light/rust.svg new file mode 100644 index 0000000000..56058cdb7a --- /dev/null +++ b/static/images/platforms/light/rust.svg @@ -0,0 +1 @@ + diff --git a/static/images/platforms/rust.svg b/static/images/platforms/rust.svg new file mode 100644 index 0000000000..7364d9ede6 --- /dev/null +++ b/static/images/platforms/rust.svg @@ -0,0 +1 @@ +