sdf_2d
rust-playground
Our great sponsors
sdf_2d | rust-playground | |
---|---|---|
3 | 65 | |
1 | 1,149 | |
- | 3.0% | |
0.0 | 9.5 | |
about 1 year ago | 18 days ago | |
Rust | Rust | |
- | 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.
sdf_2d
-
Hey Rustaceans! Got an easy question? Ask here (14/2021)!
For anyone interested, here is a branch with the broken code: https://github.com/doup/sdf_2d/blob/feature/egui/src/main.rs#L422
-
Hey Rustaceans! Got an easy question? Ask here (11/2021)!
Is that correct? I've written down what I understand as a comment in my code: https://github.com/doup/sdf_2d/blob/master/src/sdf.rs#L13-L18 Is the explanation correct?
-
Hey Rustaceans! Got an easy question? Ask here (8/2021)!
Hi! I've been trying to add Rayon to a toy project I'm working on. First I changed my code to use iterators using chunks_mut (code here)… now I've changed to par_chunks_mut but I'm getting the following error:
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.
What are some alternatives?
tokio - A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...
trunk - Build, bundle & ship your Rust WASM application to the web.
mdBook - Create book from markdown files. Like Gitbook but implemented in Rust
Rocket - A web framework for Rust.
egui - egui: an easy-to-use immediate mode GUI in Rust that runs on both web and native
sqlx - 🧰 The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, and SQLite.
tuntap-mac
rust-analyzer - A Rust compiler front-end for IDEs
rust-analyzer - A Rust compiler front-end for IDEs [Moved to: https://github.com/rust-lang/rust-analyzer]
carbon - :black_heart: Create and share beautiful images of your source code
WebAssemblyStudio - Learn, Teach, Work and Play in the WebAssembly Studio