rust-editor 0.3.4 → 0.3.5
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 +66 -1
- package/package.json +1 -1
- package/rust_editor_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -1 +1,66 @@
|
|
|
1
|
-
# rust-
|
|
1
|
+
# rust-editor
|
|
2
|
+
|
|
3
|
+
This page is provide documentation of rust-editor package built with Rust compiled to WASM (WebAssembly), and simple implementation of use.
|
|
4
|
+
|
|
5
|
+
## Key Feature
|
|
6
|
+
This package is provide several image processing algorithm such as:
|
|
7
|
+
1. Transfer Color: Apply color scheme from "Image Reference" to "Image Target".
|
|
8
|
+
2. Sharpen: Enhance edge definition using function from image dependencies.
|
|
9
|
+
3. Color Adjustment: Fine-tune Saturation, Temperature, adn Tint of Image Target.
|
|
10
|
+
4. Light Adjustment: Contrast and Exposure Adjustments.
|
|
11
|
+
|
|
12
|
+
## Build WASM package
|
|
13
|
+
|
|
14
|
+
Before building the package, you must first install `wasm-pack`.
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
cargo install wasm-pack
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Then you can clone this repository and build package with running command bellow.
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
wasm-pack build --target web
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
.
|
|
28
|
+
└── RustEditor/
|
|
29
|
+
├── pkg/ <--------------------build result
|
|
30
|
+
│ ├── package.json
|
|
31
|
+
│ ├── README.md
|
|
32
|
+
│ ├── rust_editor_bg.wasm
|
|
33
|
+
│ ├── rust_editor_bg.wasm.d.ts
|
|
34
|
+
│ └── rust_editor.d.ts
|
|
35
|
+
├── site/
|
|
36
|
+
│ ├── index.html
|
|
37
|
+
│ ├── main.js
|
|
38
|
+
│ ├── style.css
|
|
39
|
+
│ ├── assets/
|
|
40
|
+
│ ├── README.md
|
|
41
|
+
│ └── package.json
|
|
42
|
+
├── src/
|
|
43
|
+
│ ├── color.rs
|
|
44
|
+
│ ├── image_size.rs
|
|
45
|
+
│ ├── lab_converter.rs
|
|
46
|
+
│ ├── lib.rs
|
|
47
|
+
│ ├── light.rs
|
|
48
|
+
│ └── switch_color.rs
|
|
49
|
+
├── .gitignore
|
|
50
|
+
├── Cargo.lock
|
|
51
|
+
├── Cargo.toml
|
|
52
|
+
└── LICENSE
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Then look in your project directory you must find new directory with folder name `pkg`, on that folder you'll find some file like js, ts, and wasm file. file `.wasm` is result of compile Rust code using `wasm-pack`, file `.js` and `.ts` is bridge for frontEnd can comunicate with `.wasm` file.
|
|
56
|
+
|
|
57
|
+
you can look published this documentation on this [link](https://www.npmjs.com/package/rust-editor)
|
|
58
|
+
|
|
59
|
+
## Demo
|
|
60
|
+
This documentation is also provide demo, so you can try how to use and how the application work. You can jump to `/site` directory foolow command bellow.
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
cd side
|
|
64
|
+
npm install // install all depencencies
|
|
65
|
+
npx parcel index.html // run project using parceljs
|
|
66
|
+
```
|
package/package.json
CHANGED
package/rust_editor_bg.wasm
CHANGED
|
Binary file
|