| ▲ | tliltocatl an hour ago |
| Which is useless if you don't want any dynamic allocation at all. |
|
| ▲ | stymaar 41 minutes ago | parent | next [-] |
| If you don't want any allocation at all, you don't need an allocator API. But the global allocator is the response to your previous comment: > When you need it, you need it for the whole program (including all the dependencies). |
|
| ▲ | chiffaa an hour ago | parent | prev [-] |
| Then you should generally go for `no_alloc`, because std allocates, so no_std + no_alloc leaves you with core + a bunch of crates for no_std data manipulation |
| |
| ▲ | tliltocatl an hour ago | parent | next [-] | | And then I have to deal with writing tons of code to please the borrow checker myself. At which point I might as well go for a language that doesn't need so much ritual. | | |
| ▲ | LoganDark 41 minutes ago | parent [-] | | Why not use an LLM to help with the actual syntax while you only need to worry about the data flow? I've found they're quite good with that. | | |
| ▲ | logicchains 34 minutes ago | parent [-] | | It's not just syntax. Depending on the allocation scheme used it can be very difficult to prove to the borrow checker that it's all safe, or even impossible (the same way some data structures in Rust can only be implemented with `unsafe`). |
|
| |
| ▲ | LoganDark an hour ago | parent | prev [-] | | Huh, that's a thing? I thought there was just `no_std` and then you can simply leave out `extern crate alloc`. |
|