Live data from Hacker News

Deno 1.6 supports compiling TypeScript to a single executable

github.com

121–130 of 284 posts

Re: Deno 1.6 supports compiling TypeScript to a single executable

#121

Earlier quoted context omitted.

Not really as the WASM version of Sqlite is memory only and cannot write to disk. Please feel free to correct me if this has changed though

Nope... the wasm fs adapters don't allow the flexibility needed to really operate correctly. It might be best to try alternatives like wrappers around leveldb as a baseline, which of course isn't sql and has its' own drawbacks.

SQLite still has a workaround for locking on Win95. That could be adapted for wasm.

https://github.com/sqlite/sqlite/blob/610f11de25993960ff616e...

Re: Deno 1.6 supports compiling TypeScript to a single executable

#122
post #94
post #55

Earlier quoted context omitted.

Do you have any trouble with the users being prompted by the Windows firewall to allow the server to listen on localhost? I like this way of doing things but I've had propmts like that for my own dev tools and I think that would put off my users.

Anecdotal, but I maintain a mildly popular Spotify player ( https://github.com/dvx/lofi ) which needs a similar flow for OAuth authentication. I've never had an issue created or complaint about the Windows Firewall popup.

Nice player BTW never heard of it!

Re: Deno 1.6 supports compiling TypeScript to a single executable

#123
post #96

Earlier quoted context omitted.

Rust has supported statically linking to MSVC and musl for a while now but also added static glibc support on Linux very recently: https://github.com/rust-lang/rust/pull/77386

Is it possible to compile with statically linked musl with the pre-built Rust toolchain on a standard glibc based distribution?

Yes, but there are claims it is slower https://www.reddit.com/r/rust/comments/a6pna3/comment/ebzpzl...

Re: Deno 1.6 supports compiling TypeScript to a single executable

#124
Please help me to understand: If I deploy my apps as Docker images anyway why would I need this? Deno 1.6 just packages the runtime creating a huge file, still smaller than a Docker image but with latter I have a better deployment experience meaning there's a huge ecosystem and tooling around. No rant, just trying to get what I miss.

Re: Deno 1.6 supports compiling TypeScript to a single executable

#125
post #112

Earlier quoted context omitted.

webassembly doesn't support file locking for sqlite databases that would allow for other processes to interact with the same database your application uses. It's actually one of my biggest gripes. You can use it in-memory and save the output or use a different database approach, and lose the features of sqlite. Of course, a different kind of database, similar to say leveldb could work in single-process mode.

WebAssembly supports threads and shared memory, which should make it possible to implement software-based locks in the meantime. I definitely see the issue that you're bringing up, especially wrt external interoperability.

For me, I often have a sqlite client connected to my active database while my application runs to run adhoc queries to check application's state/structure... with a wasm implementation, that is simply not possible.

Re: Deno 1.6 supports compiling TypeScript to a single executable

#127

Earlier quoted context omitted.

Nope... the wasm fs adapters don't allow the flexibility needed to really operate correctly. It might be best to try alternatives like wrappers around leveldb as a baseline, which of course isn't sql and has its' own drawbacks.

SQLite still has a workaround for locking on Win95. That could be adapted for wasm. https://github.com/sqlite/sqlite/blob/610f11de25993960ff616e...

In another comment I mention, that I often use a desktop sqlite client to actively connect to the operation sqlite database an application may be running against. Wasm will not support this, even with the workaround above.

Re: Deno 1.6 supports compiling TypeScript to a single executable

#128
post #124

Please help me to understand: If I deploy my apps as Docker images anyway why would I need this? Deno 1.6 just packages the runtime creating a huge file, still smaller than a Docker image but with latter I have a better deployment experience meaning there's a huge ecosystem and tooling around. No rant, just trying to get what I miss.

You are talking about server side use cases mostly. This executable will come handy for variety 3rd party apps.

Re: Deno 1.6 supports compiling TypeScript to a single executable

#129
post #124

Please help me to understand: If I deploy my apps as Docker images anyway why would I need this? Deno 1.6 just packages the runtime creating a huge file, still smaller than a Docker image but with latter I have a better deployment experience meaning there's a huge ecosystem and tooling around. No rant, just trying to get what I miss.

I think you already answered the question. You don't need to introduce docker cli, docker daemon, a container registry, etc. Not saying theres anything wrong with docker but having options for application packaging is nice!

Re: Deno 1.6 supports compiling TypeScript to a single executable

#130
post #124

Please help me to understand: If I deploy my apps as Docker images anyway why would I need this? Deno 1.6 just packages the runtime creating a huge file, still smaller than a Docker image but with latter I have a better deployment experience meaning there's a huge ecosystem and tooling around. No rant, just trying to get what I miss.

CLI tools and other things that don't get "deployed" would be one use case
Post reply on HN