Skip to content

Commit

Permalink
v0.1.6-alpha.20
Browse files Browse the repository at this point in the history
  • Loading branch information
ahaoboy committed Feb 26, 2024
1 parent e09b4b8 commit 2ddfa58
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 16 deletions.
24 changes: 17 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,29 @@ jobs:
rustflags: "-A warnings"
toolchain: "nightly"

- name: build deno
run: |
cd ./mpv-deno
cargo build --release --out-dir=./output -Z unstable-options
cd ..
mv ./mpv-deno/output/mpv_deno.dll ./mpv-deno-windows.dll
- name: build ext
run: |
cd ./mpv-rs-ext
cargo build --release --out-dir=./output -Z unstable-options
cd ..
mv ./mpv-rs-ext/output/rs-ext.exe ./rs-ext-windows
- name: build deno
run: |
rustup target add nightly-x86_64-pc-windows-msvc
rustup toolchain install nightly-x86_64-pc-windows-msvc
rustup default nightly-x86_64-pc-windows-msvc
rustup set default-host nightly-x86_64-pc-windows-msvc
rustup override set nightly-x86_64-pc-windows-msvc
rustc --version
cd ./mpv-deno
cargo build --release --out-dir=./output -Z unstable-options
cd ..
mv ./mpv-deno/output/mpv_deno.dll ./mpv-deno-windows.dll
- uses: msys2/setup-msys2@v2
- shell: msys2 {0}
run: |
Expand All @@ -56,6 +65,7 @@ jobs:
rustup default nightly-x86_64-pc-windows-gnu
rustup set default-host x86_64-pc-windows-gnu
rustup override set nightly-x86_64-pc-windows-gnu
rustc --version
cd ./mpv-qjs
cargo build --release --out-dir=./output -Z unstable-options
Expand Down
12 changes: 6 additions & 6 deletions mpv-deno/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ deno_core = "0.264.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

[profile.release]
debug = false
lto = true
strip = true
opt-level = "s"
codegen-units = 1
# [profile.release]
# debug = false
# lto = true
# strip = true
# opt-level = "s"
# codegen-units = 1
2 changes: 0 additions & 2 deletions mpv-deno/src/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ pub unsafe fn run_mp_scripts() {

for (path, rt) in GLOBAL_INSTANCE.as_mut().unwrap() {
let script_code = std::fs::read_to_string(path).unwrap();
println!("script_code: {}", script_code);
let script_code = ModuleCodeString::from(script_code);
let polyfill_code = ModuleCodeString::from(polyfill_code.to_string());

Expand All @@ -98,7 +97,6 @@ pub unsafe fn run_mp_scripts() {
return;
}
_ => {
println!("========");
for (_, rt) in GLOBAL_INSTANCE.as_mut().unwrap() {
rt.execute_script_static("<loop>", "globalThis.__mp_tick?.()")
.unwrap();
Expand Down
2 changes: 1 addition & 1 deletion mpv-qjs/src/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ pub unsafe fn run_mp_scripts() {
}

loop {
let event = wait_event(1.);
let event = wait_event(0.01);
match event {
Event::Shutdown => {
return;
Expand Down

0 comments on commit 2ddfa58

Please sign in to comment.