str0m icon indicating copy to clipboard operation
str0m copied to clipboard

Problems running str0m examples on windows

Open ValorZard opened this issue 8 months ago • 7 comments

Hello! I'm having a lot of difficults trying to build the openssl dependency for str0m for whatever reason. I want to run the chat example, but cargo chokes on building openssl (probably because of something weird happening with strawberry perl).

C:\github\str0m>cargo run --example chat
   Compiling openssl-sys v0.9.107
    Building [======================>  ] 174/183: openssl-sys(build)

I WANT to switch to using wincrypto, but even running with wincrypto still causes the same issue

C:\github\str0m>cargo run --features wincrypto --example chat
   Compiling openssl-sys v0.9.107
    Building [======================>  ] 181/190: openssl-sys(build)

I'm really not sure what to do here

ValorZard avatar Apr 13 '25 20:04 ValorZard

Disable default features then enable wincrypto

xnorpx avatar Apr 13 '25 21:04 xnorpx

C:\github\str0m>cargo run  --no-default-features --features wincrypto --example chat
error: target `chat` in package `str0m` requires the features: `openssl`
Consider enabling them by passing, e.g., `--features="openssl"`

C:\github\str0m>```

ValorZard avatar Apr 13 '25 21:04 ValorZard

Yeah not sure about the chat example. That might require you to setup OpenSSL properly on your machine.

xnorpx avatar Apr 13 '25 21:04 xnorpx

@ValorZard I wonder if that really needs openssl. In Cargo.toml you find this:

[[example]]
name = "chat"
required-features = ["openssl"]

[[example]]
name = "http-post"
required-features = ["openssl"]

What happens if you just remove openssl there?

algesten avatar Apr 14 '25 07:04 algesten

Doing this worked @algesten

Image

I did the same thing to the http-post example and it worked just fine too

Image

ValorZard avatar Apr 15 '25 03:04 ValorZard

Right. Hm. Wonder if we should adjust this in documentation or try to make it work automatically? 🤔

algesten avatar Apr 15 '25 09:04 algesten

@algesten making this work automatically would be amazing ngl alternatively, have you thought about adding something like mbedTLS? thats one of the libraries libdatachannel uses for TLS related stuff

ValorZard avatar Apr 16 '25 00:04 ValorZard