2014-04-14 21:23:46 -07:00
|
|
|
^title Contributing
|
|
|
|
|
|
2016-01-24 15:39:35 -08:00
|
|
|
Like the bird, Wren's ecosystem is small but full of life. Almost everything is
|
|
|
|
|
under active development and there's lots to do. We'd be delighted to have you
|
|
|
|
|
help.
|
2015-01-01 20:45:15 -08:00
|
|
|
|
2020-06-05 14:57:20 -07:00
|
|
|
The first thing to do is to join [the discord community][discord] (or [the mailing list][list]) and say,
|
2016-01-24 15:39:35 -08:00
|
|
|
"Hi". There are no strangers to Wren, just friends we haven't met yet.
|
2015-01-20 17:46:52 -08:00
|
|
|
|
2016-01-24 15:39:35 -08:00
|
|
|
## Growing the ecosystem
|
2015-01-20 17:46:52 -08:00
|
|
|
|
2016-01-24 15:39:35 -08:00
|
|
|
The simplest and often most helpful way to join the Wren party is to be a Wren
|
|
|
|
|
*user*. Create an application that embeds Wren. Write a library or a handy
|
|
|
|
|
utility in Wren. Add syntax highlighting support for Wren to your favorite text
|
|
|
|
|
editor. Share that stuff and it will help the next Wren user to come along.
|
2015-01-20 17:46:52 -08:00
|
|
|
|
2020-06-05 14:57:20 -07:00
|
|
|
If you do any of the above, let us know by adding it to [the wiki][wiki].
|
|
|
|
|
We like to keep track of:
|
2016-05-20 10:02:57 -07:00
|
|
|
|
2019-02-05 18:41:31 -08:00
|
|
|
[wiki]: https://github.com/wren-lang/wren/wiki
|
2015-01-01 20:45:15 -08:00
|
|
|
|
2016-01-24 15:39:35 -08:00
|
|
|
* [Applications][] that host Wren as a scripting language.
|
|
|
|
|
* [Modules][] written in Wren that others can use.
|
2020-06-05 14:57:20 -07:00
|
|
|
* [Language bindings][] that let you interact with Wren from other
|
2016-01-24 15:39:35 -08:00
|
|
|
languages.
|
2020-06-05 14:57:20 -07:00
|
|
|
* [Tools and utilities][] that make it easier to be a Wren programmer.
|
2015-01-01 20:45:15 -08:00
|
|
|
|
2019-02-05 18:41:31 -08:00
|
|
|
[applications]: https://github.com/wren-lang/wren/wiki/Applications
|
|
|
|
|
[modules]: https://github.com/wren-lang/wren/wiki/Modules
|
|
|
|
|
[language bindings]: https://github.com/wren-lang/wren/wiki/Language-Bindings
|
|
|
|
|
[tools and utilities]: https://github.com/wren-lang/wren/wiki/Tools
|
2015-01-04 13:36:23 -08:00
|
|
|
|
2016-01-24 15:39:35 -08:00
|
|
|
## Contributing to Wren
|
2015-01-04 13:36:23 -08:00
|
|
|
|
2016-01-24 15:39:35 -08:00
|
|
|
You're also more than welcome to contribute to Wren itself, both the core VM and
|
|
|
|
|
the command-line interpreter. The source is developed [on GitHub][github]. Our
|
|
|
|
|
hope is that the codebase, tests, and [documentation][docs] are easy to
|
|
|
|
|
understand and contribute to. If they aren't, that's a bug.
|
2015-01-04 13:36:23 -08:00
|
|
|
|
2020-06-05 14:57:20 -07:00
|
|
|
You can learn how to build wren on the [getting started page](getting-started.html#building-wren).
|
|
|
|
|
|
2016-01-24 15:39:35 -08:00
|
|
|
### Finding something to hack on
|
|
|
|
|
|
|
|
|
|
Between the [issue tracker][issue] and searching for `TODO` comments in the
|
|
|
|
|
code, it's pretty easy to find something that needs doing, though we don't
|
|
|
|
|
always do a good job of writing everything down.
|
|
|
|
|
|
|
|
|
|
If nothing there suits your fancy, new ideas are welcome as well! If you have an
|
|
|
|
|
idea for a significant change or addition, please file a [proposal][] to discuss
|
|
|
|
|
it before writing lots of code. Wren tries very *very* hard to be minimal which
|
2015-01-20 17:46:52 -08:00
|
|
|
means often having to say "no" to language additions, even really cool ones.
|
2015-01-04 13:36:23 -08:00
|
|
|
|
2016-01-24 15:39:35 -08:00
|
|
|
### Hacking on docs
|
2015-09-22 07:59:54 -07:00
|
|
|
|
|
|
|
|
The [documentation][] is one of the easiest—and most
|
|
|
|
|
important!—parts of Wren to contribute to. The source for the site is
|
2020-06-05 14:57:20 -07:00
|
|
|
written in [Markdown][] and lives under `doc/site`. A
|
|
|
|
|
simple Python 3 script, `util/generate_docs.py`, converts that to HTML and CSS.
|
2015-09-22 07:59:54 -07:00
|
|
|
|
|
|
|
|
[documentation]: /
|
|
|
|
|
[markdown]: http://daringfireball.net/projects/markdown/
|
|
|
|
|
|
2020-06-05 14:57:20 -07:00
|
|
|
$ python util/generate_docs.py
|
2015-09-22 07:59:54 -07:00
|
|
|
|
|
|
|
|
This generates the site in `build/docs/`. You can run any simple static web
|
|
|
|
|
server from there. Python includes one:
|
|
|
|
|
|
|
|
|
|
$ cd build/docs
|
2020-06-05 14:57:20 -07:00
|
|
|
$ python -m http.server
|
2015-09-22 07:59:54 -07:00
|
|
|
|
2020-06-05 14:57:20 -07:00
|
|
|
Running that script every time you change a line of Markdown can be slow,
|
2015-09-22 07:59:54 -07:00
|
|
|
so there is also a file watching version that will automatically regenerate the
|
|
|
|
|
docs when you edit a file:
|
|
|
|
|
|
2020-06-05 14:57:20 -07:00
|
|
|
$ python util/generate_docs.py --watch
|
2015-09-22 07:59:54 -07:00
|
|
|
|
2016-01-24 15:39:35 -08:00
|
|
|
### Hacking on the VM
|
2015-01-04 13:36:23 -08:00
|
|
|
|
|
|
|
|
The basic process is simple:
|
|
|
|
|
|
|
|
|
|
1. **Make sure you can build and run the tests locally.** It's good to ensure
|
|
|
|
|
you're starting from a happy place before you poke at the code. Running the
|
2020-06-05 14:57:20 -07:00
|
|
|
tests is as simple as [building the vm project](getting-started.html#building-wren),
|
|
|
|
|
which generates `bin/wren_test` and then running the following python 3 script:
|
2015-01-04 13:36:23 -08:00
|
|
|
|
2020-06-05 14:57:20 -07:00
|
|
|
$ python util/test.py
|
2015-01-04 13:36:23 -08:00
|
|
|
|
|
|
|
|
If there are no failures, you're good to go.
|
|
|
|
|
|
|
|
|
|
2. **[Fork the repo][fork] so you can change it locally.** Please make your
|
2021-04-07 20:54:18 -07:00
|
|
|
changes in separate [feature branches][] to make things a little easier.
|
2015-01-04 13:36:23 -08:00
|
|
|
|
|
|
|
|
3. **Change the code.** Please follow the style of the surrounding code. That
|
|
|
|
|
basically means `camelCase` names, `{` on the next line, keep within 80
|
|
|
|
|
columns, and two spaces of indentation. If you see places where the existing
|
2020-06-05 14:57:20 -07:00
|
|
|
code is inconsistent, let us know.
|
2015-01-04 13:36:23 -08:00
|
|
|
|
|
|
|
|
4. **Write some tests for your new functionality.** They live under `test/`.
|
|
|
|
|
Take a look at some existing tests to get an idea of how to define
|
|
|
|
|
expectations.
|
|
|
|
|
|
|
|
|
|
5. **Make sure the tests all pass, both the old ones and your new ones.**
|
|
|
|
|
|
|
|
|
|
6. **Add your name and email to the [AUTHORS][] file if you haven't already.**
|
|
|
|
|
|
|
|
|
|
7. **Send a [pull request][].** Pat yourself on the back for contributing to a
|
2021-04-07 20:54:18 -07:00
|
|
|
fun open source project!
|
2015-01-04 13:36:23 -08:00
|
|
|
|
2016-01-24 15:39:35 -08:00
|
|
|
## Getting help
|
|
|
|
|
|
2015-08-30 22:38:40 -07:00
|
|
|
If at any point you have questions, feel free to [file an issue][issue] or ask
|
2020-06-05 14:57:20 -07:00
|
|
|
on the [discord community][discord] (or the [mailing list][list]). If you're a Redditor, try the
|
2016-05-20 10:02:57 -07:00
|
|
|
[/r/wren_lang][subreddit] subreddit. You can also email me directly (`robert` at
|
2016-01-24 15:39:35 -08:00
|
|
|
`stuffwithstuff.com`) if you want something less public.
|
2015-01-03 23:27:02 -08:00
|
|
|
|
|
|
|
|
[mit]: http://opensource.org/licenses/MIT
|
2020-06-05 14:57:20 -07:00
|
|
|
[github]: https://github.com/wren-lang/
|
2015-01-04 13:36:23 -08:00
|
|
|
[fork]: https://help.github.com/articles/fork-a-repo/
|
2020-06-12 10:11:49 -07:00
|
|
|
[docs]: https://github.com/wren-lang/wren/tree/main/doc/site
|
2019-02-05 18:41:31 -08:00
|
|
|
[issue]: https://github.com/wren-lang/wren/issues
|
|
|
|
|
[proposal]: https://github.com/wren-lang/wren/labels/proposal
|
2015-01-04 13:36:23 -08:00
|
|
|
[feature branches]: https://www.atlassian.com/git/tutorials/comparing-workflows/centralized-workflow
|
2020-06-12 10:11:49 -07:00
|
|
|
[authors]: https://github.com/wren-lang/wren/tree/main/AUTHORS
|
2019-02-05 18:41:31 -08:00
|
|
|
[pull request]: https://github.com/wren-lang/wren/pulls
|
2015-01-20 17:46:52 -08:00
|
|
|
[list]: https://groups.google.com/forum/#!forum/wren-lang
|
2016-05-20 10:02:57 -07:00
|
|
|
[subreddit]: https://www.reddit.com/r/wren_lang/
|
2020-06-05 14:57:20 -07:00
|
|
|
[discord]: https://discord.gg/Kx6PxSX
|