Giter VIP home page Giter VIP logo

Comments (4)

asfaltboy avatar asfaltboy commented on September 26, 2024 4

Interesting! The issue I have is the opposite! The latest stable release version as of today is 0.11, and I installed it through my OS package manager (pacman, on Arch Linux). And in this version, zig init is an unknown command:

error: unknown command: init

But, the commands init-exe and init-lib do exist, and running the former does work:

❯ zig init-exe 
info: Created build.zig
info: Created src/main.zig
info: Next, try `zig build --help` or `zig build run`

Which matches the version of the docs you linked to! But, the current master has the docs:

## Run Hello World
If you completed the installation process correctly, you should now be able to invoke the Zig compiler from your shell.
Let's test this by creating your first Zig program!
Navigate to your projects directory and run:
```bash
mkdir hello-world
cd hello-world
zig init
```
This should output:
```
info: created build.zig
info: created build.zig.zon
info: created src/main.zig
info: created src/root.zig
info: see `zig build --help` for a menu of options
```

Which makes me think that the docs have been updated to some newer version (e.g 0.12) that isn't stable yet, and can result in confusing behaviour for new users 😅

from www.ziglang.org.

kassane avatar kassane commented on September 26, 2024 1

I'm curious what the reason was to merge init-exe and init-lib?
Couldn't find anything so far 😇

from www.ziglang.org.

medic17 avatar medic17 commented on September 26, 2024

this issue still persists in 0.12 init works. It would be nice to get a deprecation notice

from www.ziglang.org.

CanRau avatar CanRau commented on September 26, 2024

I'm curious what the reason was to merge init-exe and init-lib?
Couldn't find anything so far 😇

from www.ziglang.org.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.