Remove CLI client stub

This commit is contained in:
Keavon Chambers 2021-07-15 03:44:57 -07:00
parent 7785ed2b1d
commit 67131a23fd
7 changed files with 8 additions and 32 deletions

4
Cargo.lock generated
View file

@ -82,10 +82,6 @@ dependencies = [
"serde",
]
[[package]]
name = "graphite-cli"
version = "0.1.0"
[[package]]
name = "graphite-document-core"
version = "0.1.0"

View file

@ -1,7 +1,6 @@
[workspace]
members = [
"core/*",
"client/cli",
"client/web/wasm",
]

View file

@ -52,29 +52,21 @@ Development is broken into monthly sprints culminating in a presentation at the
## Running the code
The project is split between clients and core libraries (which use the clients). Currently the only important client is the web frontend (`/client/web`). There's also a CLI client (`/client/cli`) that may be useful for testing. The only core library so far is the Editor Core Library (`/core/editor`). The web client's Vue code lives in `/client/web/src` and a Rust wrapper for the Editor Core Library (which exposes functions to JavaScript through bindings generated by wasm-bindgen) lives in `/client/web/wasm`.
The project is split between clients and core libraries (which are used by the clients). Currently the only client is the web frontend (`/client/web`). The web client's Vue code lives in `/client/web/src` and a Rust translation layer for the editor core library lives in `/client/web/wasm`.
A good starting point for learning about the code structure and architecture is reading the [documentation](docs/index.md).
### Web client
This is the primary means of running and developing the project. You may need to download and install a recent version of [Node.js](https://nodejs.org/) and [Rust](https://www.rust-lang.org/) (on Windows, this requires the MSVC toolchain properly configured with the Visual Studio Build Tools installed on your machine including the "Desktop development with C++" workload).
This is the primary means of running and developing the project. You may need to download and install a recent version of [Node.js](https://nodejs.org/) and [Rust](https://www.rust-lang.org/) (on Windows, this requires the MSVC toolchain properly configured with the Visual Studio Build Tools installed on your machine including the "Desktop development with C++" workload). Ensure you have the latest stable version of Rust if there are issues building.
```
npm run serve
```
After editing some Rust and TypeScript code, you may need to manually restart the developments server because this is not properly watching all files right now. (Please submit a PR to help fix this!)
The server automatically watches for changes to Vue files and rebuilds them. However core Rust and TypeScript file changes require a manual restart of the development server. (Please submit a PR to help it watch the `.ts` files!)
You can also use `npm run lint` as well as `npm run build` (the static files will end up in `/client/web/dist`).
### CLI client
This may be useful for testing at some point in the future.
```
cargo run
```
You can also use `npm run lint` and `npm run lint-no-fix` to solve web formatting and `cargo fmt` for Rust formatting. Also `npm run build` writes static files to `/client/web/dist` instead of serving them from memory.
### Editor core library

View file

@ -1,11 +0,0 @@
[package]
name = "graphite-cli"
version = "0.1.0"
authors = ["Graphite Authors <contact@graphite.design>"]
edition = "2018"
readme = "../../README.md"
homepage = "https://www.graphite.design"
repository = "https://github.com/GraphiteEditor/Graphite"
license = "Apache-2.0"
[dependencies]

3
client/cli/README.md Normal file
View file

@ -0,0 +1,3 @@
# CLI headless client
This will be the official command line program for editing and rendering Graphite documents and assets. It acts as a stateless tool for calling the APIs of the document core library and the render engine core library. This is useful for automation through shell scripts, for example, rather than needing to write custom software to use the Graphite core libraries. Because the Graphite CLI tool does not rely on the editor core library, there is no concept of tools or state.

View file

@ -1,3 +0,0 @@
fn main() {
println!("Hello, Graphite!");
}

View file

@ -25,7 +25,7 @@ The main modules of the project architecture are outlined below. Some parts desc
- Native frontend: `/client/native/`
The future official desktop client. Blocked on Rust's GUI ecosystem improving or dedicating the time to build a custom system that can nicely support editor extensions. The whole GUI should use WGPU for rendering and compile to WASM to make those calls to the WebGPU API.
- CLI: `/client/cli/`
A headless, command line GDD document editor (using the Document Core Library) and GRD render graph renderer (using the Renderer Core Library). Not the initial focus of development, but perhaps useful in testing for certain features throughout the development process. A future version of the CLI will probably redesign the command structure.
A future headless, stateless, command line GDD document editor (using the Document Core Library) and GRD render graph renderer (using the Renderer Core Library).
- **Graphite Editor Core Library**: `/core/editor/`
Used by a frontend editor client to maintain GUI state and dispatch user events. The official Graphite editor is the primary user, but others software like game engines could embed their own customized editor implementations. Depends on the Document Core Library.
- Graphite Document Core Library: `/core/document/`