google / wuffs

Wrangling Untrusted File Formats Safely
Other
4.07k stars 129 forks source link

Add a "hello world outside of std" example #9

Closed mvdan closed 4 years ago

mvdan commented 6 years ago

If anyone wants to play with Wuffs today, it's fairly safe to assume they'd want the code to live somewhere outside of the std directory. Forking and symlinks are a possibility, but they're not a very comfortable way to do things.

I propose that we add a simple example of what a working Wuffs program would be. For example, a dead simple program that you can compile to a working binary:

In total, this should all be under 50 lines of code. Yet it would be a great starting point for those wanting to try something of their own with Wuffs.

Split from #4 - there I mentioned how it took me some digging through the Wuffs codebase to figure out how to make it work outside of the std directory.

nigeltao commented 6 years ago

It's a valid feature request, although it (and the general concept of "write better docs and examples, for newbies or otherwise") probably isn't the highest priority while Wuffs (the language) and wuffs (the command line tool) are both yet to be stabilized.

mvdan commented 6 years ago

That's a good point. We can keep this issue as a reminder for once the language and tools have stabilized some more.