rust-playground
rust-analyzer
Our great sponsors
rust-playground | rust-analyzer | |
---|---|---|
65 | 132 | |
1,149 | 13,479 | |
3.0% | 2.4% | |
9.5 | 10.0 | |
18 days ago | about 14 hours ago | |
Rust | Rust | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
rust-playground
-
How to Lose Control of Your Shell
That's a valid Unix path, but rust's quoting does nothing to stop it: https://play.rust-lang.org/?version=stable&mode=debug&editio...
-
Borrow Checking Without Lifetimes
Self-referential structs work fine in Rust and always have.
https://play.rust-lang.org/?version=stable&mode=debug&editio...
The compiler will correctly prevent you from moving the value.
The other way to have a struct that starts out as non-self-referential and then becomes self-referential can be achieved with `unsafe` and `Pin::new_unchecked`, which is how `async {}` is handled.
-
Improving Interoperability Between Rust and C++
In rust as currently stands: https://play.rust-lang.org/?version=stable&mode=debug&editio...
On the other hand, both this wrapper and yours are counterproductive if the element size is dynamic (e.g. perhaps you're dealing with some nonsense like:)
struct ITableColumn {
-
New Linux glibc flaw lets attackers get root on major distros
Overflow checks turn into two's compliments' wrapping, but that's only considered acceptable because bounds checks are not turned off.
https://play.rust-lang.org/?version=stable&mode=release&edit...
-
Atomics and Concurrency
I have no idea what you're talking about, but it sounds unnecessarily complicated and why I don't use Rust for any serious work.
This demonstrates the ABA problem in safe Rust: https://play.rust-lang.org/?version=stable&mode=debug&editio...
Substitute the sleep with a combination of doing computation/work and the OS thread scheduler, and you can see how the bug surfaces.
-
Rust 🦀 Installation + Hello World
You can also try Rust online using the Rust playground: https://play.rust-lang.org/
-
4B If Statements
(Click ... beside build to get assembly) https://play.rust-lang.org/?version=stable&mode=release&edit...
Unfortunately the go playground doesn't seem to support emitting assembly?
-
Hey Rustaceans! Got a question? Ask here (49/2023)!
Mystified about strings? Borrow checker have you in a headlock? Seek help here! There are no stupid questions, only docs that haven't been written yet. Please note that if you include code examples to e.g. show a compiler error or surprising result, linking a playground with the code will improve your chances of getting help quickly.
-
Hey Rustaceans! Got a question? Ask here (48/2023)!
If you have a StackOverflow account, consider asking it there instead! StackOverflow shows up much higher in search results, so having your question there also helps future Rust users (be sure to give it the "Rust" tag for maximum visibility). Note that this site is very interested in question quality. I've been asked to read a RFC I authored once. If you want your code reviewed or review other's code, there's a codereview stackexchange, too. If you need to test your code, maybe the Rust playground is for you.
-
Making Games in Go for Absolute Beginners
> I am the developer of Astral Divide, which is entirely written in Go: https://store.steampowered.com/app/2597060/Astral_Divide/
Your game looks great, congrats on your progress! I especially enjoyed how the zoom works when you're leaving/arrive planets, and the unique propulsion system (also, the anchor made me giggle!).
> lack of data structure packages
I tend to not need many, so I'd be curious if you can recall any structure in particular which you couldn't find? No biggie if not.
> package structure not suited for games
I'm not a game dev, but I've seen some larger games such as https://github.com/divVerent/aaaaxy/tree/main/internal (if you haven't played it before—do it!) which seem to be able to place everything into separate packages without issue, so perhaps there's something to gleam from their design?
> maps are random when iterated
Hash map iteration shouldn't be sorted in _any_ language (here's Rust, for example https://play.rust-lang.org/?version=stable&mode=debug&editio... (Python makes it _appear_ as if dicts are sorted hash maps, but that's only because it doesn't only use a hash table, but a vector as well (same as you'd have to do in Go))), otherwise it would cause both portability and security (https://github.com/golang/go/issues/2630) issues. You can use a b-tree (which was probably the data structure you wanted there) if you aren't willing to sort it yourself.
> modding options
If you don't care about unloading https://github.com/pkujhd/goloader
Go actually has one of the best WASM runtimes https://github.com/tetratelabs/wazero
It also has a bunch of libraries for embedding scripting languages https://awesome-go.com/embeddable-scripting-languages, with Tengo _probably_ being quickest https://github.com/d5/tengo
I'd _highly_ recommend Ebitengine in the future, as not only have there been multiple brilliant games using it, but it also has Switch/Android/iOS support, and you can find help with any issue whatsoever in their Discord. People have built 3D games with it, and Hajime is an absolute beast of a developer.
rust-analyzer
-
Cranelift code generation comes to Rust
go build 3.62s user 0.76s system 171% cpu 2.545 total
I was looking forward to parallel front-end[4], but I have not seen any improvement for these small changes.
-
A guide on Neovim's LSP client
For example, intelephense can show diagnostics in real time, there is no need to save the file to get new diagnostics. But rust-analyzer, the language server for rust, can only update diagnostics after saving the file.
-
Top 10 Rusty Repositories for you to start your Open Source Journey
6. Rust Analyzer
-
LSP could have been better
Agree this is not a problem. rust-analyzer also includes a boatload of custom extensions. Here's how "query type of selected expression" works, for example:
https://github.com/rust-lang/rust-analyzer/blob/master/docs/...
For example: https://github.com/rust-lang/rust-analyzer/blob/master/docs/...
> If you create an LSP, it will work best in VS Code.
Any editor can work just as well as (or even better than) VS Code.
-
Mastering Emacs: What's new in Emacs 29.1
I am not a Rust dev. It surely looks great.
However, from what I understand it seems to supply just a parser separate from the Rust compiler (https://github.com/rust-lang/rust-analyzer/tree/master/crate...) trying to keep up with Rust‘s development. So, in principle, it could have been just another treesitter parser plugin, too.
So, again, the LSP framework does not directly provide any magical benefit over a static parsing framework. All the semantic analysis capabilities stem from a good parser.
-
rust-analyzer significantly slowing down compilation
You may file issue at github rust-analyzer
-
Any new Opensource projects in (rust) looking for contributors. I want to start my journey as an OSS contributor.
I've contributed to rust-analyzer and nushell and had a great experience in both! Tons of open issues with a huge range of difficulties, and the maintainers are really helpful in providing hints to get started.
-
I want to contribute in a big project
For something more concrete you can try and ask around on their zulip or browse their issues.
-
Microsoft is rewriting core Windows libraries in Rust
More info here: https://rust-analyzer.github.io/ and here: https://rust-analyzer.github.io/manual.html#installation
What are some alternatives?
vscode-rust - Rust extension for Visual Studio Code
intellij-rust - Rust plugin for the IntelliJ Platform
rustfmt - Format Rust code
sublime-rust - The official Sublime Text 4 package for the Rust Programming Language
coc-rust-analyzer - rust-analyzer extension for coc.nvim
eglot - A client for Language Server Protocol servers
typescript-language-server - TypeScript & JavaScript Language Server
tree-sitter-rust - Rust grammar for tree-sitter
vim-lsp-settings - Auto configurations for Language Server for vim-lsp
Neovim-from-scratch - 📚 A Neovim config designed from scratch to be understandable
intellij-lsp-server - Exposes IntelliJ IDEA features through the Language Server Protocol.
Clippy - A bunch of lints to catch common mistakes and improve your Rust code. Book: https://doc.rust-lang.org/clippy/