ziglang / zig

General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
https://ziglang.org
MIT License
33.62k stars 2.46k forks source link

Zig and Full stack web development #942

Closed ansarizafar closed 4 years ago

ansarizafar commented 6 years ago

As a web developer, I am looking for a fast, memory/cpu efficient and easy to use complied language (Without Stop the World Garbage Collector) for full stack web development like UrWeb http://www.impredicative.com/ur/. Is Zig good for full stack web development? or Is there any plan to do so?

andrewrk commented 6 years ago

Zig will be great for full stack web development someday. Here's what the roadmap looks like to get there from here:

This use case is an explicit use case that zig wants to handle, it's just a matter of getting there.

ansarizafar commented 6 years ago

I am really happy to hear that. I have tried everything from Rust to Crystal and scripting languages from Python to NodeJs/Javascript. Every language has its own set of issues. Rust is very powerful but very complicated.

It is a great opportunity for any new language and If Zig can do this then combined with a modern database like https://edgedb.com/ https://edgedb.com/blog/edgedb-a-new-beginning Zig could become an overnight success and rule the web development world in this Progressive Web Apps (PWAs) era.

binary132 commented 6 years ago

I would like to add that schema-driven (i.e. statically-typed) binary serialization is important to support. I've recently been thinking about how something like flatbuffers or capnproto could be supported as a feature of a programming language. Implementing flatbuf support in Zig would be a fun project.

Fwiw, getting high-quality HTTP server (and ideally websocket / TCP) support is a lot more important than full-stack (if Go and Python are good examples.)

daurnimator commented 5 years ago

json ?

@catastrop zig already has a json module in the standard library. See std.json.

hryx commented 5 years ago

@catastrop If you want a feature not described in this issue, please open a separate issue. Please take the time to state your question or suggestion clearly.

I'm not sure how to put this delicately, but take note that you won't get far here if you follow your current style of issues and comments; questions and suggestions are welcome as long as they are specific and not already addressed in a separate issue.

algoflows commented 1 year ago

Why has this been closed as we've still not got a full-stack web framework!?! Absolutely love Zig and think its a winning formula and would love to see this discussion continued overtime!

mlugg commented 1 year ago

Aside from being pretty subjective, this issue isn't asking for anything in particular, and specific goals (like an HTTP server in std and a package manager) are already covered by other issues, so there's no point leaving this one open. It's worth noting that the package manager is actually starting to see work now that we're on stage2 (andrewrk has been working on writing a good HTTP client into std to start), so we should see some progress here soon. Hopefully https://allyourcodebase.com/webdev/ will be updated and so remain a good reference as the ecosystem progresses.

algoflows commented 1 year ago

I see frameworks like Sycamore and Leptos over in the Rust ecosystem for fine grained reactivity frontend frameworks using JSX and Webassembly (think svelte and solidjs in the javascript world). Is there any attempt yet in Zig.

https://github.com/gbj/leptos

I am keen to have a crack at it but have zero ideas on where to start, any guidance or package/lib references would be awesome if they exist...?

Maybe JSX parser/interpreter or something similar. Webassembly tooling and libs...?

andrewrk commented 1 year ago

Full stack web framework is out of scope for this repository.

algoflows commented 1 year ago

Yep totally understand and would imagine it being out of scope. However I am looking to see if I could create a Frontend web framework like Leptos using Zig instead of Rust. Was hoping for a little guidance on any JSX compilation libs in Zig or C that any one knows about?

hryx commented 1 year ago

@algoflows Since this issue tracker is focused on bugs and actionable proposals, it's better to pop in to one of the communities linked in the wiki for questions and guidance, such as Discord!