Skip to content

Commit

Permalink
Improve README.md, fix Makefile.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
polina4096 committed Aug 3, 2024
1 parent 5c8e32a commit 53076fe
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
8 changes: 5 additions & 3 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ default_to_workspace = false
dependencies = ["make-dev-dirs", "run"]

[tasks.run]
dependencies = ["copy-assets"]
dependencies = ["make-dev-dirs", "copy-assets"]
command = "cargo"
args = ["run", "--bin", "apex-client"]
cwd = "./debug/"
Expand All @@ -17,7 +17,7 @@ command = "cargo"
args = ["build", "--bin", "apex-client", "${@}"]

[tasks.run-opt]
dependencies = ["copy-assets"]
dependencies = ["make-dev-dirs", "copy-assets"]
command = "cargo"
args = ["run", "--bin", "apex-client", "--release", "--", "-C", "target-cpu=native"]
cwd = "./debug/"
Expand All @@ -26,7 +26,9 @@ env = { "RUST_LOG" = "apex_client=debug" }
[tasks.make-dev-dirs]
script = '''
#!@duckscript
mkdir ./debug
if not is_path_exists ./debug
mkdir ./debug
end
'''

[tasks.copy-assets]
Expand Down
23 changes: 16 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,29 @@
Hackable & performant taiko client supporting multiple platforms such as Linux (X11 & Wayland), macOS, Windows and even web using WebAssembly.

## Build Instructions
1. Install the Rust toolchain: https://rustup.rs
1. Install the **nightly** Rust toolchain: https://rustup.rs
2. Install cargo-make: `cargo install --force cargo-make`
3. Clone the repository: `git clone [email protected]:polina4096/apex.git`
4. Navigate to the cloned repository's directory: `cd apex`
5. Compile the program: `cargo make build`
5. Run: `cargo make run-opt`

This should generally work, but the project is not ready for testing yet. Expect no help if something goes wrong for now.
Please note that the game is **not ready for testing yet**, as there are certain major issues such as some audio formats being only partially supported.

Actually, build instructions do not work at all. There is no support for release builds yet, and if you want to just run a debug one do: `cargo make`. You can do `cargo build --release --bin apex-client`, but it will only build the executable which is not guaranteed to run with improper directory structure.
### Development

### WASM support
Install [wasm-pack](https://rustwasm.github.io/wasm-pack/installer/), build with: `wasm-pack build --release`.
The game stores and accesses certain data such as assets, beatmaps or configuration from the working directory. If a directory or a file is missing the game creates when needed. Project is setup in a way which stores all game data inside a `debug` directory in a development environment.

Navigate to `crates/apex-client/web` and host a local web server with: `pnpm run dev`. This will not work as WASM build is a bit broken and not ready yet :)
Compile and run a development build with: `cargo make` / `cargo make run`

Or with optimizations (takes very long): `cargo make run-opt`

### WebAssembly support

Right now Wasm builds are broken indefinitely due to threading and other issues and fixing them is low priority, please wait for future updates :c

~~Install [wasm-pack](https://rustwasm.github.io/wasm-pack/installer/), build with: `wasm-pack build --release`.~~

~~Navigate to `crates/apex-client/web` and host a local web server with: `pnpm run dev`.~~

## License
Distributed under the MIT license.

0 comments on commit 53076fe

Please sign in to comment.