Skip to content

Commit

Permalink
fix macos and ios builds (but they currently crash on init)
Browse files Browse the repository at this point in the history
  • Loading branch information
zackbrown committed Nov 21, 2024
1 parent 51dbc3a commit e99baa2
Show file tree
Hide file tree
Showing 22 changed files with 24 additions and 3 deletions.
1 change: 1 addition & 0 deletions examples/src/breakout/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ pax-kit = { version = "0.38.3", path="../../../pax-kit" }

[lib]
crate-type = ["cdylib", "rlib"]
name = "paxcartridge"

[[bin]]
name = "parser"
Expand Down
1 change: 1 addition & 0 deletions examples/src/calculator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ pax-kit = { version = "0.38.3", path="../../../pax-kit" }

[lib]
crate-type = ["cdylib", "rlib"]
name = "paxcartridge"

[[bin]]
name = "parser"
Expand Down
1 change: 1 addition & 0 deletions examples/src/color-picker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ pax-kit = { version = "0.38.3", path="../../../pax-kit" }

[lib]
crate-type = ["cdylib", "rlib"]
name = "paxcartridge"

[[bin]]
name = "parser"
Expand Down
1 change: 1 addition & 0 deletions examples/src/fireworks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ pax-kit = { version = "0.38.3", path="../../../pax-kit" }

[lib]
crate-type = ["cdylib", "rlib"]
name = "paxcartridge"

[[bin]]
name = "parser"
Expand Down
2 changes: 1 addition & 1 deletion examples/src/fireworks/src/fireworks.pax
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Group @wheel=self.handle_wheel>
<Group @wheel=self.handle_wheel y=50.00% x=50.00% width=7.98% height=13.92%>
<Text x=0% y=0% text="SCROLL" height=100% width=100% style={
font: Font::Web(
"Roboto",
Expand Down
1 change: 1 addition & 0 deletions examples/src/game-of-life/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ pax-kit = { version = "0.38.3", path="../../../pax-kit" }

[lib]
crate-type = ["cdylib", "rlib"]
name = "paxcartridge"

[[bin]]
name = "parser"
Expand Down
1 change: 1 addition & 0 deletions examples/src/increment/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ pax-kit = { version = "0.38.3", path="../../../pax-kit" }

[lib]
crate-type = ["cdylib", "rlib"]
name = "paxcartridge"

[[bin]]
name = "parser"
Expand Down
1 change: 1 addition & 0 deletions examples/src/llm-interface/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ getrandom = { version = "0.2.15", features = ["js"] }

[lib]
crate-type = ["cdylib", "rlib"]
name = "paxcartridge"

[[bin]]
name = "parser"
Expand Down
1 change: 1 addition & 0 deletions examples/src/marketing-site/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ getrandom = { version = "0.2.15", features = ["js"] }

[lib]
crate-type = ["cdylib", "rlib"]
name = "paxcartridge"

[[bin]]
name = "parser"
Expand Down
1 change: 1 addition & 0 deletions examples/src/mouse-animation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ pax-kit = { version = "0.38.3", path="../../../pax-kit" }

[lib]
crate-type = ["cdylib", "rlib"]
name = "paxcartridge"

[[bin]]
name = "parser"
Expand Down
1 change: 1 addition & 0 deletions examples/src/particles/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pax-kit = { version = "0.38.3", path="../../../pax-kit" }

[lib]
crate-type = ["cdylib", "rlib"]
name = "paxcartridge"

[[bin]]
name = "parser"
Expand Down
1 change: 1 addition & 0 deletions examples/src/perf-testbed/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ getrandom = { version = "0.2.15", features = ["js"] }

[lib]
crate-type = ["cdylib", "rlib"]
name = "paxcartridge"

[[bin]]
name = "parser"
Expand Down
1 change: 1 addition & 0 deletions examples/src/slot-particles/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ fireworks = {version = "0.36.3", path="../fireworks" }

[lib]
crate-type = ["cdylib", "rlib"]
name = "paxcartridge"

[[bin]]
name = "parser"
Expand Down
1 change: 1 addition & 0 deletions examples/src/space-game/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pax-kit = { version = "0.38.3", path="../../../pax-kit" }

[lib]
crate-type = ["cdylib", "rlib"]
name = "paxcartridge"

[[bin]]
name = "parser"
Expand Down
1 change: 1 addition & 0 deletions examples/src/starter-project/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ space-game = { version = "0.38.3", path="../space-game" }

[lib]
crate-type = ["cdylib", "rlib"]
name = "paxcartridge"

[[bin]]
name = "parser"
Expand Down
1 change: 1 addition & 0 deletions pax-chassis-common/src/core_graphics_c_bridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ pub extern "C" fn pax_tick(
(
CoreGraphicsContext::new_y_up(ctx, height as f64, None),
Box::new(|| (/* clear screen here */)),
Box::new(|| (/* handle resize here */)),
)
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ getrandom = { version = "0.2.15", features = ["js"] }

[lib]
crate-type = ["cdylib", "rlib"]
name = "paxcartridge"

[[bin]]
name = "parser"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ getrandom = { version = "0.2.15", features = ["js"] }

[lib]
crate-type = ["cdylib", "rlib"]
name = "paxcartridge"

[[bin]]
name = "parser"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ pax-kit = { version = "0.38.3", path="../../../../../pax-kit" }

[lib]
crate-type = ["cdylib", "rlib"]
name = "paxcartridge"

[[bin]]
name = "parser"
Expand Down
1 change: 1 addition & 0 deletions pax-generation/generated_project/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ getrandom = { version = "0.2.15", features = ["js"] }

[lib]
crate-type = ["cdylib", "rlib"]
name = "paxcartridge"

[[bin]]
name = "parser"
Expand Down
5 changes: 3 additions & 2 deletions pax-macro/templates/derive_pax.stpl
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@
<%= engine_import_path %>::pax_chassis_common::env_logger::init();

let manifest = init_manifest();
let definition_to_instance_traverser = init_definition_to_instance_traverser(manifest);
let definition_to_instance_traverser = init_definition_to_instance_traverser(manifest.clone());

let main_component_instance = definition_to_instance_traverser.get_main_component();
let main_component_instance = definition_to_instance_traverser.get_main_component(&manifest.main_component_type_id.to_string());

//Initialize a ManuallyDrop-contained PaxEngine, so that a pointer to that
//engine can be passed back to Swift via the C (FFI) bridge
Expand All @@ -115,6 +115,7 @@
OS::Mac,
#[cfg(feature="ios")]
OS::IPhone,
Box::new(||{ /* return elapsed millis here */ 0 })
)));

let container = std::mem::ManuallyDrop::new(Box::new(<%= engine_import_path %>::pax_chassis_common::core_graphics_c_bridge::PaxEngineContainer {
Expand Down
1 change: 1 addition & 0 deletions tests/src/playground/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ pax-designtime = {version = "0.23.0", path="../../../pax-designtime"}

[lib]
crate-type = ["cdylib", "rlib"]
name = "paxcartridge"

[[bin]]
name = "parser"
Expand Down

0 comments on commit e99baa2

Please sign in to comment.