-
Notifications
You must be signed in to change notification settings - Fork 254
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
nightly rust feature #854
Comments
Sorry for the late response. I seem to have overlooked this one. Right now, as far as I remember, you can't add flags like this. However, you can add a So it should all be provided by standard Rust tooling. |
I could really use an option in Trunk to pass arbitrary flags to cargo. My use case is the same as @F8RZD, except I need to not supply those flags when building my project for non-web platforms. The only way I've been able to find to do this is by having a separate Cargo config file I would be happy with any of the following implementations in Trunk:
|
So... I never really tried this one since I created the issue this is my build script: #!/bin/python
import subprocess
import os
TRUNK = False
target = "wasm32-unknown-unknown"
os.environ['RUSTFLAGS'] = '-Cpanic=abort -Copt-level=z -Clto=fat -Ccodegen-units=1 -Cstrip=symbols'
os.environ['CARGO_BUILD_TARGET'] = target
if not TRUNK:
subprocess.run(
[
'cargo', '+nightly', 'build', '--release',
'-Z', 'build-std=std,panic_abort',
'-Z', 'build-std-features=panic_immediate_abort',
'--target', target
]
)
if TRUNK:
subprocess.run(
[
'trunk', 'build', '--release'
]
) there is one when I run with
what I get when I do all the steps with
-Z flags cannot be passed through how can I get trunk to do any help or direction is greatly appreciated |
does trunk support adding nightly flags to rustc and cargo ?
I'm specifically interested in
build_std
andpanic_immediate_abort
.combination of these two practically removes all panic related boiler plate and strings reducing the binary size drastically which is an essential need in wasm.
does trunk support passing those arguments?
The text was updated successfully, but these errors were encountered: