TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Esy – fast and simple package management for native ReasonML/OCaml

134 pointsby andreypoppover 6 years ago

4 comments

andreypoppover 6 years ago
Hi,<p>I&#x27;m one of the developers of esy, would be happy to answer any questions about it.<p>I have background in JS ecosystem and always liked how npm&#x2F;yarn allows you to have a set of dependencies installed per project which do not conflict with any other global installations. Then this goes even beyond runtime dependencies and you have tools like eslint&#x2F;flow and others installed per project in node_modules.<p>Now enter native development and you won&#x27;t find the same workflow there. This is what esy tries to solve. It focuses now on Reason programming language but conceptually it works with other platforms&#x2F;tools too (for example some of our dependencies are C&#x2F;C++ code and it works nicely with esy too).<p>Also I want to highlight the following points:<p>- All dependencies (and devDependencies) are local to a project (like with npm&#x2F;yarn)<p>- The cache for built packages is shared between different projects - if you built OCaml 4.06.0 compiler once then the other project will just reuse it (this works similar to Nix package manager)<p>- To execute some tool within the isolated project environment you prefix it with esy command: &quot;esy ocaml&quot;, &quot;esy vim&quot;, &quot;esy code&quot;<p>- esy can install packages from npm, opam (package registry for OCaml ecosystem), github<p>- esy allows you to develop multiple packages at once (see linking workflow in docs).<p>- finally... we support Windows (besides Linux and macOS)!
评论 #18968078 未加载
评论 #18967940 未加载
评论 #18979148 未加载
bryanpheover 6 years ago
Just wanted to say thank you for all your work on this, Andrey!<p>I&#x27;ve been using for developing native projects with ReasonML &#x2F; OCaml (on Windows!) - a framework called Revery [1] (a fast, native alternative to Electron) and a re-write for our Oni [2] text editor using this platform. It really wouldn&#x27;t have been possible to pursue these paths without esy.<p>We&#x27;re also starting to see other cross-platform Reason-native projects pop-up that I&#x27;m very excited about, like Brisk (native OSX UI w&#x2F; Reason&#x2F;OCaml) [3] and Fastpack (native JS bundler - a faster webpack) [4].<p>Some of my favorite features are the following:<p>- Esy gives the convenience of NPM &#x2F; Yarn, but for native development. Importantly, it <i>works great cross-platform</i> - OSX&#x2F;Linux&#x2F;Windows. IMO The ease of cross-platform development is one of the JS+Node+NPM workflows greatest strengths, and esy provides this for native development.<p>- Esy gets faster as you use it. It has smart caching for compiled artifacts - taking into account the full set of transitive dependencies.<p>- The linking &#x2F; resolution workflow is incredibly useful for native development. For Revery, we&#x27;d often need to try fixes across our GLFW&#x2F;Fontkit stack, and the link feature made this simple.<p>I&#x27;m biased as I&#x27;ve contributed a little bit to the esy, but I&#x27;ve found the approach to development really interesting architecturally - esy is like a &#x27;React&#x27; for dependency management - treating the dependency tree as a &quot;pure function&quot; of (dependency tree -&gt; lock -&gt; build environment) with &quot;memoization&quot; to re-use compiled artifacts.<p>These are tough problems to solve in native... and I&#x27;m really impressed with your work Andrey! Thank you!<p>- [1] <a href="https:&#x2F;&#x2F;github.com&#x2F;revery-ui&#x2F;revery" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;revery-ui&#x2F;revery</a><p>- [2] <a href="https:&#x2F;&#x2F;github.com&#x2F;onivim&#x2F;oni" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;onivim&#x2F;oni</a><p>- [3] <a href="https:&#x2F;&#x2F;github.com&#x2F;briskml&#x2F;brisk" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;briskml&#x2F;brisk</a><p>- [4] <a href="https:&#x2F;&#x2F;github.com&#x2F;fastpack&#x2F;fastpack" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;fastpack&#x2F;fastpack</a>
评论 #18972272 未加载
e12eover 6 years ago
This looks very nice! I wonder if it might be easy(ish) to wrap it as a plug-in for asdf? There&#x27;s already an opam&#x2F;ocaml plug-in - but from comments here it sounds like it might be possible to write a wrapper similar to the ruby plug-in that re-uses a lot of the tooling for rbenv&#x2F;build. (as does the rust plug-in, and others)<p><a href="https:&#x2F;&#x2F;github.com&#x2F;asdf-vm&#x2F;asdf" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;asdf-vm&#x2F;asdf</a>
Foxboronover 6 years ago
I&#x27;m having a hard time figuring out if esy supports reproducable builds, and package signing+verfication.<p>And if reproducable builds are supported, what format is used to store the build information so downloaded packages can be reproduced.
评论 #18977613 未加载