RustɂĊ{炵wł{AځB2́ARustɂϐAf[^^AzɂāB
̋L͉łBo^ijƑSĂ܂B
@RustɂĊ{炵wł{AځBAڑ2́AC/C++̌o҂ӎȂA{Iȕ@iϐAf[^^AzȂǁjɂāARustł͂ǂƂϓ_ŏЉ܂B
@{Aڂł̓TvR[hЉāAKvɉăRpCƎs܂ōsĂ܂BTvR[hGitHubŌJĂA玩RɃ_E[hĎg悤ɂ܂BlăTvR[h̓pbP[W̌`ł܂Ƃ߂Ă܂BKvȐĺApbP[W܂Ƃ߂zipt@C_E[hāA茳PC̓KȃtH_iŐLŏЉatmarkit_rustȂǁjɓWJAɃTvR[hQƁ^sł܂i̓Iȕ@Aڑ1̋LQƂĂjB
@ڂ̓vWFNgǗ̉Ŏグ܂ApbP[Wɂ́uN[gvƌĂoCi邢̓Cu܂ނƂł悤ɂȂĂ܂B̂AoCĩN[g͕܂߂邱Ƃł̂ŁApbP[W̊eTv͂ꂼقȂN[gƂĂ܂B
@1ŏЉtH_\Ƃ͎قȂ܂̂ŁAӂĂBpbP[Wɕ̃N[g܂߂ꍇA\[Xt@C̒uꏊsrc/binɂȂAsrc/main.rs͎gȂȂ܂BႦAsample1sample2Ƃ2̃N[gpӂꍇAsrc/bin/sample1.rssrc/bin/sample2.rsƂ悤Ƀ\[Xt@Czu܂B
@āAsƂɂ́Aȉ̂悤ɃN[g--binIvVŖ܂Bw肵ȂꍇAuftHg̃N[gw肳ĂȂvƂG[ɂȂ܂B
% cargo run --bin sample1
@oCitarget/debugɒû͕ς܂BꏊɁAsample1Asample2u܂iWindows̏ꍇsample1.exe, sample2.exejB܂Ƃ߂ƁAȉ̂悤ȍ\ɂȂ܂B
package_name\{\src\bin\{\sample1.rs b {\sample2.rs {\target\debug\{\sample1(.exe) @ {\sample2(.exe)
@\[Xt@C{EҏWAoCiڎsƂ̎QlɂĂB
@RustɂRg2ނ܂BЂƂCłȂ݂́u/*`*/v̌`AЂƂC++/JavaȂǂŎg2AXbVi//j`łB
@O҂́A/**/͈̔͂RgɂȂ܂Bsɂ܂ĂĂAs̓rn߂čs̓rŏIĂ\܂B̑OŎdlA\[XR[h̐擪ō҂tAo[WL肷̂ɗp܂B
/* ҁFWINGSvWFNg tF2021/9/1 o[WF1.00 */
@҂́A//n܂āAs܂ŃRgɂȂ܂Bs̓rn߂Ă\܂BɑȂǂɗp܂B
// ̊Jn println!("Hello, world!"); // "Hello, world!"ƕ\
@Rgɂ́Â悤ȃIȗprƁAhLe[VRgƂHTMLhLg̗̐pr܂BhLe[VRg͖{Aڂł͎グ܂B
@Ă͕ϐ܂Bϐ͐\ƂƂɁAvO~OɌȂvfłB
@Rust͐ÓIɌ^tvO~OȂ̂ŁAϐOɐ錾Kv܂Bϐ́Aȉ̂悤ɁuletvŐ錾܂Bϐ̐錾́A̓AOAubN̓ȂǁA{Iɂǂłł悤ɂȂĂ܂B
let x = 100;
@ŁAϐx錾AlƂ100ƂӖɂȂ܂BȂARustł́ul100xɍSvƕ\܂B
@ϐ̃f[^^̂܂A肠܂BRustɂ́u^_vƂdg݂A^ȗꂽꍇɐ悤ɂȂĂ܂B̗ł́Al100𐮐ƌȂāAx͐^łƐĂ܂i^ɂނ܂Bڂ͌q܂jB
Copyright © ITmedia, Inc. All Rights Reserved.