- PVSM.RU - https://www.pvsm.ru -

Новости Rust #1 (Сентябрь 2018)

кдпв

Мой комментарий [1] к новости про Rust 1.28 с обзором ржавых событий за месяц неплохо зашел, так что вот держите очень субъективный срез ржавых новостей за прошлый месяц.

В этой подборке: Rust 1.29, записи докладов с Rustconf 2018, gfx-rs, Rust2018, порт Flatbuffers, новые версии ripgrep и Alacritty.

Rust 1.29

Вышел Rust 1.29. Основные нововведения — доступные сразу из rustupcargo fix [2] и cargo clippy [3] (подробнее в хабропереводе [4]).

Следом была выпущена версия 1.29.1 [5], закрывшая ошибку в std::repeat [6] (обсуждение [7]).

Rust 1.30 и 1.31 будут очень значительными.

Точного списка пока нет, но ожидается что [8]:

  • в 1.30 (2018.10.26) войдет частичная стабилизация процедурных макросов;
  • в 1.31 (2018.12.07) войдут Rust 2018 [9] + non-lexical lifetimes (NLL) [10].

Видео с Rustconf 2018

rustconf 2018 logo

Стали доступны видео с RustConf 2018 [11] (программа докладов [12]). Список видео в порядке очень примерной субъективной интересности:

Бонус: прилетело несколько записей с Rust Cologne [38]:

WebAssembly

WebRender, gfx-rs и gfx-portability

Тут много движухи было последнее время:

Ржавый игрострой

Что бы вы убрали из Rust?

Занятная тема в /r/rust [89], где из комментариев можно узнать порядочно всяких шероховатостей языка.

Ржавый порт FlatBuffers

Завезли официальный порт гуглового FlatBuffers на Rust [90] (обсуждение [91]). Толстый слой тестов, фаззинг, производительность и все остальное присутствуют.

Don't fear 1.0!

Интересное обсуждение в /r/rust [92] почему экосистема медленно перебирается на > 1.0 пакеты.

TLDR:

  • Чтобы автор стабилизриовал пакет, ему надо убедиться что АПИ адекватный — для этого ему надо увидеть, как люди им пользуются. Много людей не пользуются пакетами < 1.0, ожидая их стабилизации — от этого стабилизация замедляется;
  • Для пользователей: хотите больше стабильных пакетов — пользуйтесь нестабильными и давайте обратную связь автору;
  • Для авторов: не парьтесь так сильно насчет выпуска 1.0.

ripgrep 0.10

ripgrep (rg) [93] это более быстрая и удобная альтернатива классическому grep (т.е. ржавый аналог The Silver Searcher [94] и ack).

Вышла версия 0.10 (обсуждение [95], очень занятное) — теперь работает еще быстрее, поддерживает PRCE2 и многострочные запросы.

Также, пакет ripgrep пробрался в репозиторий ubuntu 18.10 [96].

Alacritty 0.2

Alacritty [97] это эмулятор терминала с GPU ускорением, который пытается быть очень-очень быстрым на любом 4К экране.

Снимок Alacritty

Вышла версия 0.2 [98] (обсуждение [99]) с поддержкой прокрутки. От ее добавления долго отказывались, говоря "используйте tmux", но в итоге получилось родить не сильно бьющую по производительности реализацию.

Кстати, как и ripgrep, Alacritty пролезает в линуксовые дистрибутивы: завезли в Арч [100];

Новые RFC

По RFC довольно удобно наблюдать, в какую сторону движется язык. В заголовке каждого PRа есть ссылка "Rendered", по которой RFC доступен в удобочитаемой форме.

  • RFC 2438 "Deny the overflowing_literals lint for the 2018 edition" [101]overflowing_literals в Rust 2018 станет жесткой ошибкой, а не просто предупреждением;
  • RFC 2383 "Lint Reasons" [102] — добавит аргумент "reason" для документирования зачем мы хотим отключить какую-то проверку и новый атрибут "expected", который будет требовать срабатывания проверки;
  • RFC 2437 "Rustfmt stability" [103] — аккуратные попытки очертить границы обратной совместимости автоформатирования кода;
  • RFC 2535 "Or patterns, i.e Foo(Bar(x) | Baz(x))" [104] — сахар для ИЛИ в сопоставлениях;
  • RFC 2545 "Elide array size" [105] — возможность не указывать явно размер массивов в однозначных контекстах, например: static BLORP_NUMBERS: [u32; _] = [0, 8, 15];
  • RFC 2361 "Simpler alternative dbg!() macro" [106] — еще одна попытка добавить dbg! макрос;
  • RFC 2412 "The optimize attribute" [107] — предлагает ввести настраиваемый #[optimize] атрибут для регулировки оптимизаций на уровне item'ов;
  • RFC 2544 "Make the turbofish syntax redundant" [108] — очередная попытка убить "турборыбу" (::<>, как в foo::<Bar>());

RFC 2418 "Add futures and task system to libcore" [109] опять отложен, не судьба ему стать частью нововведений Rust2018.

Идет обсуждение семантики импортов в Rust 2018 [110].

Одной строкой


Это все, спасибо за внимание!

Если я не добавил какую-то важную ссылку или событие, смело закидывайте в комментарии. :)

КДПВ взята из статьи Looking to what to learn in 2018? Learn Rust! [144], остальные картинки из сайтов соответвующих проектов.

Автор: ozkriff

Источник [145]


Сайт-источник PVSM.RU: https://www.pvsm.ru

Путь до страницы источника: https://www.pvsm.ru/programmirovanie/294479

Ссылки в тексте:

[1] комментарий: https://habr.com/post/419259/#comment_18961069

[2] cargo fix: https://github.com/rust-lang-nursery/rustfix

[3] cargo clippy: https://github.com/rust-lang-nursery/rust-clippy

[4] хабропереводе: https://habr.com/post/423249

[5] 1.29.1: https://blog.rust-lang.org/2018/09/25/Rust-1.29.1.html

[6] ошибку в std::repeat: https://blog.rust-lang.org/2018/09/21/Security-advisory-for-std.html

[7] обсуждение: https://www.reddit.com/r/rust/comments/9iufot/announcing_rust_1291

[8] ожидается что: https://www.reddit.com/r/programming/comments/9fjnbm/announcing_rust_129/e5wxu43

[9] Rust 2018: https://rust-lang-nursery.github.io/edition-guide/rust-2018/index.html

[10] non-lexical lifetimes (NLL): http://rust-lang.github.io/rfcs/2094-nll.html

[11] видео с RustConf 2018: https://www.youtube.com/channel/UCaYhcUwRBNscFNUKTjgPFiA/videos

[12] программа докладов: http://rustconf.com/program.html

[13] Using Rust For Game Development: https://www.youtube.com/watch?v=aKLntZcp27M

[14] Kyren из Chucklefish: https://www.reddit.com/r/rust/comments/78bowa/hey_this_is_kyren_from_chucklefish_we_make_and

[15] ECS: https://en.wikipedia.org/wiki/Entity_component_system

[16] расширенная текстовая версия доклада: https://kyren.github.io/2018/09/14/rustconf-talk.html

[17] Integrating Rust into Tor: Successes and Challenges: https://www.youtube.com/watch?v=WI4ApeHH9QE&t=1570s

[18] Tor: https://www.torproject.org

[19] Using Raft in Rust: https://www.youtube.com/watch?v=ueA44Tz1NF8

[20] pingcap/raft-rs: https://github.com/pingcap/raft-rs

[21] Space, The Rusty Frontier: https://www.youtube.com/watch?v=y5Yd3FC-kh8

[22] How to (not) introduce Rust at your workplace: https://www.youtube.com/watch?v=0IMe7C5y3PU

[23] Embedding Rust in C/C++: https://www.youtube.com/watch?v=x9acx2zgx4Q

[24] Getting Something for Nothing: https://www.youtube.com/watch?v=t99L3JHhLc0

[25] Benchmarking and Optimization of Rust Libraries: https://www.youtube.com/watch?v=d2ZQ9-4ZJmQ&t=618s

[26] The Dark Secrets Lurking Inside cargo doc: https://www.youtube.com/watch?v=3wcXj67N6eE

[27] Project Mentat: a store for evolving data in Rust: https://www.youtube.com/watch?v=bqG5OfGXI_E

[28] mozilla/mentat: https://github.com/mozilla/mentat

[29] заморозили: https://mail.mozilla.org/pipermail/firefox-dev/2018-September/006780.html

[30] C2Rust: Migrating Legacy Code to Rust: https://www.youtube.com/watch?v=WEsR0Vv7jhg

[31] corrode: https://github.com/jameysharp/corrode

[32] citrus-rs: https://gitlab.com/citrus-rs/citrus

[33] The Opposite of Spaghetti Code: Building for Understanding: https://www.youtube.com/watch?v=2uBbjq-Trnk

[34] My Little Procedural Macro: https://www.youtube.com/watch?v=11Bme1xw0ag

[35] Writing Crates for Complete Beginners — A Tour of Turtle: https://www.youtube.com/watch?v=ZtER1Wllbeo

[36] turtle.rs: https://turtle.rs

[37] Rust and the Web Platform: A Rookie’s Guide: https://www.youtube.com/watch?v=EDoNNFWIRrw

[38] Rust Cologne: https://www.meetup.com/RustCologne

[39] hyperjson: https://www.youtube.com/watch?v=f1ln5j3aoSI

[40] mre/hyperjson: https://github.com/mre/hyperjson

[41] PyO3: https://github.com/PyO3/pyo3

[42] Share Secrets Safely: https://www.youtube.com/watch?v=Ddrx0FMR_10

[43] share-secrets-safely/cli: https://github.com/share-secrets-safely/cli

[44] [habr] Yew — Rust&WebAssembly-фреймворк для фронтенда: https://habr.com/company/jugru/blog/422253

[45] Запись доклада Дениса про Yew на HolyJS: https://www.youtube.com/watch?v=OqFOXMIwzTc

[46] The wasm-bindgen Guide: https://rustwasm.github.io/wasm-bindgen/introduction.html

[47] wasm-pack 0.5: https://rustwasm.github.io/2018/09/24/the-biggest-wasm-pack-release-yet.html

[48] что такое wasm-pack?: https://hacks.mozilla.org/2018/04/hello-wasm-pack/

[49] сайт: https://rustwasm.github.io/wasm-pack/

[50] подробности: https://github.com/rustwasm/wasm-pack/blob/master/CHANGELOG.md#%EF%B8%8F-050

[51] Вышел web-sys пакет: https://rustwasm.github.io/2018/09/26/announcing-web-sys.html

[52] обсуждение: https://www.reddit.com/r/rust/comments/9j39mw/announcing_the_websys_crate/

[53] stdweb: https://github.com/koute/stdweb

[54] greenwasm: https://github.com/Kimundi/greenwasm

[55] Wasabi: http://wasabi.software-lab.org/

[56] kvark: https://habr.com/users/kvark/

[57] DevZen #210: Растаманский WebGPU: https://devzen.ru/episode-0210

[58] Моя текстовая выжимка: https://forum.rustycrate.ru/t/devzen-210-rastamanskij-webgpu/553/4

[59] В ночнике Firefox по умолчанию включен ржавый WebRender для всех пользователей под виндой с Nvidia картами: https://www.reddit.com/r/rust/comments/9fhxz2/webrender_an_experimental_gpubased_renderer_for

[60] Gecko завели на WebRender через Vulkan: https://www.reddit.com/r/rust/comments/9bp8ug/experimental_gecko_using_webrender_running_on

[61] На iphone8 удалось запустить gfx-hal с Metal бэкендом: https://www.reddit.com/r/rust/comments/9bq7df/iphone8_screenshot_of_gfxhal_with_a_metal_backend

[62] RPCS3 and Dolphin on macOS using gfx-portability: https://gfx-rs.github.io/2018/09/03/rpcs3-dolphin.html

[63] обсуждение: https://www.reddit.com/r/rust/comments/9crxlr/rpcs3_and_dolphin_on_macos_using_gfxportability/

[64] эмулятор PlayStation3: https://github.com/RPCS3/rpcs3

[65] Benchmarking gfx-portability versus MoltenVK and OpenGL with Dota2 on Mac: https://gfx-rs.github.io/2018/08/10/dota2-macos-performance.html

[66] обсуждение: https://www.reddit.com/r/rust/comments/966us8/benchmarking_gfxportability_versus_moltenvk_and/

[67] ночные сборки: http://aeplay.co/citybound-livebuilds

[68] обсуждение: https://www.reddit.com/r/rust/comments/9i321m/the_first_live_build_of_citybound_with_rust_on

[69] отличный доклад на RustFest'е: https://www.youtube.com/watch?v=qr9GTTST_Dk

[70] физический движок nphysics: https://www.nphysics.org

[71] базовую поддержку деформируемых тел: https://www.patreon.com/posts/21392293

[72] Было много разговоров про будущее cgmath и nalgebra: https://users.rust-lang.org/t/cgmath-looking-for-new-maintainers/20406

[73] nalgebra-glm: https://www.patreon.com/posts/21589538

[74] обсуждение: https://www.reddit.com/r/rust/comments/9i9cn1/announcing_nalgebraglm_a_simple_api_like_glm_for

[75] nalgebra: https://www.nalgebra.org/

[76] разговорами о создании gamedev-wg: https://internals.rust-lang.org/t/a-working-group-for-rust-game-development/8240

[77] arewegameyet.rs: http://arewegameyet.rs

[78] Delaunator: https://github.com/mourner/delaunator-rs

[79] обсуждение: https://www.reddit.com/r/rust/comments/9gj0uk/introducing_delaunator_a_blazing_fast_static_2d/

[80] триангуляции Делоне: https://ru.wikipedia.org/wiki/%D0%A2%D1%80%D0%B8%D0%B0%D0%BD%D0%B3%D1%83%D0%BB%D1%8F%D1%86%D0%B8%D1%8F_%D0%94%D0%B5%D0%BB%D0%BE%D0%BD%D0%B5

[81] LD42 джема: https://ru.wikipedia.org/wiki/Ludum_Dare

[82] @Icefoxen: https://github.com/icefoxen

[83] "Running In To Space": https://ldjam.com/events/ludum-dare/42/running-in-to-space

[84] очень подробно поделился своим опытом: https://wiki.alopex.li/LD42Postmortem

[85] @Ratysz: https://github.com/Ratysz

[86] "It's Not Cool": https://www.reddit.com/r/rust/comments/977g2t/my_ludum_dare_42_jam_entry_is_pure_rust/

[87] тему на русскоязычном форуме: https://forum.rustycrate.ru/t/zemeroth-dvuhmernaya-poshagovaya-igra-na-dvizhke-ggez/532/1

[88] Земерот: https://github.com/ozkriff/zemeroth

[89] Занятная тема в /r/rust: https://www.reddit.com/r/rust/comments/9ha73q/what_would_you_remove_from_rust/

[90] Завезли официальный порт гуглового FlatBuffers на Rust: https://github.com/google/flatbuffers/pull/4898

[91] обсуждение: https://www.reddit.com/r/rust/comments/9be74i/flatbuffers_support_for_rust_is_approaching/

[92] Интересное обсуждение в /r/rust: https://www.reddit.com/r/rust/comments/9j6x9c/dont_fear_100/

[93] ripgrep (rg): https://github.com/BurntSushi/ripgrep

[94] The Silver Searcher: https://github.com/ggreer/the_silver_searcher

[95] обсуждение: https://www.reddit.com/r/rust/comments/9dxewq/ripgrep_0100_released_pcre2_and_multiline_support

[96] пакет ripgrep пробрался в репозиторий ubuntu 18.10: https://www.reddit.com/r/rust/comments/9fsbfg/ripgrep_will_ship_with_the_next_ubuntu_1810/

[97] Alacritty: https://github.com/jwilm/alacritty

[98] Вышла версия 0.2: https://jwilm.io/blog/alacritty-lands-scrollback

[99] обсуждение: https://www.reddit.com/r/rust/comments/9gl75a/alacritty_now_supports_scrollback

[100] завезли в Арч: https://www.archlinux.org/packages/community/x86_64/alacritty

[101] RFC 2438 "Deny the overflowing_literals lint for the 2018 edition": https://github.com/rust-lang/rfcs/pull/2438

[102] RFC 2383 "Lint Reasons": https://github.com/rust-lang/rfcs/pull/2383

[103] RFC 2437 "Rustfmt stability": https://github.com/rust-lang/rfcs/pull/2437

[104] RFC 2535 "Or patterns, i.e Foo(Bar(x) | Baz(x))": https://github.com/rust-lang/rfcs/pull/2535

[105] RFC 2545 "Elide array size": https://github.com/rust-lang/rfcs/pull/2545

[106] RFC 2361 "Simpler alternative dbg!() macro": https://github.com/rust-lang/rfcs/pull/2361

[107] RFC 2412 "The optimize attribute": https://github.com/rust-lang/rfcs/pull/2412

[108] RFC 2544 "Make the turbofish syntax redundant": https://github.com/rust-lang/rfcs/pull/2544

[109] RFC 2418 "Add futures and task system to libcore": https://github.com/rust-lang/rfcs/pull/2418

[110] Идет обсуждение семантики импортов в Rust 2018: https://users.rust-lang.org/t/module-system-changes-are-going-into-fcp/20171

[111] Bryan Cantrill: https://en.wikipedia.org/wiki/Bryan_Cantrill

[112] Falling in love with Rust: http://dtrace.org/blogs/bmc/2018/09/18/falling-in-love-with-rust/

[113] обсуждение: https://www.reddit.com/r/programming/comments/9gzppu/falling_in_love_with_rust/

[114] [habr] FB2D — 2D framework for Linux Frame Buffer (Rust): https://habr.com/post/421707/

[115] Продолжаются: https://internals.rust-lang.org/t/2019-strategy-for-rustc-and-the-rls/8361

[116] RLS: https://github.com/rust-lang-nursery/rls

[117] которые забурлили после заявлений о намерении выпустить RLS 1.0: https://www.reddit.com/r/rust/comments/99ltpr/more_on_the_rls_and_a_10_release/

[118] URLO тема от Kornel (автор crates.rs) про "фактор автобуса" в ржавой экосистеме и что с этим делать: https://users.rust-lang.org/t/bus-factor-1-for-crates/17046

[119] Rust on iOS — a how to with source code: https://github.com/mtak-/rust-on-mobile/blob/master/examples/ios/example01.md

[120] обсуждение: https://www.reddit.com/r/rust/comments/9ibhx9/rust_on_ios_a_how_to_with_source_code

[121] Beware the rust cache on Travis: https://levans.fr/rust_travis_cache.html

[122] IntelliJ Rust: https://intellij-rust.github.io/

[123] #82: https://intellij-rust.github.io/2018/09/13/changelog-82.html

[124] #83: https://intellij-rust.github.io/2018/09/26/changelog-83.html

[125] benfred/py-spy: https://github.com/benfred/py-spy

[126] Binaryum: https://binaryum.com

[127] обсуждение: https://www.reddit.com/r/rust/comments/9j34fq/just_graduated_and_i_release_my_first_commercial/

[128] lewton 9.1: https://github.com/rustaudio/lewton

[129] обсуждение: https://www.reddit.com/r/rust/comments/9i3hu0/lewton_091_released/

[130] rayn: https://github.com/termhn/rayn

[131] обсуждение: https://www.reddit.com/r/rust/comments/9bz3jb/rayn_a_small_simple_raytraced_renderer_in_rust/

[132] MesaLink: https://mesalink.io/

[133] обсуждение: https://www.reddit.com/r/rust/comments/9btppx/mesalink_a_memorysafe_and_opensslcompatible_tls/

[134] Tantivy 0.7: https://github.com/tantivy-search/tantivy

[135] обсуждение: https://www.reddit.com/r/rust/comments/9g89fu/tantivy_07_released/

[136] Lucene: https://ru.wikipedia.org/wiki/Lucene

[137] miniserde: https://github.com/dtolnay/miniserde

[138] обсуждение: https://www.reddit.com/r/rust/comments/9fjb2s/announcing_miniserde_serialization_library_that/

[139] serde: https://github.com/serde-rs/serde

[140] Geemili/mdproof: https://github.com/Geemili/mdproof

[141] обсуждение: https://www.reddit.com/r/rust/comments/9esi12/github_geemilimdproof_a_standalone_markdown_to

[142] Spirit: https://vorner.github.io/2018/09/03/Announcing-Spirit.html

[143] обсуждение: https://www.reddit.com/r/rust/comments/9cn9wl/announcing_spirit_library_for_cunning_down_on

[144] Looking to what to learn in 2018? Learn Rust!: https://medium.com/@bartsis/looking-to-what-to-learn-in-2018-learn-rust-1f93e7aad627

[145] Источник: https://habr.com/post/425005/?utm_campaign=425005