Gauss diagram formulas are extensively used to study Vassiliev link invariants. Now we apply this approach to invariants of 3-manifolds, considering a manifold as a result M L of surgery on a framed link L in S 3 . We study the lowest degree case -the celebrated Casson-Walker invariant λw of rational homology spheres. This paper is dedicated to a detailed treatment of 2-component links; a general case will be considered in a forthcoming paper. We present simple Gauss diagram formulas for λw(M L ). This enables us to understand/separate the dependence of λw(M L ) on L (considered as an unframed link) and on the framings. We also obtain skein relations for λw(M L ) under crossing changes of L, and study an asymptotic behavior of λw(M L ) when framings tend to infinity. Finally, we present results of extensive computer experiment on calculation of λw(M L ).