Skip to content

Commit

Permalink
Rust Support
Browse files Browse the repository at this point in the history
  • Loading branch information
KrisSimon committed Mar 8, 2024
1 parent 8fe15d7 commit 4f013ec
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 12 deletions.
47 changes: 47 additions & 0 deletions Project/examples/rust.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"vscode": {
"languageId": "rust"
}
},
"outputs": [
{
"data": {
"text/plain": [
"\"Hello, World!\""
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"let mut s:String = String::from(\"Hello, \");\n",
"s.push_str(\"World!\");\n",
"s"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Rust",
"language": "rust",
"name": "rust"
},
"language_info": {
"codemirror_mode": "rust",
"file_extension": ".rs",
"mimetype": "text/rust",
"name": "Rust",
"pygment_lexer": "rust",
"version": ""
}
},
"nbformat": 4,
"nbformat_minor": 2
}
27 changes: 16 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@ provide a unified environment for data scientists and code enthusiasts.
- node / typescript
- python
- swift

- rust

## Installed Kernels:
- c /root/.local/share/jupyter/kernels/c
- iperl /root/.local/share/jupyter/kernels/iperl
- bash /usr/local/share/jupyter/kernels/bash
- jslab /usr/local/share/jupyter/kernels/jslab
- python3 /usr/local/share/jupyter/kernels/python3
- tslab /usr/local/share/jupyter/kernels/tslab
- c /root/.local/share/jupyter/kernels/c
- iperl /root/.local/share/jupyter/kernels/iperl
- bash /usr/local/share/jupyter/kernels/bash
- jslab /usr/local/share/jupyter/kernels/jslab
- python3 /usr/local/share/jupyter/kernels/python3
- tslab /usr/local/share/jupyter/kernels/tslab
- evcxr_jupyter /root/.local/share/jupyter/kernels/rust

## Installed and ready to go libraries
- Apache Spark


## Still missing language support
- Rust
## Still missing language support
- Go

# How to run codebook
Expand All @@ -43,8 +43,13 @@ Wait until your browser opens
![Screenshot](Resources/screenshot.png "CodeBook Screenshot")

## Quick code from withhin the current directory
```
```sh
curl https://raw.githubusercontent.com/KrisSimon/CodeBook/main/codebook.sh | sh -
```

This will download the docker-compose file and start CodeBook from the current directory
This will download the docker-compose file and start CodeBook from the current directory

You may want to add an alias to your system configuration:
```sh
alias codebook='curl https://raw.githubusercontent.com/KrisSimon/CodeBook/main/codebook.sh | sh -'
```
8 changes: 8 additions & 0 deletions codebook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ fi
if [ ! -d "${SCRIPT_DIR}/startup" ]; then
mkdir "${SCRIPT_DIR}/startup"
fi
if [ ! -d "${SCRIPT_DIR}/.gitignore" ]; then
echo "
.DS_Store
/settings.json
/docker-compose.yaml
" > "${SCRIPT_DIR}/.gitignore"
fi


SCRIPT_DIR=${SCRIPT_DIR} docker-compose \
-f "${SCRIPT_DIR}/docker-compose.yaml" \
Expand Down
4 changes: 3 additions & 1 deletion deployment/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ ADD Sources/kernel /extensions/kernel
RUN pip3 install /extensions/kernel/echo_kernel
RUN pip3 install /extensions/kernel/swift_kernel

# RUN cargo install evcxr_jupyter -> 6.7
RUN echo 'PATH="$PATH:/root/.cargo/bin"' >> /root/.bashrc
RUN cargo install evcxr_jupyter; /root/.cargo/bin/evcxr_jupyter --install;
#cp -r /root/.local/share/jupyter/kernels/rust /extensions/kernel/rust

# Setting the startp
# ----------------------------------------------------------------------------------------
Expand Down

0 comments on commit 4f013ec

Please sign in to comment.