Closed kthakore closed 3 years ago
Commented on lib.rs
generation in rune from parser.rs
Function to override files instead of appending to them. Has been applied to lib.rs.
In Runefile add 2 capabilities and should see their variables:
CAPABILITY<_,I32> RAND randasas --n 1
RAND
is part of runic_types::CAPABILITY ENUM
if None from runic_types::CAPABILITY::from_str("asdasd") => log::fatal!("INVALID....")randasas
is a variable name that is not already used in capabilities before--n 1
Write out the u32.Updated Cargo.toml in rune:
Boilerplate has the following dependencies listed:
[dependencies]
no-std-compat = "0.4.1"
wee_alloc = "0.4.5"
runic-types = { path = "../../runic-types" }
the runic-types dependency is not being called with the above path. It outputs the following error (even though i have runic-types repo in the correct location):
[2021-02-10T03:37:20Z ERROR rune::build] Couldn't compile Rune 'failed to get `runic-types` as a dependency of package `rune v0.1.0 (/Users/milind/.rune/runes/2a9beef0-4c7e-42b5-98bb-c50f05530235)`
Caused by:
0: failed to load source for dependency `runic-types`
1: Unable to update /Users/milind/.rune/runic-types
2: failed to read `/Users/milind/.rune/runic-types/Cargo.toml`
3: No such file or directory (os error 2)'
Current Work around:
runic-types = { git = "ssh://git@github.com/hotg-ai/runic-types" }
rustup target add wasm32-unknown-unknown
to install core and std crates.rustup default nightly
(some features have not been added to stable so rune won't compile on it)Still having issues with lib.rs in the rune:
error[E0432]: unresolved imports `runic_types::CAPABILITY`, `runic_types::PARAM_TYPE`, `runic_types::OUTPUT`
--> src/lib.rs:14:19
|
14 | use runic_types::{CAPABILITY, PARAM_TYPE, OUTPUT};
| ^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^ no `OUTPUT` in the root
| | |
| | no `PARAM_TYPE` in the root
| no `CAPABILITY` in the root
error[E0432]: unresolved import `runic_transform`
--> src/lib.rs:15:5
|
15 | use runic_transform::{Transform, Transformable};
| ^^^^^^^^^^^^^^^ use of undeclared crate or module `runic_transform`
error: cannot find macro `vec` in this scope
--> src/sine_model.rs:2:12
|
2 | return vec![
| ^^^
|
= note: consider importing this macro:
alloc::vec
Checklist:
.cargo/config
similar toexamples/sine/rune-rs/.cargo/config
examples/boilerplate
MODEL
instruction and write bytes to model.rs fileCAPABILITY
instruction to generate new code