Skip to content

Commit

Permalink
Merge pull request #102 from paxproject/zb/package-refactor2
Browse files Browse the repository at this point in the history
Crate refactoring
  • Loading branch information
warfaj authored Feb 9, 2024
2 parents 1ad7cc7 + fc37837 commit f3b1fe1
Show file tree
Hide file tree
Showing 116 changed files with 347 additions and 382 deletions.
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "docs"]
path = docs
url = [email protected]:pax-lang/docs.git
url = [email protected]:pax-engine/docs.git
[submodule "www.pax.dev"]
path = www.pax.dev
url = [email protected]:pax-lang/www.pax.dev.git
url = [email protected]:pax-engine/www.pax.dev.git
2 changes: 1 addition & 1 deletion .idea/.idea/pax-lang.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/.idea/pax.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .idea/pax.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ We warmly welcome contributions! Pax is free and open source software, licensed
### Running the monorepo
Follow the *workstation* (e.g. macOS, Linux) and *target* (e.g. WebAssembly, macOS app) setup instructions here: https://docs.pax.dev/start-creating-a-project.html

The examples are an appropriate testbed for developing the monorepo. Any pending changes to e.g. `pax-core` will be reflected
The examples are an appropriate testbed for developing the monorepo. Any pending changes to e.g. `pax-runtime` will be reflected
when running examples. You can run any of the examples with the root monorepo command `cargo run --example fireworks`, or from inside one of the example directories you can use the bash script CLI surrogate: `cd examples/src/fireworks && ./pax run --target=web`

### Communicating with our team
Expand Down
5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ members = [
"pax-chassis-macos",
"pax-chassis-ios",
"pax-chassis-common",
"pax-lang",
"pax-core",
"pax-engine",
"pax-runtime",
"pax-macro",
"pax-message",
"pax-compiler",
"pax-runtime-api",
"pax-cli",
"pax-std",
"pax-std/pax-std-primitives",
Expand Down
8 changes: 4 additions & 4 deletions backlog-archive.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ _RIL means Rust Intermediate Language, which is the
[x] proof of concept (RIL) for timelines
[x] running on assumption that the problem is isomorphic to the Expression vtable problem
[x] proof of concept (RIL) for actions
[x] pax_lang::log
[x] pax_engine::log
[x] `Tick` support (wired up)
[x] pencil in `Click`, but don't worry about raycasting yet (or do naive raycasting?? easy to PoC!)
[x] sanity-check Repeat
Expand Down Expand Up @@ -280,12 +280,12 @@ _RIL means Rust Intermediate Language, which is the
-- this addresses compiler error `cannot infer type T for Rc<T>` (non-viable approach)
[x] Alternatively: hard-code a list of prelude types; treat as blacklist for re-exporting
-- note that this adds additional complexity/weakness around "global identifier" constraints, i.e. that as currently implemented, there can be no userland `**::**::Rc` or `**::**::Vec`
[-] Require fully qualified types inside Property<...>, like `Property<crate::SomeType>` or `Property<pax_lang::api::Color>`
[-] Require fully qualified types inside Property<...>, like `Property<crate::SomeType>` or `Property<pax_engine::api::Color>`
[-] Make Property types `Pathable` or similar, which exposes a method `get_module_path()` that invoked `module_path!()` internally
Then -- `pax` macro can invoke `get_module_path()` just like `parse_to_manifest`
(Evaluated at compiletime) `Color::_get_module_path()`
^ wrong -- this would be evaluated at `parser bin`-time
Which returns `pax_runtime_api::Color`
Which returns `pax_runtime::api::Color`
Which gets codegenned into `pub mod pax_reexports`
Checksum: does this resolve at the right time
MAYBE we still need two phases: one that parses template and property types, which allows codegen of `get_module_path` and `parse_to_manifest`
Expand Down Expand Up @@ -428,7 +428,7 @@ _RIL means Rust Intermediate Language, which is the
[x] support inline (in-file) component def. (as alternative to `#[pax_file]` file path)
[x] e2e `pax run`
[x] publication to crates.io
[x] reserve pax-lang crate on crates.io
[x] reserve pax-engine crate on crates.io
[x] update relative paths in all cargo.tomls, point to hard-coded published versions
- can include both a relative path & version number, a feature of Cargo for this exact use-case
[x] publish all crates
Expand Down
2 changes: 1 addition & 1 deletion docs
Submodule docs updated from 8569b2 to 37f467
4 changes: 2 additions & 2 deletions examples/src/camera/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
default-run = "run"

[dependencies]
pax-lang = { version = "0.11.5" }
pax-engine = { version = "0.11.5" }
pax-std = { version = "0.11.5" }
pax-compiler = { version = "0.11.5", optional = true}
pax-manifest = { version = "0.11.5" }
Expand All @@ -21,4 +21,4 @@ name = "run"
path = "bin/run.rs"

[features]
parser = ["pax-std/parser", "pax-lang/parser", "dep:serde_json", "dep:pax-compiler"]
parser = ["pax-std/parser", "pax-engine/parser", "dep:serde_json", "dep:pax-compiler"]
4 changes: 2 additions & 2 deletions examples/src/camera/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![allow(unused_imports)]
use pax_lang::api::{ArgsClick, EasingCurve, NodeContext, Property};
use pax_lang::Pax;
use pax_engine::api::{ArgsClick, EasingCurve, NodeContext, Property};
use pax_engine::Pax;
use pax_std::primitives::{Ellipse, Frame, Group, Rectangle, Text};

#[pax]
Expand Down
4 changes: 2 additions & 2 deletions examples/src/color-grid/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
default-run = "run"

[dependencies]
pax-lang = { version = "0.11.5" }
pax-engine = { version = "0.11.5" }
pax-std = { version = "0.11.5" }
pax-compiler = { version = "0.11.5", optional = true}
pax-manifest = { version = "0.11.5"}
Expand All @@ -21,4 +21,4 @@ name = "run"
path = "bin/run.rs"

[features]
parser = ["pax-std/parser", "pax-lang/parser", "dep:serde_json", "dep:pax-compiler"]
parser = ["pax-std/parser", "pax-engine/parser", "dep:serde_json", "dep:pax-compiler"]
4 changes: 2 additions & 2 deletions examples/src/color-grid/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![allow(unused_imports)]

use pax_lang::*;
use pax_lang::api::*;
use pax_engine::*;
use pax_engine::api::*;
use pax_std::primitives::*;
use pax_std::types::*;
use pax_std::types::text::*;
Expand Down
4 changes: 2 additions & 2 deletions examples/src/component_in_component/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
default-run = "run"

[dependencies]
pax-lang = { version = "0.11.5"}
pax-engine = { version = "0.11.5"}
pax-std = { version = "0.11.5"}
pax-compiler = { version = "0.11.5", optional = true}
pax-manifest = { version = "0.11.5"}
Expand All @@ -21,4 +21,4 @@ name = "run"
path = "bin/run.rs"

[features]
parser = ["pax-std/parser", "pax-lang/parser", "dep:serde_json", "dep:pax-compiler"]
parser = ["pax-std/parser", "pax-engine/parser", "dep:serde_json", "dep:pax-compiler"]
4 changes: 2 additions & 2 deletions examples/src/component_in_component/src/inner.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![allow(unused_imports)]

use pax_lang::api::*;
use pax_lang::*;
use pax_engine::api::*;
use pax_engine::*;
use pax_std::components::Stacker;
use pax_std::components::*;
use pax_std::primitives::*;
Expand Down
4 changes: 2 additions & 2 deletions examples/src/component_in_component/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

mod inner;
use inner::Inner;
use pax_lang::api::*;
use pax_lang::*;
use pax_engine::api::*;
use pax_engine::*;
use pax_std::components::Stacker;
use pax_std::components::*;
use pax_std::primitives::*;
Expand Down
10 changes: 5 additions & 5 deletions examples/src/fireworks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ edition = "2021"
default-run = "run"

[dependencies]
pax-lang = { version = "0.11.5"}
pax-std = { version = "0.11.5"}
pax-compiler = { version = "0.11.5", optional = true}
pax-manifest = { version = "0.11.5"}
pax-engine = { version = "0.11.5", path = ".pax/pkg/pax-engine" }
pax-std = { version = "0.11.5", path = ".pax/pkg/pax-std" }
pax-compiler = { version = "0.11.5", optional = true, path = ".pax/pkg/pax-compiler" }
pax-manifest = { version = "0.11.5", path = ".pax/pkg/pax-manifest" }
serde_json = {version = "1.0.95", optional = true}

[[bin]]
Expand All @@ -21,4 +21,4 @@ name = "run"
path = "bin/run.rs"

[features]
parser = ["pax-std/parser", "pax-lang/parser", "dep:serde_json", "dep:pax-compiler"]
parser = ["pax-std/parser", "pax-engine/parser", "dep:serde_json", "dep:pax-compiler"]
4 changes: 2 additions & 2 deletions examples/src/fireworks/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![allow(unused_imports)]
use pax_lang::api::{ArgsClick, ArgsWheel, EasingCurve, NodeContext};
use pax_lang::*;
use pax_engine::api::{ArgsClick, ArgsWheel, EasingCurve, NodeContext};
use pax_engine::*;
use pax_std::primitives::{Ellipse, Frame, Group, Path, Rectangle, Text};

#[pax]
Expand Down
4 changes: 2 additions & 2 deletions examples/src/grids/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
default-run = "run"

[dependencies]
pax-lang = { version = "0.11.5"}
pax-engine = { version = "0.11.5"}
pax-std = { version = "0.11.5"}
pax-compiler = { version = "0.11.5", optional = true}
pax-manifest = { version = "0.11.5"}
Expand All @@ -21,4 +21,4 @@ name = "run"
path = "bin/run.rs"

[features]
parser = ["pax-std/parser", "pax-lang/parser", "dep:serde_json", "dep:pax-compiler"]
parser = ["pax-std/parser", "pax-engine/parser", "dep:serde_json", "dep:pax-compiler"]
4 changes: 2 additions & 2 deletions examples/src/grids/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use pax_lang::api::*;
use pax_lang::*;
use pax_engine::api::*;
use pax_engine::*;
use pax_std::primitives::{Ellipse, Frame, Group, Path, Rectangle, Text};
use pax_std::components::{Stacker};
use pax_std::types::{Color, StackerDirection};
Expand Down
4 changes: 2 additions & 2 deletions examples/src/hello-rgb/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
default-run = "run"

[dependencies]
pax-lang = { version = "0.11.5" }
pax-engine = { version = "0.11.5" }
pax-std = { version = "0.11.5" }
pax-compiler = { version = "0.11.5", optional = true}
pax-manifest = { version = "0.11.5"}
Expand All @@ -21,4 +21,4 @@ name = "run"
path = "bin/run.rs"

[features]
parser = ["pax-std/parser", "pax-lang/parser", "dep:serde_json", "dep:pax-compiler"]
parser = ["pax-std/parser", "pax-engine/parser", "dep:serde_json", "dep:pax-compiler"]
4 changes: 2 additions & 2 deletions examples/src/hello-rgb/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use pax_lang::api::*;
use pax_lang::*;
use pax_engine::api::*;
use pax_engine::*;
use pax_std::primitives::{Ellipse, Frame, Group, Path, Rectangle, Text};

#[pax]
Expand Down
4 changes: 2 additions & 2 deletions examples/src/layer-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
default-run = "run"

[dependencies]
pax-lang = { version = "0.11.5"}
pax-engine = { version = "0.11.5"}
pax-std = { version = "0.11.5"}
pax-compiler = { version = "0.11.5", optional = true}
pax-manifest = { version = "0.11.5"}
Expand All @@ -21,4 +21,4 @@ name = "run"
path = "bin/run.rs"

[features]
parser = ["pax-std/parser", "pax-lang/parser", "dep:serde_json", "dep:pax-compiler"]
parser = ["pax-std/parser", "pax-engine/parser", "dep:serde_json", "dep:pax-compiler"]
4 changes: 2 additions & 2 deletions examples/src/layer-tests/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![allow(unused_imports)]

use pax_lang::api::*;
use pax_lang::*;
use pax_engine::api::*;
use pax_engine::*;
use pax_std::components::Stacker;
use pax_std::components::*;
use pax_std::primitives::*;
Expand Down
4 changes: 2 additions & 2 deletions examples/src/one-rect/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
default-run = "run"

[dependencies]
pax-lang = { version = "0.11.5"}
pax-engine = { version = "0.11.5"}
pax-std = { version = "0.11.5"}
pax-compiler = { version = "0.11.5", optional = true}
pax-manifest = { version = "0.11.5"}
Expand All @@ -21,4 +21,4 @@ name = "run"
path = "bin/run.rs"

[features]
parser = ["pax-std/parser", "pax-lang/parser", "dep:serde_json", "dep:pax-compiler"]
parser = ["pax-std/parser", "pax-engine/parser", "dep:serde_json", "dep:pax-compiler"]
4 changes: 2 additions & 2 deletions examples/src/one-rect/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![allow(unused_imports)]

use pax_lang::*;
use pax_lang::api::*;
use pax_engine::*;
use pax_engine::api::*;
use pax_std::primitives::*;
use pax_std::types::*;
use pax_std::types::text::*;
Expand Down
4 changes: 2 additions & 2 deletions examples/src/paths/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
default-run = "run"

[dependencies]
pax-lang = { version = "0.11.5"}
pax-engine = { version = "0.11.5"}
pax-std = { version = "0.11.5"}
pax-compiler = { version = "0.11.5", optional = true}
pax-manifest = { version = "0.11.5"}
Expand All @@ -21,4 +21,4 @@ name = "run"
path = "bin/run.rs"

[features]
parser = ["pax-std/parser", "pax-lang/parser", "dep:serde_json", "dep:pax-compiler"]
parser = ["pax-std/parser", "pax-engine/parser", "dep:serde_json", "dep:pax-compiler"]
4 changes: 2 additions & 2 deletions examples/src/paths/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![allow(unused_imports)]

use pax_lang::api::*;
use pax_lang::*;
use pax_engine::api::*;
use pax_engine::*;
use pax_std::components::Stacker;
use pax_std::components::*;
use pax_std::primitives::*;
Expand Down
4 changes: 2 additions & 2 deletions examples/src/pax-intro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
default-run = "run"

[dependencies]
pax-lang = { version = "0.11.5", path = ".pax/pkg/pax-lang" }
pax-engine = { version = "0.11.5", path = ".pax/pkg/pax-engine" }
pax-std = { version = "0.11.5", path = ".pax/pkg/pax-std" }
pax-compiler = { version = "0.11.5", optional = true, path = ".pax/pkg/pax-compiler" }
pax-manifest = { version = "0.11.5", optional = true, path = ".pax/pkg/pax-manifest" }
Expand All @@ -21,4 +21,4 @@ name = "run"
path = "bin/run.rs"

[features]
parser = ["pax-std/parser", "pax-lang/parser", "dep:serde_json", "dep:pax-compiler", "dep:pax-manifest"]
parser = ["pax-std/parser", "pax-engine/parser", "dep:serde_json", "dep:pax-compiler", "dep:pax-manifest"]
4 changes: 2 additions & 2 deletions examples/src/pax-intro/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![allow(unused_imports)]

use pax_lang::api::*;
use pax_lang::*;
use pax_engine::api::*;
use pax_engine::*;
use pax_std::components::Stacker;
use pax_std::components::*;
use pax_std::primitives::*;
Expand Down
4 changes: 2 additions & 2 deletions examples/src/playground/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
default-run = "run"

[dependencies]
pax-lang = { version = "0.11.5"}
pax-engine = { version = "0.11.5"}
pax-std = { version = "0.11.5"}
pax-compiler = { version = "0.11.5", optional = true}
pax-manifest = { version = "0.11.5"}
Expand All @@ -21,4 +21,4 @@ name = "run"
path = "bin/run.rs"

[features]
parser = ["pax-std/parser", "pax-lang/parser", "dep:serde_json", "dep:pax-compiler"]
parser = ["pax-std/parser", "pax-engine/parser", "dep:serde_json", "dep:pax-compiler"]
4 changes: 2 additions & 2 deletions examples/src/playground/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![allow(unused_imports)]

use pax_lang::api::*;
use pax_lang::*;
use pax_engine::api::*;
use pax_engine::*;
use pax_std::components::Stacker;
use pax_std::components::*;
use pax_std::primitives::*;
Expand Down
Loading

0 comments on commit f3b1fe1

Please sign in to comment.