SPWN-language
SPWN-language copied to clipboard
[Help wanted] Where do I put the libraries folder?
I have to manually install SPWN. I finished all the steps except the last one(to Copy the libraries folder to $HOME/.cargo/bin/spwn
). .cargo/bin/spwn
is not a directory but a UNIX executable. I currently have the library folder in .cargo/bin
.
The easiest way, is to copy the libraries folder into your current working directory, but this may be annoying if you have multiple folders where you develop spwn files.
Btw, the best way to run SPWN manually is to run cargo run --release test/your_file.spwn
onto a clone of the repository, so you're 100% sure it will be the latest version, because if you did cargo install spwn
then you are back by 3 versions iirc
When I run this, I get
Error: Syntax error
╭─[src/test.spwn:1:1]
│
1 │ $.print("Hello SPWN!")
· ───────────┬──────────
· ╰──────────── 1: Error when running this library/module
│
├─[/Users/Hackcraft_/IdeaProjects/Spwn/libraries/std/lib.spwn:2:17]
│
2 │ let constants = import "constants.spwn"
· ───────────┬───────────
· ╰───────────── 2: Error when parsing this library/module
│
├─[/Users/Hackcraft_/IdeaProjects/Spwn/libraries/std/constants.spwn:4:1]
│
4 │ type @comparison
· ──┬─
· ╰─── 3: Expected a value, found keyword: "type"
───╯
What version of spwn do you have and what version of the std libraries do you have?
If the std libraries are giving you too many issues, you can add #[no_std]
to your spwn file and it won't load the std library.
I use 0.8 beta and the library included. I followed the instructions in README.md to install.
cargo run --release test/your_file.spwn
If I do this, will it install spwn
or run the spwn command
because I want to install spwn and use the shorthand.
if you want to use the shorthand try looking at the generic linux install
aren't the std libs supposed to add more features?
When I run this, I get
Error: Syntax error ╭─[src/test.spwn:1:1] │ 1 │ $.print("Hello SPWN!") · ───────────┬────────── · ╰──────────── 1: Error when running this library/module │ ├─[/Users/Hackcraft_/IdeaProjects/Spwn/libraries/std/lib.spwn:2:17] │ 2 │ let constants = import "constants.spwn" · ───────────┬─────────── · ╰───────────── 2: Error when parsing this library/module │ ├─[/Users/Hackcraft_/IdeaProjects/Spwn/libraries/std/constants.spwn:4:1] │ 4 │ type @comparison · ──┬─ · ╰─── 3: Expected a value, found keyword: "type" ───╯
aren't the std libs supposed to add more features?
basically yes, everything what is in the std can easily be reproduced and all of them are just to provide some easier abstractions of quite complex systems, just like @counter
When I run this, I get
Error: Syntax error ╭─[src/test.spwn:1:1] │ 1 │ $.print("Hello SPWN!") · ───────────┬────────── · ╰──────────── 1: Error when running this library/module │ ├─[/Users/Hackcraft_/IdeaProjects/Spwn/libraries/std/lib.spwn:2:17] │ 2 │ let constants = import "constants.spwn" · ───────────┬─────────── · ╰───────────── 2: Error when parsing this library/module │ ├─[/Users/Hackcraft_/IdeaProjects/Spwn/libraries/std/constants.spwn:4:1] │ 4 │ type @comparison · ──┬─ · ╰─── 3: Expected a value, found keyword: "type" ───╯
that means that the std version and your spwn version don't match.
Ok. so how do I install spwn v0.8 on my mac?
because the instructions said to use a .pkg but there is not .pkg in release
Compile from source, and then add the compiled file to the environment variables.
Where does the executable end up in? Which folder?
/target/(release / debug)/spwn
well i only have target/debug. how do I get release?
I did cargo build -r
and now I have the release folder, but it doesn't contain the spwn executable