Now instead of a new JS framework daily, it's going to be new reimplementation of an existing tool daily. For a while.
Now instead of a new JS framework daily, it's going to be new reimplementation of an existing tool daily. For a while.
So when you say “compiled app” you might be referring instead to C or C++ apps, which don’t generally have as simple and common a distribution model. Rust is entirely different, and incorporated a lot of design decisions about how to package software from npm and other languages.
Second, this was in response to an npm is simpler comment; npm and cargo are absolutely the same category of tool.
1) what’s the easiest way to give people access to a tool I just wrote, `cargo publish`
2) what’s the easiest way for someone to use it, as few steps as possible, right now it’s `install rust` && `cargo install`.
Once I get to three or more steps on 2 I tend to turn to just or make depending on the context.
Use github actions or other setup for other backends.
(this is language agnostic and a reasonable thing to learn as a dev).
Or if you must live in the cargo command, go nuts with cargo-release.
local compilation may work for you and other individuals, but "just cargo install" can immediately run into issues if you're trying to deploy something to things that aren't dev workstations
> npm and cargo are absolutely the same category of tool
as a dev tool? absolutely. as a production distribution solution? definitely not
If you’re talking about distributing Rust projects, sure it’s fine. Generally though, if you’re orchestrating a bunch of other things outside the rust software itself, I’d turn to just.
npm is still mainly used in JavaScript and Typescript scenarios, so I think you’re kinda splitting hairs if you’re suggesting it’s a general purpose tool.
OOTH, Precompiled Rust binaries have the libc version issue only if you're distributing binaries to unknown/all distribtuions, but that's pretty trivially solved by just compiling using an old glibc (or MUSL). Whereas `cargo install' (and targetting specific distributions) does the actual compiling and uses the current glibc so it's not an issue.
Why it matters: in GP’s case it sounds like compiling is the problem, so migrating to using SWC as the compiler but keeping TSC as the checker (noEmit flag) in a lint step may ease that pain a bit. Though it might be nicer to migrate both in parallel.
Compilation or not isn't a feature of languages but of language implementations, but, yes, the primary TypeScript implementation is compiled.
> It is a "transpiled" language.
Transpilation is a subset of compilation.
It's not compiled to native machine code for the target system, but that doesn't make it not-compiled.
Just like Typescript compiles the source to Javascript which is then loaded by the V8/Node etc.
And thus programming languages can be only of one type - Compiled.