-
Notifications
You must be signed in to change notification settings - Fork 522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using hurl as a library #284
Comments
Hello, |
From what language you would like to call the Hurl API? Python? |
It's currently .NET, which can consume exported C functions. I'm not that much into rust, but I assume that this would require some bindgen stuff. Python would be interesting, too. |
FYI, in my case I am planning to write a .NET wrapper around the hurl process, which launch the hurl process then parse output. But in my case I will run a lot of hurl files (think integration tests), so it makes sense to not reuse hurl and run multiple process in parallel. This way I also avoid any resource leak between the host and the multiple runs. |
I think the first step could be to just provide a create that exposes the above mentioned |
We will try to create an example using Hurl as a lib. |
This is something that would be cool to do with node.js and something like https://neon-bindings.com/. I'd love to see Hurl become more accessible to JS devs, many of whom aren't used to adding tools from outside the npm-ecosystem. |
Yes, It would be good to see Hurl in the Browser/JS space. I initially thought about generating standard Web Assembly from Hurl Rust source code. I don't know about https://neon-bindings.com. |
@humphd @fabricereix thinking about this issue, I'm wondering if publishing Hurl binaries to npm registry will not be sufficient (instead of building through Neon or WASM). For instance, dprint is a code formatter written in Rust and you can install it with cargo, brew, npm etc...:
On npm package, dprint is listed as "npm CLI distribution for dprint" If we do the same with the existing Hurl binaries (publishing to npm), it should be sufficient to reach JS devs ? |
This would be great, yes. Being able to install and run Looking at https://github.com/dprint/dprint/tree/main/deployment/npm seems to provide a good path forward. I tried installing it, and it does exactly what
|
I filed #544 to deal with the |
We've added a sample using Hurl as a library here |
I really love this tool. I loce it so much that I'd like to integrate it into some project. If I'm not mistaking, it's currently only a CLI tool (and a rust crate).
Sadly, most of my current projects that would benefit from this aren't written in rust. Would it be possible to somehow provide a version of this with FFI wrappers to the main part? Glancing at the source, this seems to be the function that would need to be wrapped:
hurl/packages/hurl/src/main.rs
Lines 61 to 69 in dab4006
Also, are there non-statically linked parts?
The text was updated successfully, but these errors were encountered: