2019-04-28 01:15:43 +00:00
|
|
|
[workspace]
|
|
|
|
members = [
|
2019-04-28 06:08:59 +00:00
|
|
|
"core",
|
2019-12-08 04:53:36 +00:00
|
|
|
"core/macros",
|
2022-06-15 19:00:17 +00:00
|
|
|
"core/build_playerglobal",
|
2019-04-28 01:15:43 +00:00
|
|
|
"desktop",
|
2019-10-03 01:58:58 +00:00
|
|
|
"swf",
|
2023-06-24 00:31:52 +00:00
|
|
|
"flv",
|
2019-10-11 14:19:18 +00:00
|
|
|
"web",
|
2022-04-02 02:41:44 +00:00
|
|
|
"web/packages/extension/safari",
|
2022-03-23 14:52:55 +00:00
|
|
|
"wstr",
|
2019-10-11 14:19:18 +00:00
|
|
|
"scanner",
|
2020-05-05 13:27:10 +00:00
|
|
|
"exporter",
|
2020-04-23 22:04:07 +00:00
|
|
|
|
2024-04-03 22:16:03 +00:00
|
|
|
"frontend-utils",
|
|
|
|
|
2022-08-13 22:52:16 +00:00
|
|
|
"render",
|
2020-04-23 22:04:07 +00:00
|
|
|
"render/canvas",
|
render: Add 'naga-agal' crate to compile AGAL shaders to Naga
This is the first part of the Stage3D implementation, and can
be reviewed independently.
Stage3D shaders use the Adobe Graphics Assembly Language (AGAL),
which is a binary shader format. It supports vertex attributes,
varying registers, program constants (uniforms), and texture sampling.
This PR only implements a few parts of AGAL:
* The 'mov' and 'm44' opcodes
* Vertex attributes, varying registers, program constants, and 'output'
registers (position or color, depending on shader type)
This is sufficient to get a non-trivial Stage3D program
running (the rotating cube demo from the Adobe docs).
The output of `naga-agal` is a `naga::Module`. This can be passed
directly to wgpu, or compiled into a shader language using
a Naga backend (glsl, wgsl, SPIR-V, etc). The test suite
output WGSL files, and uses the 'insta' crate to compare against
saved files on disk.
Currently, the only real way to write AGAL bytecode is using
the Adobe-provided 'AGALMiniAssembler' flash class.
This class assembles the textual reprentation of AGAL into
the binary format.
To make writing tests easier, I've added a 'agal_compiler' test, which
can easily be modified to add more Agal textual assembly.
2022-09-23 00:44:49 +00:00
|
|
|
"render/naga-agal",
|
2020-04-21 13:32:50 +00:00
|
|
|
"render/wgpu",
|
2020-04-25 02:38:58 +00:00
|
|
|
"render/webgl",
|
2021-05-03 04:30:18 +00:00
|
|
|
|
2023-07-09 21:04:25 +00:00
|
|
|
"ruffle_gc_arena",
|
|
|
|
|
2024-01-21 19:24:45 +00:00
|
|
|
"stub-report",
|
|
|
|
|
2022-08-25 22:03:09 +00:00
|
|
|
"video",
|
2022-08-25 22:30:07 +00:00
|
|
|
"video/software",
|
2023-12-21 11:58:57 +00:00
|
|
|
"video/external",
|
2022-08-25 22:03:09 +00:00
|
|
|
|
2021-05-03 04:30:18 +00:00
|
|
|
"tests",
|
2022-03-08 04:44:36 +00:00
|
|
|
"tests/input-format",
|
2023-07-21 15:27:44 +00:00
|
|
|
"tests/socket-format",
|
2023-07-23 15:57:01 +00:00
|
|
|
"tests/mocket",
|
2023-11-09 11:34:32 +00:00
|
|
|
"tests/framework",
|
2019-04-28 01:15:43 +00:00
|
|
|
]
|
2023-04-08 09:48:46 +00:00
|
|
|
default-members = ["desktop"]
|
2021-04-23 08:02:08 +00:00
|
|
|
resolver = "2"
|
2020-02-12 23:43:58 +00:00
|
|
|
|
2022-10-14 10:09:22 +00:00
|
|
|
[workspace.package]
|
2022-12-16 23:09:19 +00:00
|
|
|
authors = ["Ruffle LLC <ruffle@ruffle.rs>"]
|
2022-10-14 10:09:22 +00:00
|
|
|
edition = "2021"
|
2022-12-16 23:09:19 +00:00
|
|
|
homepage = "https://ruffle.rs"
|
|
|
|
license = "MIT OR Apache-2.0"
|
|
|
|
repository = "https://github.com/ruffle-rs/ruffle"
|
|
|
|
version = "0.1.0"
|
2022-10-14 10:09:22 +00:00
|
|
|
|
2023-01-04 00:06:57 +00:00
|
|
|
[workspace.dependencies]
|
2023-10-23 00:22:08 +00:00
|
|
|
tracing = "0.1.40"
|
2023-11-20 01:54:50 +00:00
|
|
|
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
|
2024-04-30 09:20:07 +00:00
|
|
|
naga = { version = "0.20.0", features = ["wgsl-out"] }
|
2024-06-13 14:04:21 +00:00
|
|
|
wgpu = "0.20.1"
|
2024-07-05 10:26:33 +00:00
|
|
|
egui = "0.28.1"
|
2024-07-01 22:51:23 +00:00
|
|
|
clap = { version = "4.5.8", features = ["derive"] }
|
2024-01-21 19:24:45 +00:00
|
|
|
anyhow = "1.0"
|
2024-03-01 21:09:00 +00:00
|
|
|
slotmap = "1.0.7"
|
2024-05-16 22:26:41 +00:00
|
|
|
async-channel = "2.3.1"
|
2024-07-01 22:51:23 +00:00
|
|
|
bitflags = "2.6.0"
|
2024-06-24 20:35:39 +00:00
|
|
|
bytemuck = "1.16.1"
|
2024-04-15 21:17:37 +00:00
|
|
|
chrono = { version = "0.4.38", default-features = false }
|
2024-04-04 11:45:27 +00:00
|
|
|
enum-map = "2.7.3"
|
2024-04-29 20:53:43 +00:00
|
|
|
flate2 = "1.0.30"
|
2024-04-04 11:53:13 +00:00
|
|
|
futures = "0.3.30"
|
2024-04-08 20:55:16 +00:00
|
|
|
image = { version = "0.25.1", default-features = false }
|
2024-04-04 11:55:46 +00:00
|
|
|
js-sys = "0.3.69"
|
2024-04-04 11:56:55 +00:00
|
|
|
log = "0.4"
|
2024-04-04 11:57:51 +00:00
|
|
|
num-derive = "0.4.2"
|
2024-05-06 10:17:40 +00:00
|
|
|
num-traits = "0.2.19"
|
2024-07-07 10:36:28 +00:00
|
|
|
serde = "1.0.204"
|
2024-04-04 12:01:11 +00:00
|
|
|
thiserror = "1.0"
|
2024-06-18 22:21:20 +00:00
|
|
|
url = "2.5.2"
|
2024-04-04 12:03:22 +00:00
|
|
|
wasm-bindgen = "=0.2.92"
|
2024-04-04 15:14:06 +00:00
|
|
|
walkdir = "2.5.0"
|
2024-06-01 14:51:31 +00:00
|
|
|
tokio = { version = "1.38.0" }
|
2023-01-04 00:06:57 +00:00
|
|
|
|
2024-01-04 20:40:04 +00:00
|
|
|
[workspace.lints.rust]
|
|
|
|
# Clippy nightly often adds new/buggy lints that we want to ignore.
|
|
|
|
# Don't warn about these new lints on stable.
|
|
|
|
renamed_and_removed_lints = "allow"
|
|
|
|
unknown_lints = "allow"
|
|
|
|
|
|
|
|
[workspace.lints.clippy]
|
|
|
|
# LONG-TERM: These lints are unhelpful.
|
|
|
|
manual_map = "allow" # Less readable: Suggests `opt.map(..)` instsead of `if let Some(opt) { .. }`
|
|
|
|
manual_range_contains = "allow" # Less readable: Suggests `(a..b).contains(n)` instead of `n >= a && n < b`
|
2024-03-21 22:07:36 +00:00
|
|
|
assigning_clones = "allow" # Sometimes useful, but more often than not it doesn't do anything as
|
|
|
|
# we overwrite an empty item. And sometimes it can even be a footgun
|
|
|
|
# by keeping big allocations alive.
|
2024-01-04 20:40:04 +00:00
|
|
|
|
2020-02-12 23:43:58 +00:00
|
|
|
# Don't optimize build scripts and macros.
|
2020-02-13 23:24:40 +00:00
|
|
|
[profile.release.build-override]
|
2020-02-12 23:43:58 +00:00
|
|
|
opt-level = 0
|
2020-03-16 08:16:15 +00:00
|
|
|
|
|
|
|
[profile.dev]
|
avm2: Partially implement Stage3D for wgpu backend
This PR implements core 'stage3D' APIs. We are now able
to render at least two demos from the Context3D docs - a simple
triangle render, and a rotating cube.
Implemented in this PR:
* Stage3D access and Context3D creation
* IndexBuffer3D and VertexBuffer3D creation, uploading, and usage
* Program3D uploading and usage (via `naga-agal`)
* Context3D: configureBackBuffer, clear, drawTriangles, and present
Not yet implemented:
* Any 'dispose()' methods
* Depth and stencil buffers
* Context3D texture apis
* Scissor rectangle
General implementation strategy:
A new `Object` variant is added for each of the Stage3D objects
(VertexBuffer3D, Program3D, etc). This stores a handle to the
parent `Context3D`, and (depending on the object) a handle
to the underlying native resource, via `Rc<dyn
SomeRenderBackendTrait>`).
Calling methods on Context3D does not usually result in an immediate
call to a `wgpu` method. Instead, we queue up commands in our
`Context3D` instance, and execute them all on a call to `present`.
This avoids some nasty wgpu lifetime issues, and is very similar
to the approah we use for normal rendering.
The actual rendering happens on a `Texture`, with dimensions
determined by `createBackBuffer`. During 'Stage' rendering,
we render all of these Stage3D textures *behind* the normal
stage (but in front of the overall stage background color).
2022-09-18 20:50:21 +00:00
|
|
|
panic = "unwind"
|
2020-03-16 08:16:15 +00:00
|
|
|
|
|
|
|
[profile.release]
|
|
|
|
panic = "abort"
|
2021-01-02 03:26:14 +00:00
|
|
|
|
|
|
|
[profile.dev.package.h263-rs]
|
|
|
|
opt-level = 3
|
|
|
|
|
|
|
|
[profile.dev.package.h263-rs-yuv]
|
2021-08-22 16:47:24 +00:00
|
|
|
opt-level = 3
|
|
|
|
|
|
|
|
[profile.dev.package.nihav_core]
|
|
|
|
opt-level = 3
|
|
|
|
|
|
|
|
[profile.dev.package.nihav_codec_support]
|
|
|
|
opt-level = 3
|
|
|
|
|
|
|
|
[profile.dev.package.nihav_duck]
|
|
|
|
opt-level = 3
|
2022-01-13 07:25:34 +00:00
|
|
|
|
|
|
|
# TODO: Set rustflags here instead of in web/core/package.json, when that
|
|
|
|
# feature becomes stable. See: https://github.com/rust-lang/cargo/issues/10271
|
|
|
|
# Until then, these custom profiles let cargo keep the build cache alive
|
|
|
|
# across "dual-wasm" builds, separating it for the two .wasm modules.
|
|
|
|
[profile.web-vanilla-wasm]
|
|
|
|
inherits = "release"
|
|
|
|
|
|
|
|
[profile.web-wasm-extensions]
|
|
|
|
inherits = "release"
|
2024-02-16 14:57:43 +00:00
|
|
|
|
|
|
|
[profile.ci]
|
|
|
|
inherits = "release"
|
|
|
|
debug-assertions = true
|
|
|
|
overflow-checks = true
|
2024-02-27 13:15:31 +00:00
|
|
|
# "Not too slow to compile, fast enough to run."
|
|
|
|
opt-level = 2
|
|
|
|
# Takes too long, especially on Windows, with marginal benefit otherwise.
|
|
|
|
lto = "off"
|
2024-02-27 13:13:20 +00:00
|
|
|
# This is also set with higher authority in `test_rust.yml`.
|
2024-02-16 14:57:43 +00:00
|
|
|
incremental = true
|
2024-02-27 13:15:31 +00:00
|
|
|
# Right between the defaults of 16 and 256, for crate fragment caching.
|
|
|
|
codegen-units = 64
|