#24

Wishlist: top 10 capabilities for broader application development

Openaleclarsonopened 1mo ago

A ranked wishlist based on porting mygo to Tov and considering broader application development. The ranking reflects expected practical impact, not implementation effort or an agreed roadmap. Some items extend existing functionality; others propose capabilities beyond Tov's current design.

Ranked wishlist

  1. First-class native FFI. A supported way to call C libraries and platform APIs, with explicit types, ownership, and callbacks. This is the largest gap for the desktop port: mytov currently creates windows through a helper process and exchanges drawing commands and events over JSON pipes. Direct integration would remove that process boundary and unlock graphics, databases, and other native libraries.

  2. Typed npm interoperability. npm packages already work, but imported values become Js and require checked conversions. Preserve useful package type information, potentially through a supported subset of declaration files or explicit typed bindings, so more application behavior can be checked before execution.

  3. Windows support. Extend the currently supported macOS/Linux platforms to Windows, including compiler/runtime support and a usable distribution story. This would materially expand desktop deployment.

  4. Broader native standard library. Expand filesystem, process, crypto, and system APIs callable directly from Tov. The desktop port exposed gaps around stdin, binary file I/O, process metadata, and signing. Several already have focused issues and proposed fixes; this item is about the broader direction, rather than treating those fixes as absent forever. Related: #8, #9, #12, #13.

  5. End-to-end native HTTP streaming. Add native server streaming responses and streaming upload bodies, with cancellation and backpressure. This would enable SSE, large transfers, and proxies without whole-body buffering. Fetch response streaming already exists.

  6. Native WebSockets. Support persistent bidirectional connections for live interfaces, collaboration, and event-driven applications, with explicit connection lifecycle and backpressure behavior.

  7. Richer static type composition. Add tuples and consider selected capabilities such as keyof, indexed-access types, and mapped types for reusable, precisely typed APIs. Some TypeScript omissions are deliberate: the goal is useful expressiveness while preserving Tov's simplicity, not blanket TypeScript compatibility.

  8. Worker threads / shared-process parallelism. Provide a supported path for CPU-heavy work without blocking the event loop. Forked HTTP workers already exist, but address a different use case. The README also identifies worker threads for npm packages as unsupported.

  9. Complete native promise composition. Add Promise.allSettled, Promise.any, and .then/.catch/.finally to simplify partial failures and callback integration. Native async/await, Promise.all, and Promise.race already work.

  10. Native package management. Support versioned Tov libraries and reproducible dependency resolution. Installing JavaScript packages through npm/Bun already works; this proposal is for growing and consuming a native Tov ecosystem.

Priority recommendation

For the desktop port, prioritize native FFI. For general application adoption, typed npm interoperability is a close second. A dedicated package manager ranks lower because npm/Bun already provide a practical route to external JavaScript libraries.

References

This issue is a single discussion/tracking entry for the wishlist; the items are proposals, not commitments.

Activity

1
fend251mo ago

+1 for Windows support! Right now I'm running an LLM-monkey-patched version, so official support would be awesome.

And a huge thank you for the language itself. It's kinda been my dream: TS with real types and explicit error types, and a step towards a Rust-like monad model (Option/Result) with the ?; operator. Bravo!