2.0 Blog Post (#2763)

Co-authored-by: Daniel <124795337+denjell-crabnebula@users.noreply.github.com>
This commit is contained in:
Tillmann
2024-10-03 00:48:15 +09:00
committed by GitHub
parent 11fb26dd38
commit 196e4cff47
65 changed files with 603 additions and 132 deletions

7
netlify.toml Normal file
View File

@@ -0,0 +1,7 @@
[[redirects]]
from = "/:locale/v1/*"
to = "https://v1.tauri.app/:locale/v1/:splat"
[[redirects]]
from = "/v1/*"
to = "https://v1.tauri.app/v1/:splat"

Binary file not shown.

View File

@@ -5,6 +5,8 @@
<symbol viewBox="0 0 24 24" id="material-symbols-android"><path fill="currentColor" d="M1 18q.225-2.675 1.638-4.925T6.4 9.5L4.55 6.3q-.15-.225-.075-.475T4.8 5.45q.2-.125.45-.05t.4.3L7.5 8.9Q9.65 8 12 8t4.5.9l1.85-3.2q.15-.225.4-.3t.45.05q.25.125.325.375t-.075.475L17.6 9.5q2.35 1.325 3.762 3.575T23 18zm6-2.75q.525 0 .888-.363T8.25 14t-.363-.888T7 12.75t-.888.363T5.75 14t.363.888t.887.362m10 0q.525 0 .888-.363T18.25 14t-.363-.888T17 12.75t-.888.363t-.362.887t.363.888t.887.362"></path></symbol>
<symbol viewBox="0 0 24 24" id="simple-icons-ios"><path fill="currentColor" d="M1.1 6.05c-.614 0-1.1.48-1.1 1.08a1.08 1.08 0 0 0 1.1 1.08c.62 0 1.11-.48 1.11-1.08S1.72 6.05 1.1 6.05m7.61.02c-3.36 0-5.46 2.29-5.46 5.93c0 3.67 2.1 5.95 5.46 5.95c3.34 0 5.45-2.28 5.45-5.95c0-3.64-2.11-5.93-5.45-5.93m10.84 0c-2.5 0-4.28 1.38-4.28 3.43c0 1.63 1.01 2.65 3.13 3.14l1.49.36c1.45.33 2.04.81 2.04 1.64c0 .96-.97 1.64-2.35 1.64c-1.41 0-2.47-.69-2.58-1.75h-2c.08 2.12 1.82 3.42 4.46 3.42c2.79 0 4.54-1.37 4.54-3.55c0-1.71-1-2.68-3.32-3.21l-1.33-.3c-1.41-.34-1.99-.79-1.99-1.55c0-.96.88-1.6 2.18-1.6c1.31 0 2.21.65 2.31 1.72h1.96c-.05-2.02-1.72-3.39-4.26-3.39M8.71 7.82c2.04 0 3.35 1.63 3.35 4.18c0 2.57-1.31 4.2-3.35 4.2c-2.06 0-3.36-1.63-3.36-4.2c0-2.55 1.3-4.18 3.36-4.18M.111 9.31v8.45H2.1V9.31z"></path></symbol>
<symbol viewBox="0 0 24 24" id="simple-icons-macos"><path fill="currentColor" d="M0 14.727h.941v-2.453c0-.484.318-.835.771-.835c.439 0 .71.276.71.722v2.566h.915V12.25c0-.48.31-.812.764-.812c.46 0 .718.28.718.77v2.518h.94v-2.748c0-.801-.517-1.334-1.307-1.334c-.578 0-1.054.31-1.247.805h-.023c-.147-.514-.552-.805-1.118-.805c-.545 0-.968.306-1.142.771H.903v-.695H0v4.006zm7.82-.646c-.408 0-.68-.208-.68-.537c0-.318.26-.522.714-.552l.926-.057v.307c0 .483-.427.839-.96.839m-.284.71c.514 0 1.017-.268 1.248-.703h.018v.639h.908v-2.76c0-.804-.647-1.33-1.64-1.33c-1.021 0-1.66.537-1.701 1.285h.873c.06-.332.344-.548.79-.548c.464 0 .748.242.748.662v.287l-1.058.06c-.976.061-1.524.488-1.524 1.199c0 .721.564 1.209 1.338 1.209m6.305-2.642c-.065-.843-.719-1.512-1.777-1.512c-1.164 0-1.92.805-1.92 2.087c0 1.3.756 2.082 1.928 2.082c1.005 0 1.697-.59 1.772-1.485h-.888c-.087.453-.397.725-.873.725c-.597 0-.982-.483-.982-1.322c0-.824.381-1.323.975-1.323c.502 0 .8.321.876.748zm2.906-2.967c-1.591 0-2.589 1.085-2.589 2.82s.998 2.816 2.59 2.816c1.586 0 2.584-1.081 2.584-2.816s-.997-2.82-2.585-2.82m0 .832c.971 0 1.591.77 1.591 1.988c0 1.213-.62 1.984-1.59 1.984c-.976 0-1.592-.77-1.592-1.984c0-1.217.616-1.988 1.591-1.988m2.982 3.178c.042 1.006.866 1.626 2.12 1.626c1.32 0 2.151-.65 2.151-1.686c0-.813-.469-1.27-1.576-1.523l-.627-.144c-.67-.158-.945-.37-.945-.733c0-.453.415-.756 1.032-.756c.623 0 1.05.306 1.096.817h.93c-.023-.96-.817-1.61-2.019-1.61c-1.187 0-2.03.653-2.03 1.62c0 .78.477 1.263 1.482 1.494l.707.166c.688.163.967.39.967.782c0 .454-.457.779-1.115.779c-.665 0-1.167-.329-1.228-.832z"></path></symbol>
<symbol id="wpf-mac-os" viewBox="0 0 26 26"><path fill="currentColor" d="M23.934 18.947c-.598 1.324-.884 1.916-1.652 3.086c-1.073 1.634-2.588 3.673-4.461 3.687c-1.666.014-2.096-1.087-4.357-1.069c-2.261.011-2.732 1.089-4.4 1.072c-1.873-.017-3.307-1.854-4.381-3.485c-3.003-4.575-3.32-9.937-1.464-12.79C4.532 7.425 6.61 6.237 8.561 6.237c1.987 0 3.236 1.092 4.879 1.092c1.594 0 2.565-1.095 4.863-1.095c1.738 0 3.576.947 4.889 2.581c-4.296 2.354-3.598 8.49.742 10.132M16.559 4.408c.836-1.073 1.47-2.587 1.24-4.131c-1.364.093-2.959.964-3.891 2.092c-.844 1.027-1.544 2.553-1.271 4.029c1.488.048 3.028-.839 3.922-1.99"/></symbol>
<symbol id="wpf-android-os" viewBox="0 0 26 26"><path fill="currentColor" fill-rule="evenodd" d="M24.123 9.753v6.281c0 .886-.71 1.608-1.583 1.608s-1.579-.722-1.579-1.608V9.753c0-.886.705-1.605 1.579-1.605s1.583.719 1.583 1.605M3.456 8.147c-.872 0-1.579.72-1.579 1.605v6.281c0 .886.707 1.608 1.579 1.608c.878 0 1.583-.722 1.583-1.608v-6.28c0-.886-.705-1.606-1.583-1.606m2.537 11.519c0 .683.553 1.233 1.234 1.233h1.41v3.495c0 .886.71 1.605 1.583 1.605s1.581-.719 1.581-1.605V20.9h2.46v3.495c0 .886.712 1.605 1.583 1.605c.874 0 1.583-.719 1.583-1.605V20.9h1.407c.683 0 1.236-.55 1.236-1.233V8.196H5.993zM20.036 7.175H5.961c.184-2.134 1.634-3.961 3.703-4.922L8.363.363c-.077-.111-.06-.258.041-.328c.101-.068.246-.034.326.077l1.349 1.962c.891-.35 1.878-.548 2.921-.548s2.028.198 2.921.548L17.27.112c.08-.111.225-.145.326-.077c.101.07.118.217.041.328l-1.301 1.89c2.068.961 3.519 2.788 3.7 4.922m-9.225-2.728a.78.78 0 1 0-1.562.004a.78.78 0 0 0 1.562-.004m6.034 0a.777.777 0 0 0-.78-.777a.778.778 0 1 0 .78.777" clip-rule="evenodd"/></symbol>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -0,0 +1,31 @@
<svg class="crabnebula-logo" width="100%" height="100%" viewBox="0 0 1204 210" version="1.1"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
xml:space="preserve" xmlns:serif="http://www.serif.com/"
style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<style>
.crabnebula-logo path,
.crabnebula-logo rect {
fill: #001e42;
}
@media (prefers-color-scheme: dark) {
.crabnebula-logo path, .crabnebula-logo rect {
fill: #fff;
}
}
html[data-color-mode="dark"] .crabnebula-logo path,
html[data-color-mode="dark"] .crabnebula-logo rect {
fill: #fff;
}
</style>
<path d="M351.903,162.334C344.288,162.334 337.123,160.881 330.41,157.975C323.696,155.069 317.834,151.11 312.824,146.099C307.914,141.089 304.006,135.276 301.101,128.662C298.195,121.948 296.742,114.783 296.742,107.167C296.742,99.55 298.195,92.435 301.101,85.821C304.006,79.107 307.914,73.244 312.824,68.234C317.834,63.223 323.696,59.265 330.41,56.358C337.123,53.452 344.288,51.999 351.903,51.999C357.414,51.999 362.675,52.701 367.685,54.103C372.795,55.507 377.455,57.511 381.663,60.116C385.972,62.622 389.83,65.678 393.237,69.286C396.644,72.793 399.499,76.752 401.804,81.161L380.762,92.586C377.756,87.174 373.848,82.915 369.038,79.808C364.328,76.702 358.617,75.148 351.903,75.148C347.494,75.148 343.386,76 339.578,77.704C335.871,79.407 332.614,81.762 329.809,84.769C327.003,87.675 324.798,91.082 323.195,94.991C321.592,98.799 320.79,102.857 320.79,107.167C320.79,111.476 321.592,115.584 323.195,119.493C324.798,123.301 327.003,126.708 329.809,129.715C332.614,132.621 335.871,134.926 339.578,136.629C343.386,138.333 347.494,139.185 351.903,139.185C358.617,139.185 364.328,137.631 369.038,134.525C373.848,131.418 377.756,127.159 380.762,121.748L401.804,133.172C399.499,137.581 396.644,141.59 393.237,145.198C389.83,148.705 385.972,151.762 381.663,154.367C377.455,156.872 372.795,158.827 367.685,160.23C362.675,161.633 357.414,162.334 351.903,162.334Z" style="fill-rule:nonzero;stroke:black;stroke-width:0.55px;"/>
<path d="M413.821,85.37L436.517,85.37L436.517,96.644C437.72,93.337 439.924,90.481 443.131,88.076C446.437,85.671 450.195,84.468 454.403,84.468C455.506,84.468 456.658,84.518 457.86,84.619C459.063,84.719 460.366,84.969 461.768,85.37L461.768,108.369C460.065,107.768 458.412,107.317 456.808,107.016C455.205,106.716 453.502,106.565 451.698,106.565C446.788,106.565 443.03,108.269 440.425,111.676C437.82,115.083 436.517,119.493 436.517,124.904L436.517,160.53L413.821,160.53L413.821,85.37Z" style="fill-rule:nonzero;stroke:black;stroke-width:0.55px;"/>
<path d="M502.161,162.184C497.251,162.184 492.642,161.132 488.333,159.027C484.125,156.923 480.467,154.117 477.361,150.609C474.255,147.001 471.8,142.843 469.996,138.133C468.193,133.322 467.291,128.261 467.291,122.95C467.291,117.639 468.193,112.628 469.996,107.918C471.8,103.108 474.255,98.949 477.361,95.442C480.467,91.834 484.125,88.978 488.333,86.873C492.642,84.769 497.251,83.717 502.161,83.717C504.666,83.717 506.971,84.017 509.075,84.619C511.28,85.12 513.234,85.821 514.937,86.723C516.741,87.625 518.244,88.627 519.446,89.729C520.749,90.832 521.801,91.884 522.603,92.886L522.603,85.37L545.299,85.37L545.299,160.53L522.603,160.53L522.603,153.014C521.801,154.016 520.749,155.069 519.446,156.171C518.244,157.273 516.741,158.275 514.937,159.177C513.234,160.079 511.28,160.781 509.075,161.282C506.971,161.883 504.666,162.184 502.161,162.184ZM507.272,141.59C512.382,141.59 516.49,139.836 519.597,136.329C522.803,132.821 524.406,128.362 524.406,122.95C524.406,117.539 522.803,113.079 519.597,109.572C516.49,106.064 512.382,104.31 507.272,104.31C502.161,104.31 498.003,106.064 494.796,109.572C491.69,113.079 490.137,117.539 490.137,122.95C490.137,128.362 491.69,132.821 494.796,136.329C498.003,139.836 502.161,141.59 507.272,141.59Z" style="fill-rule:nonzero;stroke:black;stroke-width:0.55px;"/>
<path d="M607.116,162.184C604.611,162.184 602.256,161.883 600.051,161.282C597.947,160.781 595.993,160.079 594.19,159.177C592.486,158.275 590.983,157.273 589.681,156.171C588.378,155.069 587.376,154.016 586.674,153.014L586.674,160.53L563.979,160.53L563.979,47.79L586.674,47.79L586.674,92.886C587.376,91.884 588.378,90.832 589.681,89.729C590.983,88.627 592.486,87.625 594.19,86.723C595.993,85.821 597.947,85.12 600.051,84.619C602.256,84.017 604.611,83.717 607.116,83.717C612.026,83.717 616.585,84.769 620.793,86.873C625.102,88.978 628.81,91.834 631.916,95.442C635.022,98.949 637.477,103.108 639.281,107.918C641.084,112.628 641.986,117.639 641.986,122.95C641.986,128.261 641.084,133.322 639.281,138.133C637.477,142.843 635.022,147.001 631.916,150.609C628.81,154.117 625.102,156.923 620.793,159.027C616.585,161.132 612.026,162.184 607.116,162.184ZM602.005,141.59C607.116,141.59 611.224,139.836 614.33,136.329C617.537,132.821 619.14,128.362 619.14,122.95C619.14,117.539 617.537,113.079 614.33,109.572C611.224,106.064 607.116,104.31 602.005,104.31C596.895,104.31 592.737,106.064 589.53,109.572C586.424,113.079 584.871,117.539 584.871,122.95C584.871,128.362 586.424,132.821 589.53,136.329C592.737,139.836 596.895,141.59 602.005,141.59Z" style="fill-rule:nonzero;stroke:black;stroke-width:0.55px;"/>
<path d="M732.106,160.53L680.101,94.54L680.101,160.53L656.203,160.53L656.203,53.803L676.795,53.803L728.649,119.793L728.649,53.803L752.698,53.803L752.698,160.53L732.106,160.53Z" style="fill-rule:nonzero;stroke:black;stroke-width:0.55px;"/>
<path d="M806.852,162.184C801.341,162.184 796.13,161.282 791.22,159.478C786.411,157.674 782.202,155.069 778.595,151.661C774.988,148.254 772.132,144.145 770.028,139.335C767.923,134.425 766.871,128.963 766.871,122.95C766.871,117.338 767.823,112.177 769.727,107.467C771.731,102.657 774.487,98.498 777.994,94.991C781.601,91.483 785.809,88.727 790.619,86.723C795.429,84.719 800.69,83.717 806.401,83.717C811.311,83.717 816.021,84.518 820.53,86.122C825.139,87.625 829.147,89.93 832.554,93.036C835.961,96.043 838.666,99.851 840.67,104.461C842.775,108.97 843.827,114.282 843.827,120.395C843.827,121.397 843.777,122.549 843.677,123.852C843.677,125.055 843.576,126.558 843.376,128.362L788.816,128.362C789.517,132.871 791.671,136.228 795.279,138.433C798.886,140.538 802.844,141.59 807.153,141.59C811.562,141.59 815.319,140.738 818.425,139.034C821.632,137.231 823.937,135.226 825.339,133.022L842.173,145.649C838.666,150.659 833.857,154.668 827.744,157.674C821.732,160.681 814.768,162.184 806.852,162.184ZM821.281,113.48C820.279,109.471 818.275,106.615 815.269,104.912C812.263,103.108 809.107,102.206 805.8,102.206C804.096,102.206 802.393,102.406 800.69,102.807C798.986,103.208 797.383,103.859 795.88,104.761C794.377,105.663 793.024,106.816 791.822,108.219C790.719,109.622 789.918,111.376 789.417,113.48L821.281,113.48Z" style="fill-rule:nonzero;stroke:black;stroke-width:0.55px;"/>
<path d="M901.265,162.184C898.76,162.184 896.405,161.883 894.201,161.282C892.097,160.781 890.143,160.079 888.339,159.177C886.636,158.275 885.133,157.273 883.83,156.171C882.527,155.069 881.525,154.016 880.824,153.014L880.824,160.53L858.128,160.53L858.128,47.79L880.824,47.79L880.824,92.886C881.525,91.884 882.527,90.832 883.83,89.729C885.133,88.627 886.636,87.625 888.339,86.723C890.143,85.821 892.097,85.12 894.201,84.619C896.405,84.017 898.76,83.717 901.265,83.717C906.175,83.717 910.734,84.769 914.943,86.873C919.252,88.978 922.959,91.834 926.065,95.442C929.172,98.949 931.627,103.108 933.43,107.918C935.234,112.628 936.136,117.639 936.136,122.95C936.136,128.261 935.234,133.322 933.43,138.133C931.627,142.843 929.172,147.001 926.065,150.609C922.959,154.117 919.252,156.923 914.943,159.027C910.734,161.132 906.175,162.184 901.265,162.184ZM896.155,141.59C901.265,141.59 905.374,139.836 908.48,136.329C911.686,132.821 913.29,128.362 913.29,122.95C913.29,117.539 911.686,113.079 908.48,109.572C905.374,106.064 901.265,104.31 896.155,104.31C891.045,104.31 886.886,106.064 883.68,109.572C880.573,113.079 879.02,117.539 879.02,122.95C879.02,128.362 880.573,132.821 883.68,136.329C886.886,139.836 891.045,141.59 896.155,141.59Z" style="fill-rule:nonzero;stroke:black;stroke-width:0.55px;"/>
<path d="M977.812,162.184C968.493,162.184 961.429,159.077 956.619,152.864C951.81,146.651 949.405,138.433 949.405,128.211L949.405,85.37L972.101,85.37L972.101,124.303C972.101,129.815 972.952,134.074 974.656,137.08C976.459,140.087 979.466,141.59 983.674,141.59C987.983,141.59 991.39,140.037 993.895,136.93C996.5,133.823 997.803,128.813 997.803,121.898L997.803,85.37L1020.5,85.37L1020.5,160.53L997.803,160.53L997.803,152.864C995.999,155.469 993.444,157.674 990.137,159.478C986.83,161.282 982.722,162.184 977.812,162.184Z" style="fill-rule:nonzero;stroke:black;stroke-width:0.55px;"/>
<rect x="1039.11" y="47.79" width="22.701" height="112.74" style="fill-rule:nonzero;stroke:black;stroke-width:0.55px;"/>
<path d="M1110.86,162.184C1105.95,162.184 1101.34,161.132 1097.03,159.027C1092.83,156.923 1089.17,154.117 1086.06,150.609C1082.96,147.001 1080.5,142.843 1078.7,138.133C1076.89,133.322 1075.99,128.261 1075.99,122.95C1075.99,117.639 1076.89,112.628 1078.7,107.918C1080.5,103.108 1082.96,98.949 1086.06,95.442C1089.17,91.834 1092.83,88.978 1097.03,86.873C1101.34,84.769 1105.95,83.717 1110.86,83.717C1113.37,83.717 1115.67,84.017 1117.78,84.619C1119.98,85.12 1121.94,85.821 1123.64,86.723C1125.44,87.625 1126.95,88.627 1128.15,89.729C1129.45,90.832 1130.5,91.884 1131.3,92.886L1131.3,85.37L1154,85.37L1154,160.53L1131.3,160.53L1131.3,153.014C1130.5,154.016 1129.45,155.069 1128.15,156.171C1126.95,157.273 1125.44,158.275 1123.64,159.177C1121.94,160.079 1119.98,160.781 1117.78,161.282C1115.67,161.883 1113.37,162.184 1110.86,162.184ZM1115.97,141.59C1121.08,141.59 1125.19,139.836 1128.3,136.329C1131.5,132.821 1133.11,128.362 1133.11,122.95C1133.11,117.539 1131.5,113.079 1128.3,109.572C1125.19,106.064 1121.08,104.31 1115.97,104.31C1110.86,104.31 1106.7,106.064 1103.5,109.572C1100.39,113.079 1098.84,117.539 1098.84,122.95C1098.84,128.362 1100.39,132.821 1103.5,136.329C1106.7,139.836 1110.86,141.59 1115.97,141.59Z" style="fill-rule:nonzero;stroke:black;stroke-width:0.55px;"/>
<path d="M146.48,54.585C119.724,89.866 119.878,134.941 146.826,155.264C153.908,160.605 162.136,163.705 170.903,164.732C146.032,184.934 117.382,191.203 98.037,178.045C71.507,160 72.524,112.249 100.309,71.391C123.51,37.273 158.039,18.749 184.247,24.072C170.404,30.195 157.116,40.561 146.48,54.585ZM181.638,99.643C169.141,111.453 154.859,119.304 142.801,121.916C149.921,147.367 177.29,149.323 177.29,149.323C177.29,149.323 193.578,145.578 205.877,117.941C216.005,95.183 215.122,71.668 204.914,59.7C204.065,71.267 195.731,86.324 181.638,99.643Z" style="stroke:black;stroke-width:0.55px;"/>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

View File

@@ -3,38 +3,38 @@ import { Tabs, TabItem } from '@astrojs/starlight/components';
<Tabs syncKey="cmd">
<TabItem label="Bash">
```sh frame=none
sh <(curl https://create.tauri.app/sh) --rc
sh <(curl https://create.tauri.app/sh)
```
</TabItem>
<TabItem label="PowerShell">
```ps frame=none
$env:CTA_ARGS="--rc"; irm https://create.tauri.app/ps | iex
```sh frame=none
irm https://create.tauri.app/ps | iex
```
</TabItem>
<TabItem label="npm">
```sh frame=none
npm create tauri-app@latest -- --rc
npm create tauri-app@latest
```
</TabItem>
<TabItem label="Yarn">
```sh frame=none
yarn create tauri-app --rc
yarn create tauri-app
```
</TabItem>
<TabItem label="pnpm">
```sh frame=none
pnpm create tauri-app --rc
pnpm create tauri-app
```
</TabItem>
<TabItem label="bun">
```sh frame=none
bun create tauri-app --rc
bun create tauri-app
```
</TabItem>
<TabItem label="Cargo">
```sh frame=none
cargo install create-tauri-app --locked
cargo create-tauri-app --rc
cargo create-tauri-app
```
</TabItem>
</Tabs>

View File

@@ -3,10 +3,6 @@ title: Announcing Tauri 1.1.0
date: 2022-09-15
authors: [lucasfernog]
excerpt: After 113 pull requests and nearly two months of work, the Tauri team is pleased to announce the 1.1.0 release.
banner:
content: |
You're reading the blog on the prerelease site for Tauri 2.0 -
<a href="https://tauri.app">Go to the Tauri 1.0 site</a>
---
import CommandTabs from '@components/CommandTabs.astro';

View File

@@ -3,10 +3,6 @@ title: Announcing Tauri 1.2.0
date: 2022-11-08
authors: [lucasfernog]
excerpt: The Tauri team is happy to announce the 1.2.0 release.
banner:
content: |
You're reading the blog on the prerelease site for Tauri 2.0 -
<a href="https://tauri.app">Go to the Tauri 1.0 site</a>
---
import CommandTabs from '@components/CommandTabs.astro';

View File

@@ -3,10 +3,6 @@ title: Announcing Tauri 1.3.0
date: 2023-05-03
authors: [lucasfernog, tweidinger]
excerpt: The Tauri team is happy to announce the 1.3.0 release.
banner:
content: |
You're reading the blog on the prerelease site for Tauri 2.0 -
<a href="https://tauri.app">Go to the Tauri 1.0 site</a>
---
import CommandTabs from '@components/CommandTabs.astro';

View File

@@ -3,10 +3,6 @@ title: Announcing Tauri 1.4.0
date: 2023-06-14
authors: lucasfernog
excerpt: The Tauri team is happy to announce the 1.4.0 release.
banner:
content: |
You're reading the blog on the prerelease site for Tauri 2.0 -
<a href="https://tauri.app">Go to the Tauri 1.0 site</a>
---
import CommandTabs from '@components/CommandTabs.astro';

View File

@@ -3,10 +3,6 @@ title: Announcing Tauri 1.5.0
date: 2023-09-28
authors: lucasfernog
excerpt: The Tauri team is happy to announce the 1.5.0 release.
banner:
content: |
You're reading the blog on the prerelease site for Tauri 2.0 -
<a href="https://tauri.app">Go to the Tauri 1.0 site</a>
---
import CommandTabs from '@components/CommandTabs.astro';

View File

@@ -3,10 +3,6 @@ title: Announcing Tauri 1.6.0
date: 2024-02-19
authors: lucasfernog
excerpt: The Tauri team is happy to announce the 1.6.0 release.
banner:
content: |
You're reading the blog on the prerelease site for Tauri 2.0 -
<a href="https://tauri.app">Go to the Tauri 1.0 site</a>
---
import CommandTabs from '@components/CommandTabs.astro';

View File

@@ -3,10 +3,6 @@ title: Announcing Tauri 1.7.0
date: 2024-07-01
authors: lucasfernog
excerpt: The Tauri team is happy to announce the 1.7.0 release.
banner:
content: |
You're reading the blog on the prerelease site for Tauri 2.0 -
<a href="https://tauri.app">Go to the Tauri 1.0 site</a>
---
import CommandTabs from '@components/CommandTabs.astro';

View File

@@ -3,10 +3,6 @@ title: Tauri 2.0.0-alpha.4 Released
date: 2023-03-20
authors: [lucasfernog]
excerpt: Mobile APIs for Tauri plugins! The 2.0.0-alpha.4 release has been published.
banner:
content: |
You're reading the blog on the prerelease site for Tauri 2.0 -
<a href="https://tauri.app">Go to the Tauri 1.0 site</a>
---
import CommandTabs from '@components/CommandTabs.astro';

View File

@@ -0,0 +1,467 @@
---
title: Tauri 2.0 Stable Release
date: 2024-10-02
authors: [tweidinger]
excerpt: 'Tauri 2.0 stable is released!'
---
import CommandTabs from '@components/CommandTabs.astro';
import TableCompatibility from '@components/plugins/TableCompatibility.astro';
import Cta from '@fragments/cta.mdx';
import FeaturesList from '@components/list/Features.astro';
We are very proud to finally announce the stable release for the new major version of Tauri.
Welcome to Tauri 2.0!
<div style="display:flex; flex-direction: row; justify-content: center; align-items: center">
<div style="padding-inline-end: 10px">
<svg width="48" height="48">
<use xlink:href="/assets/platforms.svg#wpf-android-os"></use>
</svg>
</div>
<div style="padding-inline-end: 10px">
<svg width="48" height="48">
<use xlink:href="/assets/platforms.svg#simple-icons-ios"></use>
</svg>
</div>
<div style="padding-inline-end: 10px">
<svg width="48" height="48">
<use xlink:href="/assets/platforms.svg#cib-linux"></use>
</svg>
</div>
<div style="padding-inline-end: 10px">
<svg width="48" height="48">
<use xlink:href="/assets/platforms.svg#wpf-mac-os"></use>
</svg>
</div>
<div style="padding-inline-end: 10px">
<svg width="48" height="48">
<use xlink:href="/assets/platforms.svg#bi-windows"></use>
</svg>
</div>
</div>
## What is Tauri?
:::note[Definition]
Tauri is a framework for building tiny and fast binaries for all major desktop (macOS, linux, windows) and mobile (iOS, Android) platforms.
Developers can integrate any frontend framework that compiles to HTML, JavaScript, and CSS for building their user experience while leveraging languages such as Rust, Swift, and Kotlin for backend logic when needed.
:::
In a Tauri application the frontend is written in your favorite web frontend stack.
This runs inside the operating system WebView and communicates with the application core written mostly in Rust.
![a graph showing the IPC bridge between the Application Core and the System's WebView](@assets/security/tauri-trust-boundaries.svg)
:::tip[No Rust Skills Needed!]
You don't need to write Code in Rust, Swift or Kotlin in most cases. Tauri already offers an extensive JavaScript API.
:::
### When Should I Use Tauri?
If you check **any** of the boxes below, you should use Tauri:
- [ ] Do you want a single UI codebase for all platforms?
- [ ] Do you want to reach as many users as possible on their platform (eg. Windows, MacOS, Linux, Android, iOS)?
- [ ] Are you a frontend web developer and want to write native applications?
- [ ] Are you a Rust developer looking to write applications with a nice looking UI with the option to do it in Rust?
- [ ] Do you have an existing team of web developers and want to expand to native application markets with low upfront investment?
- [ ] Do you have an existing team of rustaceans and want everything written in Rust?
## How Popular is Tauri?
![a graph showing the progression of Tauri GitHub stars over the years, starting with 0 at 2019 and continuing to grow past 80.000 in 2024](@assets/blog/tauri-star-history.png)
On GitHub the Tauri repository has [~4,878 Pull Requests](https://github.com/tauri-apps/tauri/pulls?q=is%3Apr+is%3Aclosed) and [~3,570 Issues](https://github.com/tauri-apps/tauri/issues?q=is%3Aissue+is%3Aclosed) closed and around [1000 discussions](https://github.com/tauri-apps/tauri/discussions), at the time of writing.
To get a more detailed insight take a look at [the OSSinsight analysis](https://ossinsight.io/analyze/tauri-apps/tauri) of the Tauri repository.
Our [Discord Server](https://discord.gg/tauri) currently has ~17,700 members. We are seeing a lot of individual user support, questions on Tauri itself, questions directly to the working group or just discussions between fellow Tauri app developers.
We are very happy about the positive and supportive community and grateful to all the community members answering or helping others in Discord or GitHub.
We maintain a curated list of Tauri related projects, applications, plugins, guides and more at [awesome-tauri](https://github.com/tauri-apps/awesome-tauri?tab=readme-ov-file#applications). Check this out if you want to get inspiration, see what others are building and ideally create a PR to add your project.
Of course this is only a representative sample set and we don't know exactly who else is building on Tauri.
## How Did We Get to 2.0?
In June 2022 we released Tauri 1.0 with a great impact on the desktop operating system market and how cross platform applications can be built.
In the end of 2022 we released our initial alpha version of 2.0 to get initial feedback and to test out how mobile interaction should be defined.
After the initial alpha we spent close to two years refining and changing the architecture of Tauri in public. After we saw the broad picture clear enough ourselves we released the beta in Februrary this year. At the same time we collaborated and worked with external security auditors to check our decisions, architecture changes and much more.
This August we published the release candidate version of 2.0 to iron out major bugs and to get more feedback from productive use. At the same time the external audit was concluded and made public.
The release candidate time frame was considerably shorter and consisted mainly of high impact bugfixes and documentation improvements. Some breaking changes we had to make during the release candidate phase were bundled up until the end and are now included in the stable release. Take a look at the [migration section](#migration) if your main concern is upgrading from a previous version.
In total we spent over two years working on improvements, new features, bugfixes, documentation, rewrites and a lot of discussions.
This all happened while we released 8 minor versions of the Tauri 1.x branch and backported security fixes and other important bug fixes in several patch releases.
## Who Made This Release Possible?
This release and Tauri itself is only possible due to massive amount of contributions from [Lucas](https://github.com/lucasfernog), who has provided a constant stream of code changes over the years ❤️.
![Lucas' contribution graph, with 2744 commits, over 896.000 additions and 688.000 deletions.](@assets/blog/lucas-commit-graph.png)
Obviously, Lucas is not the only individual working and contributing to Tauri, but we feel he deserves a very special mention for carrying, starting, and supporting the project and its community throughout the years.
We have had major contributions to the Tauri repository in 2.0 from [Amr](https://github.com/amrbashir), [Fabian-Lars](https://github.com/FabianLars), [Tony](https://github.com/Legend-Master), [Chip](https://github.com/chippers), [Jason](https://github.com/pewsheen), [YuWei](https://github.com/wusyong), [icb](https://github.com/i-c-b) , [Simon](https://github.com/simonhyll), [Oliver Lemasle](https://github.com/olivierlemasle) and many more contributors ([source data](https://github.com/tauri-apps/tauri/graphs/contributors?from=9%2F24%2F2022)).
We received an increasing number of drive-by contributors (one or very few PRs). We are grateful for these, but naming everyone would make this a very long list here.
We have a lot(!) of [repositories](https://github.com/orgs/tauri-apps/repositories) in our organization, which are supporting the success of Tauri and without community and working group contributions Tauri would not be where it is now. A big thank you to everyone involved!
Another special shout out and thanks for their constant involvement in the community goes to [Fabian-Lars](https://github.com/FabianLars) and [Simon](https://github.com/simonhyll). If you have been involved in Tauri's Discord or Github discussions you likely know their name or avatar.
If you ever searched on Google or YouTube for Tauri, you have probably seen one of [Jacob's streams](https://www.youtube.com/c/JacobBolda). If that's not the case please make sure to check it out and subscribe as his sessions are beyond just educational.
Another special place in our heart has the [Tauri Board](https://github.com/tauri-apps/governance-and-guidance/issues/58), highlighting [Daniel Yvetot-Thompson](https://mt.linkedin.com/in/daniel-thompson-yvetot-a98301222) for the numerous hours, sweat, blood and dedication to make Tauri known and sustainable.
One important thing we should not forget, is that we acquired support from a stable partner of this open source project.
![CrabNebula Logo](@assets/blog/crabnebula.svg)
[CrabNebula](https://crabnebula.dev/) granted multiple people mentioned above and others that are not mentioned here, the privilege to work on the Tauri ecosystem not only in their private time, but also during work time. You can find the [partnership announcement](<(https://v2.tauri.app/blog/partnership-crabnebula/)>) on our blog and we have been more than happy about this collaboration over the last year.
In 2024 alone they spent over **2,870** work hours on this project, which massively pushed the progress and allows us to announce the stable 2.0 release today.
If you were not aware of CrabNebula yet, make sure to check out their [products and services](https://crabnebula.dev/) and consider the symbiotic relationship with Tauri if you are interested in not only improving your workflows, but also supporting the Tauri ecosystem.
## What Makes 2.0 Great?
With this major release we improved and changed several aspects of how and where you can build, develop and publish your Tauri app. In the following sections we have more detailed insight. This does not cover everything, but should give you a decent impression on what you can expect from Tauri.
### Getting Started Experience
One thing you are always going to go through when starting with a new framework or tool is the initial onboarding or getting started process.
We value developer experience (DX) and try to make this initial process as seamless as building and distributing your final application.
For this we created another project, which is called [`create-tauri-app`](https://github.com/tauri-apps/create-tauri-app) or in short CTA.
This tool allows developers to start from scratch and get to a running Tauri app in a few minutes instead of hours.
<Cta />
Of course you need to install some prerequisites on your development system before you can start building your application. For this we have extensive guides with operating system specific sections in our [official documentation](https://v2.tauri.app/start/prerequisites/).
This whole onboarding experience has been improved and now also bootstraps mobile development templates for iOS and Android.
### Hot-Module Replacement
After the initial onboarding you will regularly develop and debug your Tauri application. We considered what would improve your development process already in 1.x of Tauri and extended the Hot-Module Replacement (HMR) to mobile devices and emulators.
This means that all changes to the frontend of your application do not require a rebuild of your whole application and you can live preview how it will look like in the device or operating system your are developing for.
<video controls>
<source src="/assets/hmr-preview.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>
### Plugins
With Tauri 2.0 we built a more advanced plugin system. We transferred a lot of our previous functionality into our official plugins (see [plugins-workspace](https://github.com/tauri-apps/plugins-workspace)), to allow the community an easier entry into contributing to Tauri. We also hope to attract more maintainers for plugins and to speed up the process of implementing new features.
This move to plugins has another benefit. We are going to be able to define a definition of done for Tauri's core. We hope to stabilize the core functionality and offer a stable framework, where the moving parts are mostly plugins offering access to system specific functionality.
You no longer need to understand all of Tauri to improve or implement specific features. The plugins usually do not depend on other plugins, with some exceptions. This means to implement a new file system access functionality it is only required to contribute to the `fs` plugin instead of Tauri itself.
As this release also targets mobile platforms, the plugin system also supports mobile plugins. You can write or re-use native code in Swift on iOS and Kotlin on Android and directly expose functions to the Tauri frontend using [`Annotations`](https://kotlinlang.org/docs/annotations.html) (`@Command` on Android), implementing a [`Subclass`](https://docs.swift.org/swift-book/documentation/the-swift-programming-language/inheritance#Subclassing) (`YourPluginClass: Plugin`) on iOS, or by invoking the Swift or Kotlin code from a Rust based Tauri command. Check out the [documentation](https://v2.tauri.app/develop/plugins/) on how to write your own plugin.
As we are releasing Tauri as 2.0, the official plugins will follow the major version of Tauri to make compatibility with Tauri's major version visible at a glance. Not all plugins are as stable as Tauri itself though.
Each plugin's stableness is defined per plugin and documented (soon) in the plugin documentation. The plugin API can possibly break in minor versions, but we will try to keep these changes to a minimum, especially for plugins considered stable.
:::tip
You can pin your plugin versions to only patch updates if you need absolute stable interfaces. We generally try to backport security updates and will announce advisories on GitHub.
:::
<FeaturesList />
### Mobile Support
A very much awaited part of this release is the mobile operating system support. The previous version of Tauri allowed to have a single UI code base for desktop operating systems but now this extends to iOS and Android.
We have investigated and experimented with different solutions to support mobile and decided on using the operating system native language (Swift and Kotlin) to build an interface for the Rust code and to allow developers to write part of their functionality in these languages.
This means you can re-use existing logic of your Swift or Kotlin app that interacts with the system and expose it to Rust or the frontend. Right now this works as mentioned above via the plugin system.
We support development with an emulator or a real device and provide a lot of tooling to make the process as seamless as possible. We are not completely happy about the developer experience at the moment but are actively improving to bring it up to par with the desktop experience.
On mobile not all of the official plugins are supported. Some are by design not a good fit for mobile and some are just not implemented to support mobile yet. If you would like to contribute on this part check the [last section](#call-to-action) of this post.
### The Allowlist is Dead, Long Live the Allowlist
Yes, there is no `allowlist` anymore, as we hit the limits of this system pretty quickly. We made it exclusive for Tauri core features and it did not even cover all of Tauri's APIs. Our new system not only covers all of Tauri's core API surface, it also supports app and plugin developers to implement their own access control and scoping with a unified approach.
The new system we implemented is using [`permissions`](https://v2.tauri.app/security/permissions/) - _"On-off toggles for Tauri commands"_, [`scopes`](https://v2.tauri.app/security/scope/) - _"Parameter validation for Tauri commands"_ and [`capabilities`](https://v2.tauri.app/security/capabilities/) - _"Attaching permissions and scopes to Windows and WebViews"_, to create a flexible but simple to use access control system.
It allows the creation of named permission or scoping files and to re-use and combine them with other named permissions or scopes. This makes it possible to build more fine grained descriptive sets containing several simple or complex permissions and scopes.
As a plugin developer you can abstract away several base permissions into a `default` permission. This can be based on your default security assumptions and threat model. All official Tauri plugin default permissions are reasonably secure by default.
As an app developer you can use, extend or reduce plugin permissions. Of course you can also build permissions and scopes for your own application.
With this addition, Tauri's core is now able to understand if a command invoke message from a frontend WebView is allowed to reach the command function. It is also able to attach the configured scope to the message.
The command implementation is responsible for interpreting and enforcing the scope. You can read more about our Threat Model and approach to security in our [documentation](https://v2.tauri.app/security/).
### External Security Audit
The major changes and architecture of v2 was independently audited by [Radically Open Security](https://www.radicallyopensecurity.com/) during the beta and release candidate period. Please take your time to read the [report](https://github.com/tauri-apps/tauri/blob/dev/audits/Radically_Open_Security-v2-report.pdf) and learn more about the awesome work of [@gronke](https://github.com/gronke) and [@pcwizz](https://github.com/pcwizz).
The whole audit was funded by the great folks at [NLNet](https://nlnet.nl/) via funding from [NGI](https://ngi.eu) and we are super grateful to be in the privileged position to get fully funded external security audits for major releases.
The results of this audit caused us to rewrite parts of how our dev server is exposed, specifically for mobile development. Without the help and guidance of the auditors this rewrite would not have been possible ❤️.
Additionally, we hardened our iFrame API exposure, fixed scope validation and resource identifier access for the `fs` and `http` plugin, improved our inter-process communication stability, and many other security related fixes and improvements.
### Inter Process Communication (IPC) Rewrite
With the rewrite of our IPC layer we now support a long wished feature of Raw Payloads and generally changed how it works under the hood.
Previously **all** IPC payloads were json serialized and deserialized which caused an overhead. This was noticeable once more than a few kilobytes were transfered between frontend and backend.
The new system supports [Raw Requests](https://v2.tauri.app/develop/calling-rust/#accessing-raw-request). These speed up the transfer of large data from backend to frontend and vice versa, where you can either use raw bytes directly or use your own (de)serialization process (eg. bson, protobuf, avro and others).
For directly reading files from the filesystem into the WebView we still recommend the [`convertFileSrc`](https://v2.tauri.app/reference/javascript/api/namespacecore/#convertfilesrc) functionality, as it is most likely still faster if you do not need to process the data on the Rust backend.
### Distribution Guides
With Tauri 2.0 the distribution diversity greatly increased. Partially, due to the mobile ecosystem and partially due to our community contributions.
We have official guides on how to ship to the [Apple Appstore](https://v2.tauri.app/distribute/app-store/), [Google Play](https://v2.tauri.app/distribute/google-play/), [Microsoft Store](https://v2.tauri.app/distribute/microsoft-store/), [CrabNebula Cloud](https://v2.tauri.app/distribute/crabnebula-cloud/), [Flathub](https://v2.tauri.app/distribute/flatpak/), [Snapcraft](https://v2.tauri.app/distribute/snapcraft/), [AUR](https://v2.tauri.app/distribute/aur/) and more distribution formats in our [distribution docs](https://v2.tauri.app/distribute/).
:::note[Github Action]
Our GitHub acion (`tauri-action`) is in progress to support automated building for the mobile operating systems but does not support it yet.
:::
## Changelog
This section contains all changes going from 1.x in a concise list.
<details>
<summary><i>Show the Full List</i></summary>
### Added
- Added Mobile support.
- Added multiwebview support behind the unstable feature flag. See WindowBuilder and WebviewBuilder for more information.
- Added `rustls-tls` cargo feature flag
- Added `shadow` option when creating a webview window,`WebviewWindow::set_shadow` method in Rust and equivalent API in JS.
- Added `tauri::Webview`, `tauri::WebviewBuilder`, `tauri::WebviewWindow`, `tauri::WebviewWindowBuilder` structs in Rust and equivalent classes in Js. The old `tauri::Window` and `tauri::WindowBuilder` behaviors have moved to `tauri::WebviewWindow` and `tauri::WebviewWindowBuilder`.
- Added `tauri::scope::fs` module
- Added `tauri::App/AppHandle::default_window_icon` method.
- Added `tauri::ipc` module with IPC primitives.
- Added `tauri::ipc::Channel` type and equivalent JS `Channel` type to send data across the IPC.
- Added `incognito` option when creating a webview window.
- Added `windowEffects` option when creating a webview window and `WebviewWindow::set_effects` to try and change effects at runtime.
- Added `tauri::path::PathResolver`
- Added `tauri::Manager::path` method to access the new `PathResolver`
- Added `visibleOnAllWorkspaces` option when creating a webview window.
- Added `tauri::App/AppHandle::primary_monitor` and `App/AppHandle::available_monitors` methods.
- Added `tauri::plugin::Builder::on_navigation` and `tauri::plugin::Plugin::on_navigation`.
- Added `tauri::WebviewWindow::navigate` method
- Added `tauri::RunEvent::Opened` on macOS and iOS for deep link support.
- Added file associations support in bundler.
- Added `tauri::App/AppHandle::cleanup_before_exit` to manually call the cleanup logic. You should always exit the tauri app immediately after this function returns and not use any tauri-related APIs.
- On Linux, add `tauri::WebviewWindow::default_vbox` method to get a reference to the `gtk::Box` that contains the menu bar and the webview.
- Added `linux-libxdo` cargo feature flag (disabled by default) to enable linking to `libxdo` which is used to make `Cut`, `Copy`, `Paste` and `SelectAll` native menu items work on Linux.
- On macOS, add `tauri::WebviewWindow::ns_view` method to get a pointer to the `NSWindow` content view.
- Added `tauri::Builder::register_asynchronous_uri_scheme_protocol` to allow resolving a custom URI scheme protocol request asynchronously to prevent blocking the main thread.
- Included drop and hover position for drag and drop events.
- Added `tauri::WebviewWindow::set_progress_bar` method
- Added `tauri::WebviewWindow::set_always_on_bottom` method and `alwaysOnTop` option when creating a webview window.
- Added `tauri::WebviewWindowBuilder::on_page_load` method.
- Added `common-controls-v6` cargo feature flag (enabled by default).
- Added `Window::destroy` to force close a window.
- Added `tauri::EventId` type
- Added `tauri::WindowBuilder::on_download` to handle download request events.
- Added `tauri::WebviewWindowBuilder::parent` which is a convenient wrapper around parent functionality for Windows, Linux and macOS.
- Added `tauri::WebviewWindowBuilder::owner` on Windows only.
- Added `tauri::WebviewWindowBuilder::transient_for` and `tauri::WebviewWindowBuilder::transient_for_raw` on Linux only.
- Added `tauri::WebviewWindow::start_resize_dragging` and `tauri::ResizeDirection` enum.
- Added `tauri::WebviewWindowBuilder::proxy_url` method.
- Added `tauri::WebviewEvent` enum
- Added `tauri::RunEvent::WebviewEvent` variant.
- Added `tauri::Builder::on_webview_event` and `tauri::Webview::on_webview_event` methods.
- Added `tauri::image` module which includes`tauri::image::Image` and `tauri::image::JsImage` types and `tauri::image::include_img!` macro.
- Added `tauri::is_dev` function to determine whether the app is running in development mode or not.
- Added `tauri::Assets::setup` method on `tauri::Assets` trait that lets you run initialization code for your custom asset provider.
- Added `tauri::Rect` struct.
- Added `tauri::WebviewWindow::set_zoom` method
- Added `zoomHotkeys` option when creating a webview window.
- Added `window.isTauri` JS global function to check whether running in tauri or not.
- Added `specta` feature flag which adds `specta` support for `AppHandle`, `State`, `Window`, `Webview` and `WebviewWindow` types.
- Added `tauri::App/AppHandle/WebviewWindow::cursor_position` getter to get the current cursor position.
- Added `tauri::App/AppHandle/WebviewWindow::monitor_from_point(x,y)` getter to get the monitor from a given point..
- Added `tauri::RunEvent::Reopen` to handle click on dock icon on macOS.
- Added `defaultWindowIcon` to the JS `app` module to retrieve the default window icon in JS.
- Added `tauri::WebviewWindow::set_title_bar_style` to set title bar at runtime on macOS.
- Add APIs to enable setting window size constraints separately:
- Added `tauri::WindowBuilder::inner_size_constraints` and `tauri::WebviewWindowBuilder::inner_size_constraints`
- Added `tauri::WindowSizeConstraints` struct
- Added `tauri::Window::set_size_constraints` and `tauri::WebviewWindow::set_size_constraints`
### Enhancements
- Use custom protocols on the IPC implementation to enhance performance.
- Enhance centering a newly created window, it will no longer jump to center after being visible.
- The `custom-protocol` Cargo feature is no longer required on your application and is now ignored. To check if running on production, use `#[cfg(not(dev))]` instead of `#[cfg(feature = "custom-protocol")]`.
- Improved the JS `path` APIs to return simplified paths on Windows when possible, i.e removing UNC (`\\?\`) prefix.
- Improved the error message that is shown when deserializing the Tauri plugin config.
- Set the gtk application id to the `identifier` defined in `tauri.conf.json` to ensure the app uniqueness. This can be disabled by setting `enableGtkAppId` option to `false`.
- On Windows, handle resizing undecorated windows natively which improves performance and fixes a couple of annoyances with previous JS implementation:
- No more cursor flickering when moving the cursor across an edge.
- Can resize from top even when `data-tauri-drag-region` element exists there.
- Upon starting rezing, clicks don't go through elements behind it so no more accidental clicks.
- Mark `AppHandle::restart` and `process::restart` as [diverging functions](https://doc.rust-lang.org/rust-by-example/fn/diverging.html)
### Bug Fixes
- No longer unpacking and flattening the `payload` over the IPC so that commands with arguments called `cmd`, `callback`, `error`, `options` or `payload` aren't breaking the IPC.
- Fix calling `set_activation_policy` when the event loop is running.
- Fix can not prevent closing a window from another webview.
- On Windows, fix decorated window not transparent initially until resized.
- Resolve symlinks on the filesystem scope check.
- Fix the JS `basename(path, 'ext')` API implementation removing all occurances of `ext` where it should only remove the last one.
- Fix window white flashing on exit on Windows
- Apply `minWidth`, `minHieght`, `maxWidth` and `maxHeight` constraints separately, which fixes a long standing bug where these constraints were never applied unless width and height were constrained together.
### Changed
- The window creation and setup hook are now called when the event loop is ready.
- Renamed the `default-tls` feature to `native-tls` and.
- Changed the plugin setup hook to take a second argument of type `PluginApi`
- Changed `tauri::Window` struct behavior and moved its old behavior to the new `tauri::WebviewWindow` type.
- Moved `tauri::api::path` module to `tauri::path`
- Moved all functions from `tauri::api::path` to be methods on `tauri::path::PathResolver`
- Renamed `system-tray` feature flag to `tray-icon`.
- Changed `tauri::App::handle` and `tauri::Manager::app_handle` methods to return a reference to an `AppHandle` instead of an owned value.
- Changed `tauri::Builder::register_uri_scheme_protocol` to return a `http::Response` instead of `Result<http::Response>`. To return an error response, manually create a response with status code >= 400.
- The custom protocol on Windows and Android now uses the `http` scheme instead of `https`.
- Changed `tauri::Env.args` to `tauri::Env.args_os` and now uses `OsString` instead of `String`
- Changed `TAURI_AUTOMATION` env var to `TAURI_WEBVIEW_AUTOMATION`
- Changed `tauri::Builder::invoke_system` to take references instead of owned values.
- Changed`tauri::Builder::invoke_system`, `tauri::Builder::on_page_load` hooks to take a `tauri::Webview` argument instead of a `tauri::Window`.
- Moved the `tauri::command` module items to the `tauri::ipc` module so its import name does not clash with the `tauri::command` macro.
- Changed `tauri::App::run_iteration` to take a callback and removed its return value.
- Changed `AppHandle::exit` and `AppHandle::restart` to trigger `RunEvent::ExitRequested` and `RunEvent::Exit`
- Renamed `tauri::WebviewWindowBuilder::owner_window` to `tauri::WebviewWindowBuilder::owner_raw` and `tauri::WebviewWindowBuilder::parent_window` to `tauri::WebviewWindowBuilder::parent_raw`.
- Renamed the `window-data-url` feature flag to `webview-data-url`.
- Changed `tauri::WebviewWindow::close` to trigger a close requested event instead of forcing the window to be closed. Use `tauri::WebviewWindow::destroy` to force close.
- Renamed `icon-ico` and `icon-png` feature flags to `image-ico` and `image-png` respectively.
- Removed `tauri::Icon` enum, use the new `tauri::Image` type instead. All APIs that previously accepted `tauri::Icon` have changed to accept `tauri::Image` instead.
- Changed `tauri::Context` struct and `tauri::Assets` trait to have a `R: Runtime` generic.
- Renamed `tauri::Context::assets_mut` to `tauri::Context::set_assets`
- Changed `tauri::Context` type to not have `<A: Assets>` generic so the assets implementation can be swapped with `Context::set_assets`.
- Changed `tauri::Context::assets` to return `&dyn Assets` instead of `&A` generic.
- Renamed `tauri::FileDropEvent` enum to `tauri::DragDropEvent` and renamed its variants. Also renamed the js events
- Renamed `tauri::WindowEvent::FileDrop` enum variant to `tauri::WindowEvent::DragDrop`
- Renamed file drop emitted events to `tauri://drag-enter`, `tauri://drag-over`, `tauri://drag-drop`, and `tauri://drag-leave`
- Renamed `tauri::WebviewWindow::disable_file_drop_handler` to `tauri::WebviewWindow::disable_drag_drop_handler`.
- Changed `tauri::WebviewWindow::url` getter to return a result.
- Changed `tauri::Env.args_os`, to include the binary path, previously it was skipped.
- Renamed `getAll` and `getCurrent` to `getAllWindows` and `getCurrentWindow` in the JS `window` module but you probably want `getAllWebviewWindows` and `getCurrentWebviewWindow` from the `webviewWindow` module.
### Removed
- The `reqwest-*` Cargo features were removed
- `UpdaterEvent`
- Removed`tauri::api` module and moved them into standalone plugins in `plugins-workspace` repo.
- Removed `tauri::scope::IpcScope`
- Removed `tauri::scope::ipc` module and all its types.
- Removed `tauri::scope::FsScope`, use `tauri::scope::fs::Scope`
- Removed `tauri::scope::GlobPattern`, use `tauri::scope::fs::Pattern`
- Removed `tauri::scope::FsScopeEvent`, use `tauri::scope::fs::Event`
- Removed `tauri::scope::HttpScope`
- Removed `tauri::scope::ShellScope`
- Removed `tauri::scope::ShellScopeAllowedCommand`
- Removed `tauri::scope::ShellScopeAllowedArg`
- Removed `tauri::scope::ExecuteArgs`
- Removed `tauri::scope::ShellScopeConfig`
- Removed `tauri::scope::ShellScopeError`
- Removed `linux-protocol-headers` cargo feature flag, now enabled by default.
- Removed `tauri::path::Error` and `tauri::path::Result` and added its variants to `tauri::Error`
- Removed `tauri::path::Result` and `tauri::plugin::Result` aliases, you should use `tauri::Result` or your own `Result` type.
- Changed `tauri::Builder::on_page_load` handler to take references. The page load hook is now triggered for load started and finished events, to determine what triggered it see `tauri::PageLoadPayload::event` field.
- Removed `tauri::GlobalWindowEvent` struct, and unpacked its fields to be passed directly to `tauri::Builder::on_window_event`.
- Removed `tauri::EventHandler` type.
- Renamed `tauri::Context::default_window_icon_mut` to `tauri::Context::set_default_window_icon` and changed it to accept `Option<T>`.
### Config restructure
Restructured Tauri config per [RFC#5](https://github.com/tauri-apps/rfcs/blob/f3e82a6b0c5390401e855850d47dc7b7d9afd684/texts/0005-tauri-config-restructure.md):
- Moved `package.productName`, `package.version` and `tauri.bundle.identifier` fields to the top-level.
- Removed `package` object.
- Renamed `tauri` object to `app`.
- Moved `tauri.bundle` object to the top-level.
- Renamed `build.distDir` field to `frontendDist`.
- Renamed `build.devPath` field to `devUrl` and will no longer accepts paths, it will only accept URLs.
- Moved `tauri.pattern` to `app.security.pattern`.
- Removed `tauri.bundle.updater` object, and its fields have been moved to the updater plugin under `plugins.updater` object.
- Moved `build.withGlobalTauri` to `app.withGlobalTauri`.
- Moved `tauri.bundle.dmg` object to `bundle.macOS.dmg`.
- Moved `tauri.bundle.deb` object to `bundle.linux.deb`.
- Moved `tauri.bundle.appimage` object to `bundle.linux.appimage`.
- Removed all license fields from each bundle configuration object and instead added `bundle.license` and `bundle.licenseFile`.
- Renamed `AppUrl` to `FrontendDist` and refactored its variants to be more explicit.
- Renamed `tauri.window.fileDropEnabeld` to `app.window.dragDropEnabled`
</details>
## Migration
As we try to make the migration from previous Tauri versions as smooth as possible, we have documentation available to guide you through the process.
If you are migrating from a 1.x release please check out this [migration guide](https://v2.tauri.app/start/migrate/from-tauri-1/).
For upgrading from a 2.0 beta or release candidate version check out this [migration guide](https://v2.tauri.app/start/migrate/from-tauri-2-beta/).
The Tauri v2 CLI includes a `migrate` command that automates most of the process and helps you finish the migration:
<CommandTabs
npm="npm install @tauri-apps/cli@next
npm run tauri migrate"
yarn="yarn upgrade @tauri-apps/cli@next
yarn tauri migrate"
pnpm="pnpm update @tauri-apps/cli@next
pnpm tauri migrate"
cargo='cargo install tauri-cli --version "^2.0.0" --locked
cargo tauri migrate'
/>
:::caution[Rust Migration]
We can not automatically migrate your Rust code, so make sure to go through the documentation and rust docs of the 2.0 version.
:::
## Call To Action
If you are familiar with Tauri and have used it already during your journey, please take your time to check out the [Github Discssions](https://github.com/tauri-apps/tauri/discussions), [Github Issues](https://github.com/tauri-apps/tauri/issues). Maybe you have already solved the issues your fellow newcomers to Tauri are experiencing right now.
If you think that some of these problems you have seen are generic and should be documented somewhere we probably have the perfect place for it in our official [documentation](https://v2.tauri.app).
To contribute improvements or additions we are open for PRs in the [tauri-docs](https://github.com/tauri-apps/tauri-docs) repository. Please make sure you've read the [guidelines](https://github.com/tauri-apps/tauri-docs/blob/v2/.github/CONTRIBUTING.md) for contribution though.
If you are in the position to understand and translate the current documentation into your native language we appreciate [content translations](https://v2.tauri.app/contribute/translate-status) to our documentation.
The repositories surrounding Tauri are also looking for contributors, especially we would love more maintainers and contributors to the [`plugin-workspace`](https://github.com/tauri-apps/plugins-workspace).
The plugins are now a major part of the development and user experience of Tauri and all kind of help is welcome there. From discussing new plugin ideas, collaborating with others to write new plugins, contributing PRs to fix bugs in existing plugins or documenting weird workarounds and knowledge in the plugin readme or code.
## Roadmap
You probably expect solid plans for the future and new cool ideas from us.
We currently have some in mind but have not committed to a roadmap beyond 2.x yet.
We mainly want to focus on improving this major version with a better developer experience, better documentation and less impactful bugs. We want to improve especially the mobile development experience and make the whole flow from idea to published application as seamless as possible.
Things on our radar for the future we feel we should mention at least:
- Providing or Bundling Chromium Embedded Framework (CEF) for Linux as an alternative to WebKit2GTK
- [Servo]() as Tauri WebView ([POC in Wry](https://github.com/tauri-apps/wry/tree/servo-wry-demo))
If you want to collaborate on these ideas, please let us know and we will figure it out together.

View File

@@ -3,10 +3,6 @@ title: Announcing the Tauri Mobile Alpha Release
date: 2022-12-09
authors: [lucasfernog]
excerpt: Tauri mobile is here! The first alpha release 2.0.0-alpha.0 has been published.
banner:
content: |
You're reading the blog on the prerelease site for Tauri 2.0 -
<a href="https://tauri.app">Go to the Tauri 1.0 site</a>
---
import CommandTabs from '@components/CommandTabs.astro';

View File

@@ -13,7 +13,7 @@ With the CrabNebula DevTools you can inspect your app's log events (including lo
To enable the CrabNebula DevTools, install the devtools crate:
```sh frame=none
cargo add tauri-plugin-devtools@2.0.0-rc
cargo add tauri-plugin-devtools@2.0.0
```
And initialize the plugin as soon as possible in your main function:

View File

@@ -145,5 +145,5 @@ tauri = { version = "...", features = ["...", "devtools"] }
The Core process is powered by Rust so you can use GDB or LLDB to debug it. You can follow the [Debugging in VS Code] guide to learn how to use the LLDB VS Code Extension to debug the Core Process of Tauri applications.
[debugging in vs code]: /develop/debug/vscode/
[`WebviewWindow::open_devtools`]: https://docs.rs/tauri/2.0.0-rc/tauri/webview/struct.WebviewWindow.html#method.open_devtools
[`WebviewWindow::close_devtools`]: https://docs.rs/tauri/2.0.0-rc/tauri/webview/struct.WebviewWindow.html#method.close_devtools
[`WebviewWindow::open_devtools`]: https://docs.rs/tauri/2.0.0/tauri/webview/struct.WebviewWindow.html#method.open_devtools
[`WebviewWindow::close_devtools`]: https://docs.rs/tauri/2.0.0/tauri/webview/struct.WebviewWindow.html#method.close_devtools

View File

@@ -230,7 +230,7 @@ class ExamplePlugin: Plugin {
</TabItem>
</Tabs>
Use the [`tauri::plugin::PluginHandle`](https://docs.rs/tauri/2.0.0-rc/tauri/plugin/struct.PluginHandle.html) to call a mobile command from Rust:
Use the [`tauri::plugin::PluginHandle`](https://docs.rs/tauri/2.0.0/tauri/plugin/struct.PluginHandle.html) to call a mobile command from Rust:
```rust
use std::path::PathBuf;

View File

@@ -191,7 +191,7 @@ Builder::new("<plugin-name>")
- **When**: Event loop events
- **Why**: Handle core events such as window events, menu events and application exit requested
With this lifecycle hook you can be notified of any event loop [events](https://docs.rs/tauri/2.0.0-rc/tauri/enum.RunEvent.html).
With this lifecycle hook you can be notified of any event loop [events](https://docs.rs/tauri/2.0.0/tauri/enum.RunEvent.html).
```rust title="src/lib.rs"
use std::{collections::HashMap, fs::write, sync::Mutex};
@@ -341,7 +341,7 @@ pub struct Entry {
###### Command Scope
Your plugin consumer can define a scope for a specific command in their capability file (see the [documentation](/reference/acl/scope/)).
You can read the command-specific scope with the [`tauri::ipc::CommandScope`](https://docs.rs/tauri/2.0.0-rc/tauri/ipc/struct.CommandScope.html) struct:
You can read the command-specific scope with the [`tauri::ipc::CommandScope`](https://docs.rs/tauri/2.0.0/tauri/ipc/struct.CommandScope.html) struct:
```rust title="src/commands.rs"
use tauri::ipc::CommandScope;
@@ -367,7 +367,7 @@ description = "This scope permits spawning the `node` binary."
binary = "node"
```
You can read the global scope with the [`tauri::ipc::GlobalScope`](https://docs.rs/tauri/2.0.0-rc/tauri/ipc/struct.GlobalScope.html) struct:
You can read the global scope with the [`tauri::ipc::GlobalScope`](https://docs.rs/tauri/2.0.0/tauri/ipc/struct.GlobalScope.html) struct:
```rust title="src/commands.rs"
use tauri::ipc::GlobalScope;

View File

@@ -258,15 +258,15 @@ tauri::Builder::default()
If the script to be evaluated is not so simple and must use input from Rust objects we recommend using the [serialize-to-javascript] crate.
[`WebviewWindow#eval`]: https://docs.rs/tauri/2.0.0-rc/tauri/webview/struct.WebviewWindow.html#method.eval
[`WebviewWindow#eval`]: https://docs.rs/tauri/2.0.0/tauri/webview/struct.WebviewWindow.html#method.eval
[serialize-to-javascript]: https://docs.rs/serialize-to-javascript/latest/serialize_to_javascript/
[AppHandle]: https://docs.rs/tauri/2.0.0-rc/tauri/webview/struct.AppHandle.html
[WebviewWindow]: https://docs.rs/tauri/2.0.0-rc/tauri/webview/struct.WebviewWindow.html
[Listener]: https://docs.rs/tauri/2.0.0-rc/tauri/webview/trait.Listener.html
[Emitter]: https://docs.rs/tauri/2.0.0-rc/tauri/webview/trait.Emitter.html
[Emitter#emit]: https://docs.rs/tauri/2.0.0-rc/tauri/webview/trait.Emitter.html#method.emit
[Emitter#emit_to]: https://docs.rs/tauri/2.0.0-rc/tauri/webview/trait.Emitter.html#method.emit_to
[Emitter#emit_filter]: https://docs.rs/tauri/2.0.0-rc/tauri/webview/trait.Emitter.html#method.emit_filter
[AppHandle]: https://docs.rs/tauri/2.0.0/tauri/webview/struct.AppHandle.html
[WebviewWindow]: https://docs.rs/tauri/2.0.0/tauri/webview/struct.WebviewWindow.html
[Listener]: https://docs.rs/tauri/2.0.0/tauri/webview/trait.Listener.html
[Emitter]: https://docs.rs/tauri/2.0.0/tauri/webview/trait.Emitter.html
[Emitter#emit]: https://docs.rs/tauri/2.0.0/tauri/webview/trait.Emitter.html#method.emit
[Emitter#emit_to]: https://docs.rs/tauri/2.0.0/tauri/webview/trait.Emitter.html#method.emit_to
[Emitter#emit_filter]: https://docs.rs/tauri/2.0.0/tauri/webview/trait.Emitter.html#method.emit_filter
[Clone]: https://doc.rust-lang.org/std/clone/trait.Clone.html
[Serialize]: https://serde.rs/impl-serialize.html
[Calling Rust from the Frontend]: /develop/calling-rust

View File

@@ -685,11 +685,11 @@ listen(
To learn how to listen to events and emit events from your Rust code, see the [Rust Event System documentation].
[Calling the Frontend from Rust]: /develop/calling-frontend
[`async_runtime::spawn`]: https://docs.rs/tauri/2.0.0-rc/tauri/async_runtime/fn.spawn.html
[`async_runtime::spawn`]: https://docs.rs/tauri/2.0.0/tauri/async_runtime/fn.spawn.html
[`serde::serialize`]: https://docs.serde.rs/serde/trait.Serialize.html
[`serde::deserialize`]: https://docs.serde.rs/serde/trait.Deserialize.html
[`tauri::ipc::Response`]: https://docs.rs/tauri/2.0.0-rc/tauri/ipc/struct.Response.html
[`tauri::ipc::Request`]: https://docs.rs/tauri/2.0.0-rc/tauri/ipc/struct.Request.html
[`tauri::ipc::Response`]: https://docs.rs/tauri/2.0.0/tauri/ipc/struct.Response.html
[`tauri::ipc::Request`]: https://docs.rs/tauri/2.0.0/tauri/ipc/struct.Request.html
[`thiserror`]: https://github.com/dtolnay/thiserror
[`result`]: https://doc.rust-lang.org/std/result/index.html
[event.emit]: /reference/javascript/api/namespaceevent#emit

View File

@@ -24,10 +24,10 @@ The default Tauri config format is JSON. The JSON5 or TOML format can be enabled
```toml title=Cargo.toml
[build-dependencies]
tauri-build = { version = "2.0.0-rc", features = [ "config-json5" ] }
tauri-build = { version = "2.0.0", features = [ "config-json5" ] }
[dependencies]
tauri = { version = "2.0.0-rc", features = [ "config-json5" ] }
tauri = { version = "2.0.0", features = [ "config-json5" ] }
```
The structure and values are the same across all formats, however, the formatting should be consistent with the respective file's format:
@@ -193,22 +193,22 @@ edition = "2021"
rust-version = "1.57"
[build-dependencies]
tauri-build = { version = "2.0.0-rc" }
tauri-build = { version = "2.0.0" }
[dependencies]
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
tauri = { version = "2.0.0-rc", features = [ ] }
tauri = { version = "2.0.0", features = [ ] }
```
The most important parts to take note of are the `tauri-build` and `tauri` dependencies. Generally, they must both be on the latest minor versions as the Tauri CLI, but this is not strictly required. If you encounter issues while trying to run your app you should check that any Tauri versions (`tauri` and `tauri-cli`) are on the latest versions for their respective minor releases.
Cargo version numbers use [Semantic Versioning]. Running `cargo update` in the `src-tauri` folder will pull the latest available Semver-compatible versions of all dependencies. For example, if you specify `2.0.0-rc` as the version for `tauri-build`, Cargo will detect and download version `2.0.0-rc.0` because it is the latest Semver-compatible version available. Tauri will update the major version number whenever a breaking change is introduced, meaning you should always be capable of safely upgrading to the latest minor and patch versions without fear of your code breaking.
Cargo version numbers use [Semantic Versioning]. Running `cargo update` in the `src-tauri` folder will pull the latest available Semver-compatible versions of all dependencies. For example, if you specify `2.0.0` as the version for `tauri-build`, Cargo will detect and download version `2.0.0.0` because it is the latest Semver-compatible version available. Tauri will update the major version number whenever a breaking change is introduced, meaning you should always be capable of safely upgrading to the latest minor and patch versions without fear of your code breaking.
If you want to use a specific crate version you can use exact versions instead by prepending `=` to the version number of the dependency:
```
tauri-build = { version = "=2.0.0-rc.0" }
tauri-build = { version = "=2.0.0.0" }
```
An additional thing to take note of is the `features=[]` portion of the `tauri` dependency. Running `tauri dev` and `tauri build` will automatically manage which features need to be enabled in your project based on the your Tauri configuration. For more information about `tauri` feature flags see the [documentation][tauri Cargo features].
@@ -231,8 +231,8 @@ An example of a barebones `package.json` file for a Tauri project might look a l
"tauri": "tauri"
},
"dependencies": {
"@tauri-apps/api": "^2.0.0-rc.0",
"@tauri-apps/cli": "^2.0.0-rc.0"
"@tauri-apps/api": "^2.0.0.0",
"@tauri-apps/cli": "^2.0.0.0"
}
}
```
@@ -266,5 +266,5 @@ To learn more about the `package.json` file format please refer to the [official
[semantic versioning]: https://semver.org
[cargo-manifest]: https://doc.rust-lang.org/cargo/reference/manifest.html
[npm-package]: https://docs.npmjs.com/cli/v8/configuring-npm/package-json
[tauri Cargo features]: https://docs.rs/tauri/2.0.0-rc/tauri/#cargo-features
[tauri Cargo features]: https://docs.rs/tauri/2.0.0/tauri/#cargo-features
[JSON Merge Patch (RFC 7396)]: https://datatracker.ietf.org/doc/html/rfc7396

View File

@@ -155,7 +155,7 @@ package() {
}
```
[`async_runtime::spawn`]: https://docs.rs/tauri/2.0.0-rc/tauri/async_runtime/fn.spawn.html
[`async_runtime::spawn`]: https://docs.rs/tauri/2.0.0/tauri/async_runtime/fn.spawn.html
[`serde::serialize`]: https://docs.serde.rs/serde/trait.Serialize.html
[`serde::deserialize`]: https://docs.serde.rs/serde/trait.Deserialize.html
[`thiserror`]: https://github.com/dtolnay/thiserror

View File

@@ -181,7 +181,7 @@ Additionally, to use the Notification API in Windows 7, you need to enable the `
```toml title="Cargo.toml"
[dependencies]
tauri-plugin-notification = { version = "2.0.0-rc", features = [ "windows7-compat" ] }
tauri-plugin-notification = { version = "2.0.0", features = [ "windows7-compat" ] }
```
## FIPS Compliance

View File

@@ -103,5 +103,5 @@ tauri = { version = "...", features = ["...", "devtools"] }
Le processus Core est alimenté par Rust, vous pouvez donc utiliser GDB ou LLDB pour le déboguer. Vous pouvez suivre le guide [Débogage dans VS Code] pour apprendre à utiliser l'extension LLDB VS Code pour déboguer le processus principal des applications Tauri.
[Débogage dans VS Code]: /develop/debug/vscode/
[`WebviewWindow::open_devtools`]: https://docs.rs/tauri/2.0.0-rc/tauri/webview/struct.WebviewWindow.html#method.open_devtools
[`WebviewWindow::close_devtools`]: https://docs.rs/tauri/2.0.0-rc/tauri/webview/struct.WebviewWindow.html#method.close_devtools
[`WebviewWindow::open_devtools`]: https://docs.rs/tauri/2.0.0/tauri/webview/struct.WebviewWindow.html#method.open_devtools
[`WebviewWindow::close_devtools`]: https://docs.rs/tauri/2.0.0/tauri/webview/struct.WebviewWindow.html#method.close_devtools

View File

@@ -12,7 +12,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components';
import CommandTabs from '@components/CommandTabs.astro';
import Stub from '@components/Stub.astro';
<PluginLinks plugin={frontmatter.plugin} version="2.0.0-rc.0" />
<PluginLinks plugin={frontmatter.plugin} version="2.0.0" />
Envoie une notification native à votre utilisateur via le plugin de notification.

View File

@@ -20,7 +20,7 @@ Tauri v2 contient la commande `migrate` qui simplifie votre migration:
yarn tauri migrate"
pnpm="pnpm update @tauri-apps/cli@next
pnpm tauri migrate"
cargo='cargo install tauri-cli --version "^2.0.0-rc" --locked
cargo='cargo install tauri-cli --version "^2.0.0" --locked
cargo tauri migrate'
/>
@@ -653,7 +653,7 @@ tauri::Builder::default()
})
```
`tauri::Builder::menu` prend maintenant une "closure" car le menu a besoin d'une instance de "Manager" pour être construit. Voir [la documentation](https://docs.rs/tauri/2.0.0-rc/tauri/struct.Builder.html#method.menu) pour plus d'information.
`tauri::Builder::menu` prend maintenant une "closure" car le menu a besoin d'une instance de "Manager" pour être construit. Voir [la documentation](https://docs.rs/tauri/2.0.0/tauri/struct.Builder.html#method.menu) pour plus d'information.
#### Evenement du Menu
@@ -941,7 +941,7 @@ Utilisez `tauri::tray::TrayIconBuilder` à la place de `tauri::SystemTray`:
let tray = tauri::tray::TrayIconBuilder::with_id("my-tray").build(app)?;
```
Voir [TrayIconBuilder](https://docs.rs/tauri/2.0.0-rc/tauri/tray/struct.TrayIconBuilder.html) pour plus d'informations.
Voir [TrayIconBuilder](https://docs.rs/tauri/2.0.0/tauri/tray/struct.TrayIconBuilder.html) pour plus d'informations.
#### Migrer vers un Menu

View File

@@ -49,7 +49,7 @@ Install the deep-link plugin to get started.
1. Run the following command in the `src-tauri` folder to add the plugin to the project's dependencies in `Cargo.toml`:
```sh frame=none
cargo add tauri-plugin-deep-link@2.0.0-rc
cargo add tauri-plugin-deep-link@2.0.0
```
2. Modify `lib.rs` to initialize the plugin:
@@ -155,7 +155,7 @@ The deep link plugin has integration with the [single instance] plugin if you pr
```toml title="src-tauri/Cargo.toml"
[target."cfg(any(target_os = \"macos\", windows, target_os = \"linux\"))".dependencies]
tauri-plugin-single-instance = { version = "2.0.0-rc", features = ["deep-link"] }
tauri-plugin-single-instance = { version = "2.0.0", features = ["deep-link"] }
```
- Then configure the single instance plugin which should always be the first plugin you register:
@@ -410,6 +410,6 @@ See the [Capabilities Overview](/security/capabilities/) for more information an
[verify Android applinks]: https://developer.android.com/training/app-links/verify-android-applinks#web-assoc
[universal links]: https://developer.apple.com/documentation/xcode/allowing-apps-and-websites-to-link-to-your-content?language=objc
[single instance]: /plugin/single-instance/
[`register_all`]: https://docs.rs/tauri-plugin-deep-link/2.0.0-rc/tauri_plugin_deep_link/struct.DeepLink.html#method.register_all
[`register_all`]: https://docs.rs/tauri-plugin-deep-link/2.0.0/tauri_plugin_deep_link/struct.DeepLink.html#method.register_all
[ngrok]: https://ngrok.com/
[`Env::args_os`]: https://docs.rs/tauri/2.0.0-rc/tauri/struct.Env.html#structfield.args_os
[`Env::args_os`]: https://docs.rs/tauri/2.0.0/tauri/struct.Env.html#structfield.args_os

View File

@@ -589,7 +589,7 @@ The watch functions require the `watch` feature flag:
```toml title="src-tauri/Cargo.toml"
[dependencies]
tauri-plugin-fs = { version = "2.0.0-rc", features = ["watch"] }
tauri-plugin-fs = { version = "2.0.0", features = ["watch"] }
```
:::

View File

@@ -88,7 +88,7 @@ Additional setup is required to get tray-relative positions to work.
1. Add `tray-icon` feature to your `Cargo.toml` file:
```toml title="src-tauri/Cargo.toml" ins={2}
[dependencies]
tauri-plugin-positioner = { version = "2.0.0-rc", features = ["tray-icon"] }
tauri-plugin-positioner = { version = "2.0.0", features = ["tray-icon"] }
```
2. Setup `on_tray_event` for positioner plugin:

View File

@@ -92,7 +92,7 @@ await relaunch();
</TabItem>
<TabItem label="Rust">
Note that `app` is an instance of [`AppHandle`](https://docs.rs/tauri/2.0.0-rc/tauri/struct.AppHandle.html).
Note that `app` is an instance of [`AppHandle`](https://docs.rs/tauri/2.0.0/tauri/struct.AppHandle.html).
```rust
// exits the app with the given status code

View File

@@ -77,7 +77,7 @@ The closure has three arguments:
<Steps>
1. **`app`:** The [AppHandle](https://docs.rs/tauri/2.0.0-rc/tauri/struct.AppHandle.html) of the application.
1. **`app`:** The [AppHandle](https://docs.rs/tauri/2.0.0/tauri/struct.AppHandle.html) of the application.
2. **`args`:** The list of arguments, that was passed by the user to initiate this new instance.
3. **`cwd`:** The Current Working Directory denotes the directory from which the new application instance was launched.

View File

@@ -106,7 +106,7 @@ All the plugin's APIs are available through the JavaScript guest bindings:
<Tabs>
<TabItem label="SQLite">
The path is relative to [`tauri::api::path::BaseDirectory::AppConfig`](https://docs.rs/tauri/2.0.0-rc/tauri/path/enum.BaseDirectory.html#variant.AppConfig).
The path is relative to [`tauri::api::path::BaseDirectory::AppConfig`](https://docs.rs/tauri/2.0.0/tauri/path/enum.BaseDirectory.html#variant.AppConfig).
```javascript
import Database from '@tauri-apps/plugin-sql';

View File

@@ -15,7 +15,7 @@ This can enhance the user experience by providing quick access to common actions
First of all, update your `Cargo.toml` to include the necessary feature for the system tray.
```toml title="src-tauri/Cargo.toml"
tauri = { version = "2.0.0-rc", features = [ "tray-icon" ] }
tauri = { version = "2.0.0", features = [ "tray-icon" ] }
```
## Usage
@@ -287,9 +287,9 @@ See [`TrayIconEvent`][rust TrayIconEvent] for more information on the event type
[`TrayIcon.new`]: /reference/javascript/api/namespacetray/#new
[`TrayIconOptions`]: /reference/javascript/api/namespacetray/#trayiconoptions
[`TrayIconBuilder`]: https://docs.rs/tauri/2.0.0-rc/tauri/tray/struct.TrayIconBuilder.html
[TrayIconBuilder::menu_on_left_click]: https://docs.rs/tauri/2.0.0-rc/tauri/tray/struct.TrayIconBuilder.html#method.menu_on_left_click
[`TrayIconBuilder`]: https://docs.rs/tauri/2.0.0/tauri/tray/struct.TrayIconBuilder.html
[TrayIconBuilder::menu_on_left_click]: https://docs.rs/tauri/2.0.0/tauri/tray/struct.TrayIconBuilder.html#method.menu_on_left_click
[`menuOnLeftClick`]: http://localhost:4321/reference/javascript/api/namespacetray/#properties-1
[`TrayIconBuilder::on_menu_event`]: https://docs.rs/tauri/2.0.0-rc/tauri/tray/struct.TrayIconBuilder.html#method.on_menu_event
[`TrayIconBuilder::on_menu_event`]: https://docs.rs/tauri/2.0.0/tauri/tray/struct.TrayIconBuilder.html#method.on_menu_event
[js TrayIconEvent]: /reference/javascript/api/namespacetray/#trayiconevent
[rust TrayIconEvent]: https://docs.rs/tauri/2.0.0-rc/tauri/tray/enum.TrayIconEvent.html
[rust TrayIconEvent]: https://docs.rs/tauri/2.0.0/tauri/tray/enum.TrayIconEvent.html

View File

@@ -17,7 +17,7 @@ There are three ways to change the window configuration:
- <Icon name="external" class="inline-icon" /> [Through the JavaScript
API](/reference/javascript/api/namespacewindow/#window)
- <Icon name="external" class="inline-icon" /> [Through the Window in
Rust](https://docs.rs/tauri/2.0.0-rc/tauri/window/struct.Window.html)
Rust](https://docs.rs/tauri/2.0.0/tauri/window/struct.Window.html)
## Usage

View File

@@ -18,7 +18,7 @@ You can add the Tauri CLI to your current project using your package manager of
npm="npm install --save-dev @tauri-apps/cli@next"
yarn="yarn add -D @tauri-apps/cli@next"
pnpm="pnpm add -D @tauri-apps/cli@next"
cargo='cargo install tauri-cli --version "^2.0.0-rc" --locked'
cargo='cargo install tauri-cli --version "^2.0.0" --locked'
/>
:::tip[Developing a Plugin]

View File

@@ -89,7 +89,7 @@ The following example assumes you are creating a new project. If you've already
npm="npm install -D @tauri-apps/cli@next"
yarn="yarn add -D @tauri-apps/cli@next"
pnpm="pnpm add -D @tauri-apps/cli@next"
cargo='cargo install tauri-cli --version "^2.0.0-rc" --locked'
cargo='cargo install tauri-cli --version "^2.0.0" --locked'
/>
3. Determine the URL of your frontend development server. This is the URL that Tauri will use to load your content. For example, if you are using Vite, the default URL is `http://localhost:5173`.

View File

@@ -59,7 +59,7 @@ The Tauri v2 CLI includes a `migrate` command that automates most of the process
yarn tauri migrate"
pnpm="pnpm update @tauri-apps/cli@next
pnpm tauri migrate"
cargo='cargo install tauri-cli --version "^2.0.0-rc" --locked
cargo='cargo install tauri-cli --version "^2.0.0" --locked
cargo tauri migrate'
/>
@@ -188,7 +188,7 @@ The event system was redesigned to be easier to use. Instead of relying on the s
- The `emit` function now emits the event to all event listeners
- Added a new `emit_to` function to trigger an event to a specific target
- `emit_filter` now filters based on [`EventTarget`](https://docs.rs/tauri/2.0.0-rc/tauri/event/enum.EventTarget.html) instead of a window.
- `emit_filter` now filters based on [`EventTarget`](https://docs.rs/tauri/2.0.0/tauri/event/enum.EventTarget.html) instead of a window.
- Renamed `listen_global` to `listen_any`. It now listens to all events regardless of their filters and targets.
### Multiwebview support
@@ -720,7 +720,7 @@ tauri::Builder::default()
})
```
`tauri::Builder::menu` now takes a closure because the menu needs a Manager instance to be built. See [the documentation](https://docs.rs/tauri/2.0.0-rc/tauri/struct.Builder.html#method.menu) for more information.
`tauri::Builder::menu` now takes a closure because the menu needs a Manager instance to be built. See [the documentation](https://docs.rs/tauri/2.0.0/tauri/struct.Builder.html#method.menu) for more information.
#### Menu Events
@@ -1008,7 +1008,7 @@ Use `tauri::tray::TrayIconBuilder` instead of `tauri::SystemTray`:
let tray = tauri::tray::TrayIconBuilder::with_id("my-tray").build(app)?;
```
See [TrayIconBuilder](https://docs.rs/tauri/2.0.0-rc/tauri/tray/struct.TrayIconBuilder.html) for more information.
See [TrayIconBuilder](https://docs.rs/tauri/2.0.0/tauri/tray/struct.TrayIconBuilder.html) for more information.
#### Migrate to Menu

View File

@@ -21,7 +21,7 @@ The Tauri v2 CLI includes a `migrate` command that automates most of the process
yarn tauri migrate"
pnpm="pnpm update @tauri-apps/cli@next
pnpm tauri migrate"
cargo='cargo install tauri-cli --version "^2.0.0-rc" --locked
cargo='cargo install tauri-cli --version "^2.0.0" --locked
cargo tauri migrate'
/>
@@ -120,7 +120,7 @@ export default defineConfig({
});
```
- 2.0.0-rc:
- 2.0.0:
```js
import { defineConfig } from 'vite';

View File

@@ -109,5 +109,5 @@ tauri = { version = "...", features = ["...", "devtools"] }
核心进程由 Rust 支持,因此您可以使用 GDB 或 LLDB 进行调试。您可以按照[在 VS Code 中调试]指南学习如何使用 LLDB VS 代码扩展来调试 Tauri 应用程序的核心进程。
[在 VS Code 中调试]: /develop/debug/vscode
[`WebviewWindow::open_devtools`]: https://docs.rs/tauri/2.0.0-rc/tauri/webview/struct.WebviewWindow.html#method.open_devtools
[`WebviewWindow::close_devtools`]: https://docs.rs/tauri/2.0.0-rc/tauri/webview/struct.WebviewWindow.html#method.close_devtools
[`WebviewWindow::open_devtools`]: https://docs.rs/tauri/2.0.0/tauri/webview/struct.WebviewWindow.html#method.open_devtools
[`WebviewWindow::close_devtools`]: https://docs.rs/tauri/2.0.0/tauri/webview/struct.WebviewWindow.html#method.close_devtools

View File

@@ -178,7 +178,7 @@ class ExamplePlugin: Plugin {
</TabItem>
</Tabs>
使用 [`tauri::plugin::PluginHandle`](https://docs.rs/tauri/2.0.0-rc/tauri/plugin/struct.PluginHandle.html) 以在 Rust 中创建一个移动端命令:
使用 [`tauri::plugin::PluginHandle`](https://docs.rs/tauri/2.0.0/tauri/plugin/struct.PluginHandle.html) 以在 Rust 中创建一个移动端命令:
```rust
use std::path::PathBuf;

View File

@@ -196,7 +196,7 @@ Builder::new("<plugin-name>")
- **当**:触发事件循环事件
- **为了**:管理核心事件,例如窗口事件、菜单事件和应用退出请求
在这个生命周期钩子中,你会被任何[事件循环事件](https://docs.rs/tauri/2.0.0-rc/tauri/enum.RunEvent.html)通知。
在这个生命周期钩子中,你会被任何[事件循环事件](https://docs.rs/tauri/2.0.0/tauri/enum.RunEvent.html)通知。
```rust title="src/lib.rs"
use std::{collections::HashMap, fs::write, sync::Mutex};

View File

@@ -155,7 +155,7 @@ package() {
}
```
[`async_runtime::spawn`]: https://docs.rs/tauri/2.0.0-rc/tauri/async_runtime/fn.spawn.html
[`async_runtime::spawn`]: https://docs.rs/tauri/2.0.0/tauri/async_runtime/fn.spawn.html
[`serde::serialize`]: https://docs.serde.rs/serde/trait.Serialize.html
[`serde::deserialize`]: https://docs.serde.rs/serde/trait.Deserialize.html
[`thiserror`]: https://github.com/dtolnay/thiserror

View File

@@ -45,7 +45,7 @@ Tauri 使您的应用程序能够通过 [clap](https://github.com/clap-rs/clap)
```toml title="src-tauri/Cargo.toml"
# 如果你的目标不是移动设备,你可以在 `[dependencies]` 部分添加依赖
[target."cfg(not(any(target_os = \"android\", target_os = \"ios\")))".dependencies]
tauri-plugin-cli = "2.0.0-rc"
tauri-plugin-cli = "2.0.0"
# 或者使用 Git
tauri-plugin-cli = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```

View File

@@ -383,7 +383,7 @@ invoke('my_custom_command', {
.catch((e) => console.error(e));
```
[`async_runtime::spawn`]: https://docs.rs/tauri/2.0.0-rc/tauri/async_runtime/fn.spawn.html
[`async_runtime::spawn`]: https://docs.rs/tauri/2.0.0/tauri/async_runtime/fn.spawn.html
[`serde::serialize`]: https://docs.serde.rs/serde/trait.Serialize.html
[`serde::deserialize`]: https://docs.serde.rs/serde/trait.Deserialize.html
[`thiserror`]: https://github.com/dtolnay/thiserror

View File

@@ -44,7 +44,7 @@ import CommandTabs from '@components/CommandTabs.astro';
```toml title="src-tauri/Cargo.toml"
[dependencies]
tauri-plugin-fs = "2.0.0-rc"
tauri-plugin-fs = "2.0.0"
# 或者使用 Git
tauri-plugin-fs = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```

View File

@@ -45,7 +45,7 @@ import CommandTabs from '@components/CommandTabs.astro';
```toml title="src-tauri/Cargo.toml"
# 如果你的目标不是移动设备,你可以在 `[dependencies]` 部分添加依赖
[target."cfg(not(any(target_os = \"android\", target_os = \"ios\")))".dependencies]
tauri-plugin-global-shortcut = "2.0.0-rc"
tauri-plugin-global-shortcut = "2.0.0"
# 或者使用 Git
tauri-plugin-global-shortcut = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```

View File

@@ -29,7 +29,7 @@ import CommandTabs from '@components/CommandTabs.astro';
```toml title="src-tauri/Cargo.toml"
[dependencies]
tauri-plugin-localhost = "2.0.0-rc"
tauri-plugin-localhost = "2.0.0"
# 或者使用 Git
tauri-plugin-localhost = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```

View File

@@ -44,7 +44,7 @@ import CommandTabs from '@components/CommandTabs.astro';
```toml title="src-tauri/Cargo.toml"
[dependencies]
tauri-plugin-log = "2.0.0-rc"
tauri-plugin-log = "2.0.0"
# 或者使用 Git
tauri-plugin-log = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```

View File

@@ -31,7 +31,7 @@ import CommandTabs from '@components/CommandTabs.astro';
```toml title="src-tauri/Cargo.toml"
[dependencies]
tauri-plugin-persisted-scope = "2.0.0-rc"
tauri-plugin-persisted-scope = "2.0.0"
# 或者使用 Git
tauri-plugin-persisted-scope = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```

View File

@@ -50,7 +50,7 @@ import CommandTabs from '@components/CommandTabs.astro';
```toml title="src-tauri/Cargo.toml"
[dependencies]
tauri-plugin-positioner = "2.0.0-rc"
tauri-plugin-positioner = "2.0.0"
# 或者使用 Git
tauri-plugin-positioner = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```
@@ -84,7 +84,7 @@ import CommandTabs from '@components/CommandTabs.astro';
1. 在你的 `Cargo.toml` 文件中添加 `tray-icon` 功能。
```toml title="src-tauri/Cargo.toml" ins={2}
[dependencies]
tauri-plugin-positioner = { version = "2.0.0-rc", features = ["tray-icon"] }
tauri-plugin-positioner = { version = "2.0.0", features = ["tray-icon"] }
```
2. 为定位器插件设置 `on_tray_event`。

View File

@@ -84,7 +84,7 @@ await relaunch();
</TabItem>
<TabItem label="Rust">
请注意,`app` 是 [`AppHandle`](https://docs.rs/tauri/2.0.0-rc/tauri/struct.AppHandle.html) 的一个实例。
请注意,`app` 是 [`AppHandle`](https://docs.rs/tauri/2.0.0/tauri/struct.AppHandle.html) 的一个实例。
```rust
// exits the app with the given status code

View File

@@ -42,7 +42,7 @@ import CommandTabs from '@components/CommandTabs.astro';
```toml title="src-tauri/Cargo.toml"
[dependencies]
tauri-plugin-shell = "2.0.0-rc"
tauri-plugin-shell = "2.0.0"
# 或者使用 Git
tauri-plugin-shell = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```

View File

@@ -43,7 +43,7 @@ import CommandTabs from '@components/CommandTabs.astro';
<TabItem label="crates.io">
```toml title="src-tauri/Cargo.toml" ins={2}
[dependencies]
tauri-plugin-single-instance = "2.0.0-rc"
tauri-plugin-single-instance = "2.0.0"
```
</TabItem>
<TabItem label="Git">

View File

@@ -28,7 +28,7 @@ import CommandTabs from '@components/CommandTabs.astro';
```toml title="src-tauri/Cargo.toml"
[dependencies.tauri-plugin-sql]
features = ["sqlite"] # or "postgres", or "mysql"
version = "2.0.0-rc"
version = "2.0.0"
```
</TabItem>
<TabItem label="Git">

View File

@@ -40,7 +40,7 @@ import CommandTabs from '@components/CommandTabs.astro';
```toml title="src-tauri/Cargo.toml"
[dependencies]
tauri-plugin-store = "2.0.0-rc"
tauri-plugin-store = "2.0.0"
# 或者使用 GIT
tauri-plugin-store = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```

View File

@@ -44,7 +44,7 @@ import CommandTabs from '@components/CommandTabs.astro';
```toml title="src-tauri/Cargo.toml"
[dependencies]
tauri-plugin-stronghold = "2.0.0-rc"
tauri-plugin-stronghold = "2.0.0"
# 或者使用 Git
tauri-plugin-stronghold = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```

View File

@@ -44,7 +44,7 @@ import CommandTabs from '@components/CommandTabs.astro';
```toml title="src-tauri/Cargo.toml"
[dependencies]
tauri-plugin-websocket = "2.0.0-rc"
tauri-plugin-websocket = "2.0.0"
# 或者使用 Git
tauri-plugin-websocket = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```

View File

@@ -17,7 +17,7 @@ Tauri 提供了许多自定义应用程序窗口外观的选项。您可以创
- <Icon name="external" class="inline-icon" /> [通过 JavaScript
API](/reference/javascript/api/namespacewindow/#window)
- <Icon name="external" class="inline-icon" /> [通过 Rust 的
Window](https://docs.rs/tauri/2.0.0-rc/tauri/window/struct.Window.html)
Window](https://docs.rs/tauri/2.0.0/tauri/window/struct.Window.html)
## 用法

View File

@@ -44,7 +44,7 @@ import CommandTabs from '@components/CommandTabs.astro';
```toml title="src-tauri/Cargo.toml"
[dependencies]
tauri-plugin-window-state = "2.0.0-rc"
tauri-plugin-window-state = "2.0.0"
# 或者使用 Git
tauri-plugin-window-state = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```

View File

@@ -90,7 +90,7 @@ import CommandTabs from '@components/CommandTabs.astro';
npm="npm install -D @tauri-apps/cli@next"
yarn="yarn add -D @tauri-apps/cli@next"
pnpm="pnpm add -D @tauri-apps/cli@next"
cargo='cargo install tauri-cli --version "^2.0.0-rc" --locked'
cargo='cargo install tauri-cli --version "^2.0.0" --locked'
/>
3. 确定您的前端开发服务器的 URL。这个 URL 是 Tauri 用来加载您的内容的地址。例如,如果您正在使用 Vite那么默认的 URL 是 http://localhost:5173 。

View File

@@ -60,7 +60,7 @@ Tauri v2 的命令行工具包括一个 `migrate` 命令,可自动执行大部
yarn tauri migrate"
pnpm="pnpm update @tauri-apps/cli@next
pnpm tauri migrate"
cargo='cargo install tauri-cli --version "^2.0.0-rc" --locked
cargo='cargo install tauri-cli --version "^2.0.0" --locked
cargo tauri migrate'
/>
@@ -184,7 +184,7 @@ Tauri 命令行工具读取和写入的大部分环境变量都重新命名,
- `emit` 函数现在会向所有事件侦听器发送事件。
- 添加一个新的 `emit_to` 函数以向特定目标触发事件。
- `emit_filter` 现在基于 [`EventTarget`](https://docs.rs/tauri/2.0.0-rc/tauri/event/enum.EventTarget.html) 进行过滤,而不是基于一个视窗。
- `emit_filter` 现在基于 [`EventTarget`](https://docs.rs/tauri/2.0.0/tauri/event/enum.EventTarget.html) 进行过滤,而不是基于一个视窗。
- 将 `listen_global` 重命名为 `listen_any`。现在,它可以监听所有事件,无论其过滤器和目标是什么。
### 多 webview 支持
@@ -719,7 +719,7 @@ tauri::Builder::default()
})
```
`tauri::Builder::menu` 现在接收一个闭包,因为菜单需要一个 `Manager` 实例来构造。参考[相关文档](https://docs.rs/tauri/2.0.0-rc/tauri/struct.Builder.html#method.menu)以获取更多信息。
`tauri::Builder::menu` 现在接收一个闭包,因为菜单需要一个 `Manager` 实例来构造。参考[相关文档](https://docs.rs/tauri/2.0.0/tauri/struct.Builder.html#method.menu)以获取更多信息。
#### 菜单事件
@@ -1010,7 +1010,7 @@ Rust 的 `SystemTray` API 被重命名为 `TrayIcon` 以确保一致性。新的
let tray = tauri::tray::TrayIconBuilder::with_id("my-tray").build(app)?;
```
查阅 [`TrayIconBuilder`](https://docs.rs/tauri/2.0.0-rc/tauri/tray/struct.TrayIconBuilder.html) 以获取更多信息。
查阅 [`TrayIconBuilder`](https://docs.rs/tauri/2.0.0/tauri/tray/struct.TrayIconBuilder.html) 以获取更多信息。
#### 迁移到托盘菜单

View File

@@ -21,7 +21,7 @@ Tauri v2 CLI 包含一个 `migrate` 命令,它自动化了大部分过程,
yarn tauri migrate"
pnpm="pnpm update @tauri-apps/cli@next
pnpm tauri migrate"
cargo='cargo install tauri-cli --version "^2.0.0-rc" --locked
cargo='cargo install tauri-cli --version "^2.0.0" --locked
cargo tauri migrate'
/>
@@ -118,7 +118,7 @@ export default defineConfig({
});
```
- 2.0.0-rc
- 2.0.0
```js
import { defineConfig } from 'vite';