summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock1
-rw-r--r--Cargo.toml13
-rw-r--r--src/lib.rs1
3 files changed, 8 insertions, 7 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 2716325..2e8d82b 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -30,7 +30,6 @@ dependencies = [
"num",
"regex",
"worker",
- "worker-macros",
]
[[package]]
diff --git a/Cargo.toml b/Cargo.toml
index 02175be..6ece893 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,3 +1,4 @@
+cargo-features = ["profile-rustflags"]
[package]
name = "ataxia-rs"
version = "0.1.0"
@@ -8,19 +9,21 @@ authors = ["user"]
crate-type = ["cdylib"]
[dependencies]
-worker = { version = "0.7" }
-worker-macros = { version = "0.7" }
+worker = { version = "0.7", default-features = false }
+# worker-macros = { version = "0.7" }
maud = { version = "0.27.0" }
num = { version = "0.4.3", default-features = false }
regex = "1.12.3"
+#[target.'cfg(target_family="wasm")'] # why doesnt this work
+
[profile.release]
lto = true
strip = true
codegen-units = 1
+rustflags = ["-Cllvm-args=--mattr=+bulk-memory-opt,+simd128,+relaxed-simd,+tail-call,+extended-const"]
overflow-checks = false
-
-
+opt-level = 3
[profile.dev]
+rustflags = ["-Cllvm-args=--mattr=+bulk-memory-opt,+simd128,+relaxed-simd,+tail-call,+extended-const"]
overflow-checks = false
-
diff --git a/src/lib.rs b/src/lib.rs
index 2dbc4a8..82a0e15 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -47,7 +47,6 @@ async fn fetch(req: Request, env: Env, _ctx: Context) -> Result<Response> {
}
pre {
@for x in a.split('\n').map(|l| {
- let l = l.trim();
re.captures(l)
.map_or_else(|| html! { (PreEscaped(l)) "\n" },
|c| {