How can I set the Rocket.toml
path?
#2574
Answered
by
NikosPg
rherrmannr
asked this question in
Questions
Replies: 2 comments
-
You can specify the path to the Rocket.toml configuration file by using the
ROCKET_CONFIG environment variable. You can set this variable to the path
of your configuration file. For example, if your configuration file is
located at /path/to/Rocket.toml, you can set the environment variable like
this:
export ROCKET_CONFIG=/path/to/Rocket.toml
You can also specify the path to the configuration file using the
--config command-line
option. For example:
rocket run --config /path/to/Rocket.toml
I hope this helps!
Στις Παρ, 7 Ιουλ 2023, 13:02 ο χρήστης rherrmannr ***@***.***>
έγραψε:
… I'm trying to run rocket on a raspberry pi using buildroot
<https://buildroot.org/>.
For my project, I'm using this Rocket.toml:
[global]
address = "192.168.0.96"
port = 8000
[debug]
address = "192.168.0.96"
port = 8000
I can build my project locally and everything works as expected.
However, when using buildroot, it does not consider the Rocket.toml
configuration. First, I had the same problem with the Cargo.toml, but I
could solve it by adding a manifest-path. So my question is: Is there
something similar so I can specify the path to the Rocket.toml?
This is my buildroot makefile:
RUST_REST_API_CARGO_ENV += \
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=$(HOST_DIR)/bin/arm-buildroot-linux-gnueabihf-gcc \
CARGO_HOME=$(HOST_DIR)/usr/share/cargo \
RUST_TARGET_PATH=$(HOST_DIR)/etc/rustc
RUST_REST_API_CARGO_OPTS = \
--target=armv7-unknown-linux-gnueabihf \
***@***.***)/Cargo.toml \
--release
define RUST_REST_API_BUILD_CMDS
$(TARGET_MAKE_ENV) $(RUST_REST_API_CARGO_ENV) \
cargo build $(RUST_REST_API_CARGO_OPTS)
endef
define RUST_REST_API_INSTALL_TARGET_CMDS
$(INSTALL) -D \
***@***.***)/target/armv7-unknown-linux-gnueabihf/release/rust-rest-api \
$(TARGET_DIR)/usr/bin/rust-rest-api
endef
$(eval $(generic-package))
The manifest-path will be added to the RUST_REST_API_CARGO_OPTS. I'm
hoping that I can somehow add the path like this:
***@***.***)/Rocket.toml \
—
Reply to this email directly, view it on GitHub
<#2574>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABOGALPNJZA4Y3KMJBZ5UNTXO7NCDANCNFSM6AAAAAA2BTCFVU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
rherrmannr
-
Ah, so the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to run rocket on a raspberry pi using buildroot.
For my project, I'm using this
Rocket.toml
:I can build my project locally and everything works as expected.
However, when using buildroot, it does not consider the
Rocket.toml
configuration. First, I had the same problem with theCargo.toml
, but I could solve it by adding amanifest-path
. So my question is: Is there something similar so I can specify the path to theRocket.toml
?This is my buildroot makefile:
The
manifest-path
will be added to theRUST_REST_API_CARGO_OPTS
. I'm hoping that I can somehow add the path like this:Beta Was this translation helpful? Give feedback.
All reactions