Skip to content

Commit fe7fde0

Browse files
committed
start adding documentation for new languages
1 parent 7d2adc0 commit fe7fde0

File tree

6 files changed

+58
-2
lines changed

6 files changed

+58
-2
lines changed

CONTRIBUTING.MD

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,7 @@ Enhancement suggestions are tracked as [GitHub issues](https://github.com/makspl
135135

136136
### Your First Code Contribution
137137

138-
This project uses xtask to manage the build and test process. You can run `cargo xtask` to see the available commands. Run `xtask init` to setup your local development environment.
139-
138+
Before contributing see the [book](https://makspll.github.io/bevy_mod_scripting) for helpful guides on how to get started with the project.
140139

141140

142141
### Improving The Documentation
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Evaluating Feasibility
2+
3+
In order for a language to work well with BMS it's necessary it supports the following features:
4+
- [ ] Interoperability with Rust. If you can't call it from Rust easilly and there is no existing crate that can do it for you, it's a no-go.
5+
- [ ] First class functions. Or at least the ability to call an arbitrary function with an arbitrary number of arguments from a script. Without this feature, you would need to separately generate code for the bevy bindings. This is painful and goes against the grain of the project.
6+
7+
## First Classs Functions
8+
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Adding New Languages to BMS
2+
3+
If you are interested in adding a new language to BMS, please read this section first. Adding a new language is a non-trivial task depending on the language you want to add. It also requires a lot of effort and time to maintain a new language, so unless the language you want to add is widely used and has a large community, it might not be worth the effort.

docs/src/Development/introduction.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Developing BMS
2+
3+
This section is for developers who want to contribute to the BMS project. It covers various topics necessary for understanding the project and contributing to it.
4+
5+
## Contributing
6+
7+
Please see the [code of conduct](https://github.com/makspll/bevy_mod_scripting/blob/main/CODE_OF_CONDUCT.md) as well as the [contributing guidelines](https://github.com/makspll/bevy_mod_scripting/blob/main/CONTRIBUTING.md) first.

docs/src/Development/setup.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Setup
2+
3+
this crate contains a work in progress `xtask` setup which in theory should allow you to setup everything you need for local development by running:
4+
5+
```sh
6+
cargo xtask init
7+
```
8+
9+
However at the moment it does not generate IDE specific files for you, so you will need to do that manually.
10+
11+
## VScode
12+
13+
For vscode you will want to enter the following into your `settings.json`
14+
15+
```json
16+
{
17+
"rust-analyzer.rustc.source": "discover",
18+
"rust-analyzer.linkedProjects": [
19+
// "./crates/bevy_api_gen/Cargo.toml", uncommenting this is currently not fully supported with xtask + vscode, rust analyzer bugs out a lot sadly
20+
"Cargo.toml",
21+
],
22+
"rust-analyzer.check.invocationStrategy": "once",
23+
"rust-analyzer.check.overrideCommand": [
24+
"/absolute-path-to-this-project/bevy_mod_scripting/check.sh"
25+
],
26+
"rust-analyzer.cargo.buildScripts.overrideCommand": [
27+
"/absolute-path-to-this-project/bevy_mod_scripting/check.sh"
28+
],
29+
}
30+
```
31+
32+
If you are on windows you might need to create an equivalent `check.exe` to run `cargo xtask check --ide-mode` in the root directory of this workspace.

docs/src/SUMMARY.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,10 @@
1818
- [ScriptQueryBuilder](./ScriptingReference/script-query-builder.md)
1919
- [ScriptQueryResult](./ScriptingReference/script-query-result.md)
2020
- [Core Callbacks](./ScriptingReference/core-callbacks.md)
21+
22+
# Developing BMS
23+
24+
- [Introduction](./Development/introduction.md)
25+
- [Setup](./Development/setup.md)
26+
- [New Languages](./Development/AddingLanguages/introduction.md)
27+
- [Evaluating Feasibility](./Development/AddingLanguages/evaluating-feasibility.md)

0 commit comments

Comments
 (0)