![](/static/61a827a1/assets/icons/icon-96x96.png)
![](https://lemmy.ml/pictrs/image/c0ed0a36-2496-4b4d-ac77-7d2fd7f2b5b7.png)
Well, the situation you describe, is probably best handled by CSS media queries.
In case you’re not familiar, you can write:
@media (width < 800px) {
h1 {
font-size: 110%;
}
}
…to get smaller headings on mobile, for example.
But yeah, reality may be more ugly. Especially, if you’re using a bulky JS framework, it may be easier to do the JS dance.
Yeah, Python requires a “runtime” program, which interprets the Python code and then translates it into native machine code to actually execute it. Because Rust is compiled directly to native machine code by the developer, you don’t need a runtime program on your PC to run Rust programs.
This is also one of the biggest reasons why Rust can be used for kernel development. You cannot rely on a runtime program for developing a kernel, since launching a program requires a kernel to already be up and running.