Comments (10)
I'll make a PR with solution and some other improvements
from tinysearch.
The thing that worked for me:
- Clone tinysearch repo somewhere:
git clone https://github.com/tinysearch/tinysearch.git
- Go to
bin
inside repo:
cd tinysearch/bin
- Run cargo install from it:
cargo install --path .
from tinysearch.
The engine code gets extracted into a temp dir. It's just another cargo project that gets compiled with wasm-pack. That's why the Cargo.toml
is needed. Looks like the Cargo.toml
isn't properly included in the binary for some reason.
Lines 18 to 20 in 14ef25c
I thought we fixed that already.
from tinysearch.
Hi @mre thanks for all this work. Would you be interested if I were to contribute Github Action tests which would provide regression testing against these issues, by fully building and running and verifying on each PR? Apologies if this exists but is in some way not yet sufficient coverage, I’d also be happy to help address in that case as well.
from tinysearch.
Yeah that would be nice. Sorry for the limited availability at the moment, but your help would be much appreciated.
@Jieiku fyi. Not sure if you could look into that.
The Github action (https://github.com/leonhfr/tinysearch-action) is maintained by @leonhfr.
from tinysearch.
I have the same issue. I think it is caused by cargo install tinysearch
not including the right assets (needed for engine.rs
). The issue is cause by these lines:
Lines 7 to 8 in 10c060b
It is also caused by cargo install getting sources not from github, but from crates.io. Here is the listing from cargo's build folder for tinysearch:
$ tree ~/.cargo/registry/src/github.com-1ecc6299db9ec823/tinysearch-0.7.0/
~/.cargo/registry/src/github.com-1ecc6299db9ec823/tinysearch-0.7.0/
├── assets
│ ├── demo.html
│ └── stopwords
├── build.rs
├── Cargo.lock
├── Cargo.toml
├── Cargo.toml.orig
└── src
├── index.rs
├── main.rs
└── storage.rs
2 directories, 9 files
For some reason the lines mentioned previously were NOT failing the build script and therefore the build.
from tinysearch.
@ASMfreaK if you can provide a fix for that and create a pull request I'd be extremely thankful. Thanks for the investigation! 😊
from tinysearch.
std::env::var is correct in build scripts according to some reading i did. format!("{}{}",std::env::var("OUT_DIR").unwrap()
c:\working\website\tinysearch>tinysearch dave.json
Unpacking tinysearch WASM engine into temporary directory "C:\\Users\\dhorner\\AppData\\Local\\Temp\\.tmpSvFk54"
Starting unpack
Copying index into crate
Compiling WASM module using wasm-pack
INFO 2023-03-04T19:06:50Z: wasm_pack::command: Running build command...
Error: crate directory is missing a `Cargo.toml` file; is `C:\Users\dhorner\AppData\Local\Temp\.tmpSvFk54\engine` the wrong directory?
Error: failed to execute "wasm-pack" "build" "C:\\Users\\dhorner\\AppData\\Local\\Temp\\.tmpSvFk54\\engine" "--target" "web" "--release" "--out-dir" "\\\\?\\C:\\working\\website\\tinysearch\\wasm_output"
status: exit code: 1
Not sure my contribution is a solution after all.
from tinysearch.
This is exactly the problem I get if I try to install via cargo, but building from git seems to work fine.
here I get the same error: #151 (comment)
here everything works if I build from git: #151 (comment)
from tinysearch.
This is resolved now.
The reason why it broke was a limitation by cargo: it does not allow including one crate inside another one. This is done to avoid unwanted complexity and is a sane default. In our case, however, it leads to the situation that the engine crate was missing from the tinysearch crate on crates.io.
See also #170 (comment).
The latest tinysearch 0.8.2 fixes this issue. Apologies for the long delay to produce a fix.
from tinysearch.
Related Issues (20)
- Benchmark against competition HOT 7
- building docker image gives error from wasm-pack in step 19/28 HOT 5
- Could tiny search run in IOS and Android WebView browsers? HOT 2
- Error: No such file or directory (os error 2) HOT 19
- Too many false positives HOT 7
- Error: failed to execute "wasm-pack" "build" HOT 21
- Error: Engine directory could not be created HOT 8
- bug HOT 1
- Update Cargo build for tinysearch HOT 1
- Does tinysearch support stemming, stopwords, and CJK? HOT 2
- Is there a way to return the page description or body in the results? HOT 19
- Github action HOT 2
- Please tag release 0.7.0 HOT 3
- For Zola sites, the tinysearch json index gets included in the sitemap.xml file. HOT 1
- Add a switch for build dir, and copy only the resulting wasm file to the path HOT 2
- latest tinysearch, cargo install tinysearch not working. HOT 12
- On npm HOT 5
- No such file or directory (os error 2) HOT 1
- Changes in the way browsers work with wasm causes issues with some js implementation to load the wasm. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tinysearch.