-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bootstrap flutter_webrtc + rust + libwebrtc toolchain (#4) #5
Conversation
FCM
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@logist322 one thing should be done more wisely.
Makefile
Outdated
# make deps.thirdparty | ||
deps.thirdparty: | ||
mkdir -p temp && \ | ||
curl -L -o temp/libwebrtc-win-x64.tar.gz $(LIBWEBRTC_URL)/libwebrtc-win-x64.tar.gz && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be implementent in build.rs
of libwertc-sys
crate and the link controlled via env var. Keeping it in Makefile
only complicates stuff.
crates/libwebrtc-sys/build.rs
Outdated
fn main() { | ||
let path = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap()); | ||
#[rustfmt::skip] | ||
let libwebrtc_url = "https://github.com/instrumentisto/libwebrtc-bin/releases/download/97.4692.0.0-r0"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be implementent in build.rs of libwertc-sys crate and the link controlled via env var.
and the link controlled via env var
env var
crates/native/.gitignore
Outdated
@@ -0,0 +1 @@ | |||
target/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Newline добавьте в конец. По хорошему, IDE'шка должна сама это уметь.
Вы этот .gitignore
выкосили, что логично, так как крейт в вокрспейсе, и /target
лежит не тут. Но тут немного другая история, мы в build.rs
вот такое делаем:
cbindgen::generate_with_config(&crate_dir, config)
.unwrap()
.write_to_file(format!("target/{}.hpp", package_name));
Ложить хедеры в корневой target
не получается, так как переменная CARGO_BUILD_TARGET_DIR
не прокидывается, по неизвестной причине, а хардкодить ../../target
не хочется, но можем, если Вы за такое решение.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tyranron it's better to investigate what's the problem with CARGO_BUILD_TARGET_DIR
. It should be working OK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make cargo export CARGO_TARGET_DIR to build.rs scripts
Build scripts are intended to have a very scoped output (just in their OUT_DIR), and they're not currently really intended to be used as installation scripts for other sorts of files. In that sense this change was never intended for build scripts.
rust-lang/cargo#7325 (comment)
А OUT_DIR
это вот: /flutter-webrtc/target/debug/build/flutter-webrtc-native-621c22406cba9de9/out
. Бахаю От нее и пойдем вверх до ../../target
./target
.
@logist322 don't use And also don't use |
Synopsis
Этот PR добавляет необходимый toolchain для разработки
flutter-webrtc
под WIndows.Checklist
Draft:
prefixk::
labels appliedDraft:
prefix is removed