Skip to content

Conversation

NickeZ
Copy link
Collaborator

@NickeZ NickeZ commented Sep 8, 2025

depends on #1585

@benma when you review this, can you please test that it builds/runs on your linux machine? (I only tested macos)

@NickeZ NickeZ force-pushed the nickez/simulator-sdl2 branch from 3f328ee to 089720a Compare September 8, 2025 12:58
@NickeZ NickeZ requested a review from benma September 8, 2025 12:59
@NickeZ NickeZ force-pushed the nickez/simulator-sdl2 branch 7 times, most recently from 0255144 to f761b2c Compare September 8, 2025 16:28
@NickeZ NickeZ marked this pull request as draft September 9, 2025 10:06
@NickeZ NickeZ force-pushed the nickez/simulator-sdl2 branch 6 times, most recently from 04beca0 to 6a3cad2 Compare September 10, 2025 11:20
@NickeZ NickeZ marked this pull request as ready for review September 10, 2025 11:20
rust-SDL2 is vendored because the upstream crate vendors the whole
C library (some 20k lines of code) which we can't use.
@NickeZ NickeZ force-pushed the nickez/simulator-sdl2 branch from 6a3cad2 to b99212d Compare September 12, 2025 08:44
@benma
Copy link
Collaborator

benma commented Sep 15, 2025

Regarding the sdl2 submodule: you don't need to make it a submodule, you can just add it as a git dependency in Cargo.toml, for example like we do here:

bip32-ed25519 = { git = "https://github.com/BitBoxSwiss/rust-bip32-ed25519", tag = "v0.2.1", optional = true }

Or was there a specific reason for not doing it that way?

(The reason I noticed is that the build now spits out warnings of the sdl crate, which it would not do I believe if it treated as an external/git dep)

@benma
Copy link
Collaborator

benma commented Sep 15, 2025

@benma when you review this, can you please test that it builds/runs on your linux machine? (I only tested macos)

It works! Though it crashes when trying to sign a BTC tx in send_message:

Exception: Did not read anything after 5000 seconds.

I did not wait 5000 seconds 😂

@NickeZ
Copy link
Collaborator Author

NickeZ commented Sep 15, 2025

@benma when you review this, can you please test that it builds/runs on your linux machine? (I only tested macos)

It works! Though it crashes when trying to sign a BTC tx in send_message:

Exception: Did not read anything after 5000 seconds.

I did not wait 5000 seconds 😂

interesting, should probably run it in gdb and see where the segfault is :P

@NickeZ
Copy link
Collaborator Author

NickeZ commented Sep 15, 2025

Regarding the sdl2 submodule: you don't need to make it a submodule, you can just add it as a git dependency in Cargo.toml, for example like we do here:

bip32-ed25519 = { git = "https://github.com/BitBoxSwiss/rust-bip32-ed25519", tag = "v0.2.1", optional = true }

Or was there a specific reason for not doing it that way?

(The reason I noticed is that the build now spits out warnings of the sdl crate, which it would not do I believe if it treated as an external/git dep)

I'll look into it. I just wanted to avoid vendoring the crate because it includes the SDL sources (thousands of c-files...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants