Adding string processing

- 'character' type, only contructible by decomposing strings
- 'boom' builtin function ;) to create a list of characters from a string
- string library with basic manipulation functionalities
- slightly improved Makefile
This commit is contained in:
teo3300
2024-06-22 23:03:25 +09:00
parent 5996af1aea
commit 287b96ea7d
7 changed files with 73 additions and 7 deletions

View File

@ -1,17 +1,23 @@
default: build-release
build-release:
cargo build --release
@echo "Build release"
@cargo build --release
test:
cargo test --release
@echo "Test release"
@cargo test --release
conf:
mkdir -p ${HOME}/.config/mal
@echo "Copy core and libraries"
@mkdir -p ${HOME}/.config/mal
cp -f core/core.mal ${HOME}/.config/mal/
mkdir -p ${HOME}/.config/mal/libs
@mkdir -p ${HOME}/.config/mal/libs
cp -f libs/* ${HOME}/.config/mal/libs/
install: build-release test conf
@echo "Install mal"
sudo cp target/release/rust-mal /usr/local/bin/mal
sudo chown ${USER} /usr/local/bin/mal
@sudo chown ${USER} /usr/local/bin/mal
@echo "To start mal run:"
@printf "\tmal [path/module.mal ...]\n\n"