@raviqqe/stak 0.3.12 → 0.3.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- package/package.json +2 -2
- package/stak_wasm.d.ts +2 -2
- package/stak_wasm.js +2 -2
- package/stak_wasm_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -12,6 +12,7 @@ Stak Scheme aims to be:
|
|
|
12
12
|
- An embeddable Scheme interpreter for Rust with very small memory footprint and reasonable performance
|
|
13
13
|
- The minimal implementation of [the R7RS-small standard][r7rs-small]
|
|
14
14
|
- A subset of [Chibi Scheme](https://github.com/ashinn/chibi-scheme), [Gauche](https://github.com/shirok/Gauche), and [Guile](https://www.gnu.org/software/guile/)
|
|
15
|
+
- A portable scripting environment that supports even no-`std` and no-`alloc` platforms
|
|
15
16
|
|
|
16
17
|
For more information and usage, visit [the full documentation](https://raviqqe.github.io/stak/install).
|
|
17
18
|
|
|
@@ -130,7 +131,7 @@ const HEAP_SIZE: usize = 1 << 16;
|
|
|
130
131
|
static MODULE: UniversalModule = include_module!("fibonacci.scm");
|
|
131
132
|
|
|
132
133
|
fn main() -> Result<(), Box<dyn Error>> {
|
|
133
|
-
let input =
|
|
134
|
+
let input = 15;
|
|
134
135
|
let mut output = vec![];
|
|
135
136
|
let mut error = vec![];
|
|
136
137
|
|
|
@@ -141,8 +142,8 @@ fn main() -> Result<(), Box<dyn Error>> {
|
|
|
141
142
|
return Err(str::from_utf8(&error)?.into());
|
|
142
143
|
}
|
|
143
144
|
|
|
144
|
-
// Decode and
|
|
145
|
-
|
|
145
|
+
// Decode and test the output.
|
|
146
|
+
assert_eq!(isize::from_str(&str::from_utf8(&output)?)?, 610);
|
|
146
147
|
|
|
147
148
|
Ok(())
|
|
148
149
|
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raviqqe/stak",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"description": "Stak Scheme
|
|
5
|
-
"version": "0.3.
|
|
4
|
+
"description": "Stak Scheme in WebAssembly",
|
|
5
|
+
"version": "0.3.14",
|
|
6
6
|
"license": "SEE LICENSE IN ../LICENSE",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
package/stak_wasm.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
|
-
* Compiles
|
|
4
|
+
* Compiles source codes in Scheme.
|
|
5
5
|
*/
|
|
6
6
|
export function compile(source: string): Uint8Array;
|
|
7
7
|
/**
|
|
8
|
-
* Interprets bytecodes with
|
|
8
|
+
* Interprets bytecodes with standard input and returns its standard output.
|
|
9
9
|
*/
|
|
10
10
|
export function interpret(bytecodes: Uint8Array, input: Uint8Array, heap_size: number): Uint8Array;
|
|
11
11
|
|
package/stak_wasm.js
CHANGED
|
@@ -85,7 +85,7 @@ function getArrayU8FromWasm0(ptr, len) {
|
|
|
85
85
|
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
86
86
|
}
|
|
87
87
|
/**
|
|
88
|
-
* Compiles
|
|
88
|
+
* Compiles source codes in Scheme.
|
|
89
89
|
* @param {string} source
|
|
90
90
|
* @returns {Uint8Array}
|
|
91
91
|
*/
|
|
@@ -108,7 +108,7 @@ function passArray8ToWasm0(arg, malloc) {
|
|
|
108
108
|
return ptr;
|
|
109
109
|
}
|
|
110
110
|
/**
|
|
111
|
-
* Interprets bytecodes with
|
|
111
|
+
* Interprets bytecodes with standard input and returns its standard output.
|
|
112
112
|
* @param {Uint8Array} bytecodes
|
|
113
113
|
* @param {Uint8Array} input
|
|
114
114
|
* @param {number} heap_size
|
package/stak_wasm_bg.wasm
CHANGED
|
Binary file
|