-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update parallel raytracing .gitignore (#3606)
- Loading branch information
1 parent
ba244b9
commit 792be2d
Showing
14 changed files
with
142 additions
and
48 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/usr/bin/env python3 | ||
import os | ||
import subprocess | ||
|
||
root_dir = os.path.dirname(__file__) | ||
|
||
# A couple of steps are necessary to get this build working which makes it slightly | ||
# nonstandard compared to most other builds. | ||
# | ||
# * First, the Rust standard library needs to be recompiled with atomics | ||
# enabled. to do that we use Cargo's unstable `-Zbuild-std` feature. | ||
# | ||
# * Next we need to compile everything with the `atomics` and `bulk-memory` | ||
# features enabled, ensuring that LLVM will generate atomic instructions, | ||
# shared memory, passive segments, etc. | ||
|
||
os.environ.update( | ||
{"RUSTFLAGS": "-C target-feature=+atomics,+bulk-memory,+mutable-globals"} | ||
) | ||
|
||
subprocess.run( | ||
[ | ||
"cargo", | ||
"build", | ||
"--target", | ||
"wasm32-unknown-unknown", | ||
"--release", | ||
"-Zbuild-std=std,panic_abort", | ||
], | ||
cwd=root_dir, | ||
).check_returncode() | ||
|
||
# Note the usage of `--target no-modules` here which is required for passing | ||
# the memory import to each wasm module. | ||
subprocess.run( | ||
[ | ||
"cargo", | ||
"run", | ||
"-p", | ||
"wasm-bindgen-cli", | ||
"--", | ||
os.path.join( | ||
root_dir, | ||
"..", | ||
"..", | ||
"target", | ||
"wasm32-unknown-unknown", | ||
"release", | ||
"raytrace_parallel.wasm", | ||
), | ||
"--out-dir", | ||
os.path.join(root_dir, "pkg"), | ||
"--target", | ||
"no-modules", | ||
], | ||
cwd=root_dir, | ||
).check_returncode() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env python3 | ||
import os | ||
import subprocess | ||
|
||
root_dir = os.path.dirname(__file__) | ||
|
||
subprocess.run(["python3", "build.py"], cwd=root_dir).check_returncode() | ||
|
||
subprocess.run(["python3", "server.py"], cwd=root_dir).check_returncode() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,6 @@ | |
|
||
set -ex | ||
|
||
./build.sh | ||
python3 build.py | ||
|
||
python3 server.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/usr/bin/env python3 | ||
import os | ||
import subprocess | ||
|
||
root_dir = os.path.dirname(__file__) | ||
|
||
# A couple of steps are necessary to get this build working which makes it slightly | ||
# nonstandard compared to most other builds. | ||
# | ||
# * First, the Rust standard library needs to be recompiled with atomics | ||
# enabled. to do that we use Cargo's unstable `-Zbuild-std` feature. | ||
# | ||
# * Next we need to compile everything with the `atomics` and `bulk-memory` | ||
# features enabled, ensuring that LLVM will generate atomic instructions, | ||
# shared memory, passive segments, etc. | ||
|
||
os.environ.update( | ||
{"RUSTFLAGS": "-C target-feature=+atomics,+bulk-memory,+mutable-globals"} | ||
) | ||
|
||
subprocess.run( | ||
[ | ||
"cargo", | ||
"build", | ||
"--target", | ||
"wasm32-unknown-unknown", | ||
"--release", | ||
"-Zbuild-std=std,panic_abort", | ||
], | ||
cwd=root_dir, | ||
).check_returncode() | ||
|
||
# Note the usage of `--target no-modules` here which is required for passing | ||
# the memory import to each wasm module. | ||
subprocess.run( | ||
[ | ||
"cargo", | ||
"run", | ||
"-p", | ||
"wasm-bindgen-cli", | ||
"--", | ||
os.path.join( | ||
root_dir, | ||
"..", | ||
"..", | ||
"target", | ||
"wasm32-unknown-unknown", | ||
"release", | ||
"wasm_audio_worklet.wasm", | ||
), | ||
"--out-dir", | ||
os.path.join(root_dir, "pkg"), | ||
"--target", | ||
"web", | ||
"--split-linked-modules", | ||
], | ||
cwd=root_dir, | ||
).check_returncode() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env python3 | ||
import os | ||
import subprocess | ||
|
||
root_dir = os.path.dirname(__file__) | ||
|
||
subprocess.run(["python3", "build.py"], cwd=root_dir).check_returncode() | ||
|
||
subprocess.run(["python3", "server.py"], cwd=root_dir).check_returncode() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,6 @@ | |
|
||
set -ex | ||
|
||
./build.sh | ||
python3 build.py | ||
|
||
python3 server.py |